1

I need to make some changes to an SAPScript. I have the program and form name

Program: RBOSORDER01 Form: RBOSORDER02

I am looking to change some of the data shown in the form. I have debugged the program and I get see the call to write to the form, for example:

 CALL FUNCTION 'WRITE_FORM'
       EXPORTING
            ELEMENT = 'ITEM_TEXT'
       EXCEPTIONS
            ELEMENT = 1
            WINDOW  = 2.

But how is the data passed between the program and the form. I cannot link between each. I was expecting to see a structure or a data element passed with 'ITEM_TEXT' and then this data is printed at this element "ITEM_TEXT" in the form but the link is not clear to me.

I have looked at the form also in SE71 and cannot see where you define this. Where is the link here, what am I missing?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Malorrr
  • 11
  • 1
  • 6

2 Answers2

2

This is in the form, so SE71 is what you need. You have to find the window first, where this element (ITEM_TEXT) is displayed, than look for the element and see what is displayed inside. The SAPSript form uses the global variables (structures, internal tables) of the print program directly by default (there are some other options as well, INCLUDE texts for example). So for example if a global variable gv_text is declared in the print program, and it is displayed in the SAPScript, than it will look like &GV_TEXT& in the form.

You can also debug the SAPScript if you switch on debugging in SE71 (can be painful, if the form is big).

József Szikszai
  • 4,791
  • 3
  • 14
  • 24
1

Function 'WRITE_FORM' just calls the EntryPoint of the Form (SE71 / RBOSORDER02) in this case with ELEMENT='ITEM_TEXT'.

So you will end up in MAIN-Window at:

/E      ITEM_TEXT
/:      INCLUDE &VBDPA-TDNAME& OBJECT VBBP ID 0001 PARAGRAPH IT

In this case you have to debug what "VBDPA-TDNAME" is at this time and then you will find its value with transaction "SO10" (Standard-Text)

The INCLUDE can be a complex text and can have its own format strings.

As Jozsef said before, VBDPA-TDNAME is defined global in the print programm. (SE38n / RBOSORDER01)