Calls from SAP to BC

I am new to SAP. I wanna ask a very basic question. As far as I understand, there are can be to way calls between SAP and BC:-

  1. A BC service invoking a BAPI/RFC on the SAP server and getting data, and the other is
  2. calling SAP BC Services from SAP system.
    In what scenarios will the second option be needed? Secondly, when we set up RFC’s in SAP which can invoke BC services, how and when are this RFC’s called ? I might sound stupid, but please explain.

Thanks in advance
Rieta

  1. is used when passing output from SAP via web methods to an outside system. Idoc’s are used for normal output like invoices , purchase orders etc but their are cases where non standard output is needed. The RFC call would normally be called from a program as the last function after all the data has been read from the databases. The RFC doesn’t do anything it merely contains the structures to be passed to web methods IS. You set this up in transaction SM59 in SAP. The RFC destination matches the entry in SM59.