Both,but in differentways.The callerRFCwill always be theexternal program. Ifthe function callfordata retrievalin SAP, this function must be createdcontainingthe queryand thussent tothe programviatext file.Now, ifthe functionofdata entryin SAP, you will have to developthis logicin your program(If there is) in order to extractin text filesand functionconsumethis file. For this casealso the possibilityto performexternaldatabasequeryin the SAP, using theCL_SQL*classes,you canwith this instructiontransferstructuresbetween the two systems.
Anyway, we have many possibilitiesright?
I hope I haveclarified yourdoubts
Warm regards,
Raphael Pacheco.