Analyzing transactions

Before you create a transaction-based activity, determine the following items:
  • What the transaction code is
  • Which screens and programs you need to use
  • What the field names are and what the OK codes are

There are several ways to analyze your situation to answer the above items. For example, in the SAPGUI menu choose Basis Components > ABAP/4 Workbench > Basis Programming Interfaces > Transferring Data with Batch-Input.

The easiest way of analyzing a transaction is by using transaction SM35, which recording functionality that allows you to record all the field entries and OK codes during data entry.


An example result, based on recording a transaction XD02 using SM35, is shown below. An explanation of this example follows.
-----SAPMF02D 0101
     |----BDC_OKCODE	/00
     |----BDC_CURSOR	RF02D-D0110
     |----RF02D-KUNNR	1
     |----RF02D-D0110	X
-----SAPMF02D 0110
	|----KNA1-NAME1	Techno Graph Ltd. 
	|----KNA1-STRAS	134 West Street
	|----KNA1-ORT01	Rochester
Note: The OK code (such as BDC_OKCODE /00) is returned at the top of a screen. The order in which field entries and OK codes appear is not relevant for executing a transaction.
Note: Although BDC_CURSOR codes (move cursor to...) are also recorded, those cursor movements are not required for Batch Input.

Explanation of the example

The following is a description of each line of the above recording.
XD02		Transaction code
SAPMF02D 0101	  			Processing program SAPMF02D, screen 0101
RF02D-KUNNR	1			Enter the value '1' to the customer number field
RF02D-D0110	X			Check the "Display Address data"check box
BDC_OKCODE	/00			Press the Enter key to move to the next screen
SAPMF02D 0110				Processing program SAPMF02D, screen 0110
KNA1-NAME1				Techno Graph Ltd.	Enter 'Techno Graph Ltd.' 
						to the company name field
KNA1-STRAS				134 West Street	Enter ‘134 West Street‘ to the 							street field
KNA1-ORT01 Rochester   	Enter 'Rochester' to the city field
BDC_OKCODE UPDA			Press the save button (UPDATE)