!--a11y-->
TRFC Client Programming 
When calling an RFC as a transactional RFC (TRFC) there are no return values. If the submission for some reason does not work, an exception will be raised. The TRFC method requires an additional RfcTID parameter. You should let the SAP system know to confirm this TID if the submission is successful. TRFC submissions are used when you require guaranteed one time only execution of a function but do not require any return information beyond that the call was accepted by SAP. Therefore TRFC is best for submitting data but not for retrieving data.
Example
The Winform SAPUpdateTRFC method gives an example of TRFC coding.
|
private bool SAPUpdateTRFC() { /* this routine updates the customer list to SAP using (T)RFC */ RfcTID myTid = SAP.Connector.RfcTID.NewTID(); Debug.WriteLine("RFC tid is " + myTid.ToString()); try { proxy.TRfcRfc_Customer_Update(ref brfcknA1Table1, myTid); } catch (Exception ex) { Debug.WriteLine(ex.ToString()); return false; } // if you don't confirm the TID, the update is rolled back in SAP. proxy.ConfirmTID(myTid); return true;
} //SAPUpdateTRFC |