The sample code is located in the installation directory in the PopUpMMBE directory
The class Transaction offers the possibility of executing SAP transactions in the foreground as well as in a background process. This technique is called Batch Input. By executing in a background process, you will be able to process mass data and transfer it to the SAP system. This technique is often used if no BAPI exists.
Another possibility is to jump directly to an SAP transaction from your .NET application. The example below covers this.
The user is able to enter a material number and the name of a plant. After doing so, she/he can click the button and the SAP GUI is launched with transaction MMBE (stock overview). A special tool, the TransactionRecorder, is also included in the installation package to record such transactions and implement them easily in your own program code.
The code below shows how to add batch steps with the method AddStep. It is important to set the UseGui property to true. The SAP GUI will be launched by the method Execute.
Click to open C# example.Click to open VB example.
The screenshot below shows the sample program in action.
If you only want to open the SAP GUI and execute a single transaction without adding several batch steps, it is sufficient to set the property TCode and execute.