Execute Transactions
The following sample application shows how to use the Transaction class to execute an SAP transaction.
Execute SAP Transactions
Follow the steps below to run SAP transactions from ERPConnect:
- Connect to the SAP system using
R3Connection
. Set theUseGui
property to true. - Create a transaction object using
Transaction()
. - Specify the SAP transaction code using
TCode
. - Optional: add batch steps using
AddStep
. - Launch the SAP GUI and execute the SAP transaction using
Execute
.
Tip
The installation package of ERPConnect includes the Transaction-Recorder tool. This tool records transactions and implements them to code, see Transaction-Recorder.
The following sample code executes the SAP transaction MMBE (stock overview):
Input:
Output:
Related Links
- Samples: Access Stock Overview using Batch Input
- Samples: Create New Customers using Batch Input
- Samples: Create Purchase Orders using Batch Input and Background Processing
Last update: June 4, 2024