Skip to Content
avatar image
Former Member

Element & Window loading sequence in Script

CALL FUNCTION 'WRITE_FORM'

EXPORTING

window = 'CHECK'

element = '540'

EXCEPTIONS

window = 1

element = 2.

Can any one tell me what is the purpose of element,is it have any unique feature and also what is the order driver pgm will load window in form.

I think first always main window load then remain window as per albaphetical order..

if we want to change ordre then we have to write code in write form in drive pgm as we want that time also first will main window always..

anyway if any doc is supporting this,it will helpful me..

Thanks

Kumar

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 20, 2006 at 04:59 PM

    Hi

    The element (in your case 540) is a text element of the window, so in your sapscript in window CHECK you should find a line like this:

    /E 540

    The text element is a part of a window and it's printed only if it's directly called by fm WRITE_FORM.

    So you can insert several text element in a WINDOW and decide what has to be printed.

    For example: WINDOW WELCOME

    /E ITALIAN

    • Ciao

    /E ENGLISH

    • Bye Bye

    IF LFA1-SPRAS = 'I'.

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    window = 'WELCOME'

    element = 'ITALIAN'

    EXCEPTIONS

    window = 1

    element = 2.

    ELSE.

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    window = 'WELCOME'

    element = 'ENGLISH'

    EXCEPTIONS

    window = 1

    element = 2.

    In this case a sentece is writen in order of the language and is place in the same position of the page because both text elemant belong to the same window.

    I'm not sure the sequence used to load the windows, but you could see it running your sapscript in debug mode. Anaway I'm sure it depends on when the program call the windows.

    Max

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 20, 2006 at 04:52 PM

    Hi Kumar,

    Use of an element is to print different blocks of statments explicitly.

    If you want to print only some block of statments in a window depending on a particular condition, if you write that block starting with /E, it will be called only when the user calls it explicitly from driver program, otherwise that part will not be printed.

    Thanks,

    Ramya

    Add comment
    10|10000 characters needed characters exceeded