SAP Process Integration, ABAP Development

Changing SAP tables data through the debugger and FM

This article describes two examples of modifying SAPERP tables in various ways. Such a need sometimes happens with ABAP programmers and consultants involved in debugging the system and testing the integration of the SAP ERP with the external system. The article will be useful for such specialists.

Introduction

Let it be necessary to change the dates, number, status of the SAP RCM contract, but the interface does not allow us to do this (Figure 1). Such a situation is possible, for example, when testing the interaction of SAP MM and RCM.

SAP Process Integration, ABAP Development

Figure 1. Unchangeable fields in SAP RCM interface.

Searching of tables, fields and records.

It is necessary to find the table, fields and record which we will change. You can define tables and fields. One way is to click in the appropriate field of the interface and use F1 (Technical information). To find the desired entry in the table, you can filter the entries by the original values of the known fields. This can be done in transaction SE16. Related entries in other tables can be found using the filter by key fields. (Figure 2).

SAP Process Integration, ABAP Development

Figure 2. Searching for the desired entry through filters by some fields.

The found field values are presented in the table below. (See table 1).

Table ZTRCM_CONTR

Field Description Field Name  Field Value 
Registration number RCM_DOGNUM_REG
Legal contract number RCM_DOGNUM
Date of validity RCM_DATE_BEGIN
Expiration date RCM_DATE_END
Case key CASE_GUID FA163E86E4E11ED8A9A6FC7F71AB1BE1
Case Number CASE_ID 2132

Table 1. Field values.

Edition a table by debugging mode.

We start the transaction SE16N.

Enter the name of the table, enter the key values, in this case CASE_GUID, set the check-boxes only on those fields that we will display / change so that it is more convenient (Figure 3).

SAP Process Integration, ABAP Development

Figure 3. Select fields for edition.

Enter in the field for the transaction code / h and press Enter (Figure 4).

SAP Process Integration, ABAP Development

 

Figure 4. Switch to debug mode.

Next put the button SAP Process Integration, ABAP Development  Execute’ (F8) (Figure 5).

We fall into debug mode.

SAP Process Integration, ABAP Development

Figure 5. Displaying debug status.

Here in the section “Variables 1” you must enter two parameters (Figure 6):

gd-edit

gd-sapedit

SAP Process Integration, ABAP Development

Figure 6. Enter the parameters.

It is important to put the X icon in front of the variables. To put them, you need to click on the pencil icon, then X is entered, then Enter and then also with the next line (Figure 7).

SAP Process Integration, ABAP Development

Figure 7. Enter the values of parameters.

After that we press F8.

We fall into the interface of editing the values of the table (Figure 8).

SAP Process Integration, ABAP Development

Figure 8. The Interface data changes in the table.

The result of saving the edition of table will be displayed in the message (Figure 9).

SAP Process Integration, ABAP Development

Figure 9. Report on changes made to the table.

Changes to the data in the table will also be displayed in the SAP RCM interface. Now the fields will take on new values (Figure 10).

SAP Process Integration, ABAP Development

Figure 10. The RCM interface with modified data.

Editing a table using Functional Module SE16N_INTERFACE

You can also change the data of tables through a specific function module. Using transaction SE37 run to perform FM SE16N_INTERFACE. Run SE37 transaction and fill name of FM (SE16N_INTERFACE), put the button SAP Process Integration, ABAP Development  to continue.

Enter the name of the table being edited and put the X in front of the parameters

I_edit

I_sapedit

You can determine the value of the I_MAX_LINES parameter more, for example 999 (Figure 11).

SAP Process Integration, ABAP Development

Figure 11. The parameters of FM.

Next put the button  SAP Process Integration, ABAP Development  Execute (F8).

Next, you need to filter the records received in the ALV list by some fields, for example CASE_GUID and edit it. You can also create a new entry in the table or delete an existing one. After editing, you must save the changes.

Leave a Reply

Your email address will not be published. Required fields are marked *