Quickly finding the data source of a screen field

In this recipe, we will see a quick method that will enable us to find the database table and field in which the data of a particular SAP screen field is stored. We will use the SQL trace and the EXEC operation for this purpose.

Getting ready

We will use PA30 and its Infotype 0002 in this example transaction. We assume that we are not sure which table name and field stores the first name of an employee.

How to do it...

Proceed as follows:

  1. Call transaction PA30. Enter an employee number in the field provided. Also enter 0002 (personal data)in the Infotype field, and then click on the Change button.
  2. Once you are in the Change Screen, change the First Name of the employee in the relevant field. Do not press the Save button.
    How to do it...
  3. In another session, switch on the SQL trace.
  4. Go back to the transaction PA30 and save the data.
  5. Once the save message appears, go back to the SQL trace transaction and click the Display Trace button.
  6. On the Display Trace selection screen, enter EXEC* in the Operation field and take the Trace List.

How it works...

We used a small trick to find out the data source of a screen field. In order to avoid searching through a lot of table names by using display of data, we only focused on the relevant field and used a change operation. Since we changed a record, the corresponding field must be updated in the database. Also the operation name must begin with EXEC. So, we generated a list and searched for only EXEC operations. From this, we found out the name of the table PA0002 shown in the list. When we look at this closely, we see that the value we entered in the first name field was passed for update in the field VORNA.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.174.204