BDC 3

Posted by Krishh Webworld | 6:11 PM | | 0 comments »

(3) WRITING A DATA TRANSFER PROGRAM:

The data transfer program is responsible for doing the following:

Converting the data that is to be transferred into the SAP System as required by the SAP data structure or transactions that you are using.

The data structure may be generated from the standard SAP data structures (see Generating an SAP Data Structure(5)). This is required if you are working with a standard SAP batch input program. Or, if you are creating your own batch input procedure, you may have developed the data structure yourself by analyzing the SAP transactions with which the data is to be entered.

A conversion may be necessary for data type and length. The data type required by all standard SAP batch input programs is C, character data. You can find the required field lengths either in your analysis of the SAP data entry transactions or in the data structures that you generate in the ABAP/4 Dictionary.

Exporting the data in SAP format to a sequential file. The batch input program in the SAP System reads the data in from this file.

Task Overview

The tasks involved in writing a data transfer program are shown in the diagram and list below.


Writing a Transfer Program

The procedure:

1. Analyze the structure of your existing data and specify the conversions that are required to fill the SAP data structures.
2. Generate the SAP data structure in code form and insert it into your program.

If the program is written in ABAP/4, you need only include the required tables in your program with the TABLES statement.

3. Initialize the SAP data structure.
4. Fill the structure with data, performing any conversions and error-checking that are required.
5. Write the sequential file that is typically required for making the data available to the batch input program in the SAP System.


(4) ANALYZING SAP TRANSACTIONS:

If you are creating your own batch input procedure, then you will need to analyze the SAP transaction(s) with which the batch input data is to be entered into the SAP System.

The purpose of the analysis is to gather the following information:

the transaction code, if you do not already know it
which fields require input
which fields you can allow to default to standard values
the names, types, and lengths of the fields that are used by a transaction
the identifiers of the functions that you will need to call to have the transaction process the batch input data.



Collecting Transaction Data

To analyze a transaction, do the following:

1. Start the transaction by menu or by entering the transaction code in the command field.

You can determine the transaction name by choosing System --> Status.

2. Step through the transaction, entering the data and performing the functions that will be required for processing your batch input data.

3. On each screen, note the program name and screen (dynpro) number.

Display these by choosing System --> Status. The relevant fields are Program (dynpro)and Dynpro number.

If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen. The Technical info pop-up shows not only the field information but also the program and screen.

4. For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical info.

Note the following information:

The field name for batch input, which you'll find in its own box.
The length and data type of the field. You can display this information by double- clicking on the Data element field.

5. Find out the identification code for each function (button or menu) that you must execute to process the batch input data.

Put the cursor on the button or menu entry while holding down the left mouse button. Then press F1. In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.

You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.


Getting Screen and Field Information in the Transaction Interface

Using the Screen Painter and Menu Painter to Get Field and Function Info

You can also obtain field and function information from the screen and menu definitions in the ABAP/4 screen painter and menu painter. For example, you can quickly display field information in the screen painter by displaying the screen in the Fullscreen editor and using the Attribs. for 1 field button for each field.



Getting Field Information in the Screen Painter

Similarly, you can get function and menu codes from the CUA definition of a screen in the menu painter.
See the ABAP/4 Development Workbench documentation for more information on using these tools.

0 comments

Archives

Subscribe Now: Feed Icon