I'm not very familiar with working with SAP but my current task is to utilize RFC calls for creating purchase orders in SAP software via a C# project I'm working on.
Is there any advantage to using direct RFC calls instead of the BAPI? I asked my supervisor this and his reason was "to avoid the unknown/unneeded mess".
Our old program used the BAPI. I find with this task I'm now chasing my tail as I dive into metadata and resolve issues with using/getting the structures I need.
Things are working and coming along, but I just don't understand the insistence on using RFC instead of BAPI.
Edit to clarify my poor terminology: we currently use a wrapper that calls the BAPI for us. My task is to not use the wrapper but utilize the same RFC calls the BAPI would.
Example:
IRfcFunction poCreateFunction = _dest.Repository.CreateFunction("BAPI_PO_CREATE1");
IRfcStructure poHeader = poCreateFunction.GetStructure("POHEADER");
poCreateFunction.SetValue("POHEADER", poHeader);
...
poCreateFunction.Invoke(_dest);