Skip to Content
avatar image
Former Member

ELEMENT in SAp script

Hi,

Can anyone explain me the benifits and functionality of ELEMENTS we use in SAP Scripts..?

In what situations we can set these ELEMENTS and how to deal when we set the elements kind of things.

And can we use multiple ELEMENTS in one window..? If so, please explain me how to write the code and deal in such cases.

Thanks in advance.

Regards,

Paddu.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 31, 2007 at 11:34 PM

    Hi,

    In print program you can specify when a certain element should be printed, it gives you a control on the sap script processing and therefore sap script form is more flexible and general.

    SAPscript calls the individual text components of a form text elements. To achieve good structuring and readability, you assign a fixed name to each text element in the form. The print program then uses these names to access the elements. This name applies also for translated versions of a text element, while the contents of the text elements depend on the language.

    Text elements are related to a window, that is, a print program can call for each window only those text elements that exist in this window. They are used in main and other windows.

    The variables used within '&...&' are replaced by the system at output time

    /E <element name>

    UL &fieldnam& text text

    Named element are written when driver program use

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    ELEMENT = 'BOOKING'

    TYPE = 'BODY'

    WINDOW = 'MAIN'

    Unnamed element are written once in MAIN windows, and each time in other windows.

    U can use use multiple ELEMENTS in one window.

    Regards,

    KK

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 31, 2007 at 11:12 PM

    Hi,

    Elements are used to group a related information to print in the script.. You can use as many elements as you want in one window.. for example let us say i want to print

    Item Material quantity

    10 ADB 10

    20 DEF 20

    30 SDF 30

    -


    Total 60

    -


    Here we would be using the main window to print this data.. as we are not sure how many line items exist.

    In this main window i would delcare 3 elements header, details, total elements.

    when calling from program

    Use the WRITE_FORM AND pass the window name and element name to call the resepective window.

    Thank

    Mahesh

    Add comment
    10|10000 characters needed characters exceeded