Creating a transaction-based activity

The other way of writing data to an SAP connection is by calling an ECC transaction. This method is also referred to as Batch Input. In order to create a transaction-based activity you should be familiar with the concepts of Batch Input. The following section gives you a brief introduction to Batch Input.

To create a batch input in the SAPGUI, from the SAPGUI menu, choose Basis Components > ABAP/4 Workbench > Basis Programming Interfaces > Transferring Data with Batch-Input.

The Batch Input method allows you to process transactions in background in much the same way as users would enter data to all the screens contained in a given transaction through the SAPGUI.

An SAP transaction is defined by the following elements:
  • Transaction code

  • Programs and screens

  • Fields and OK codes

Transaction code

Every transaction is identified by a unique transaction code. You may always find out which transaction you are currently processing in the SAPGUI by selecting the SAPGUI menu item System > Status.

For example, here are some SAP transaction codes:
  • XD02 -- Customer Update
  • XD01 -- Customer Create
  • PA30 -- Maintain HR Master data

Programs and screens

One or more programs can control a transaction. These programs host and manage the screens that are displayed for entering data. Each program is responsible for a set of screens. For many transactions only one program is responsible for all screens contained in a transaction.

For example, transaction XD02 contains the program SAPMF02D. Program SAPMF02D is responsible for the following screens:
  • Screen 0101
  • Screen 0110
  • … and so on

Fields and OK codes

Each individual screen contains fields for display and for data input. In addition, a screen contains screen specific menu items and buttons that you press in order to go to the next screen, save your entries, and so on. In terms of Batch Input, these buttons and menu items are defined by so-called OK codes.

Here are examples of Screen fields:
  • KNA1-NAME1
Example OK codes are shown below:
/00	-- press the Enter key
/01	-- press function key F1
/02	-- press function key F2