Skip to Content
avatar image
Former Member

what is an element,when we call a function write_from?

what is an element,when we cal a function write_from what to assign for ELEMENT and WINDOW...?

Edited by: Alvaro Tejada Galindo on Feb 20, 2008 4:37 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Feb 20, 2008 at 05:53 PM

    Windows is the page window you want to write, element is the the text element where the information you want to write is placed.

    You can look for text elements pressing F9 in the page windows you are writing, look for the lines beggining with "/E" in the old editor, that's the name of the text element you need to place.

    If there's no text element in the page window, just leave it blank

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 20, 2008 at 06:41 PM

    Hi shekar,

    The main reason of specifying the Function module Write_Form is to make the values visible in the particular window of the form.

    For Ref, see the Below Function Module:

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    ELEMENT = 'HEADER'

    WINDOW = 'MAIN'

    EXCEPTIONS

    ELEMENT = 1.

    In the above example, I need to declare a element in the Main window. So I have passed 'MAIN' in window and 'HEADER' in element.

    REASON OF SPECIFYING:

    Suppose you want to display the values the internal table say suppose it_itab. If you specify this in the sap script like &it_itab-f1& or &wa_itab-f1& without using write_form wont work.

    So this will be specified as,

    SE38:

    Loop at it_itab into wa_itab.

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    ELEMENT = 'HEADER'

    WINDOW = 'MAIN'

    EXCEPTIONS

    ELEMENT = 1.

    endloop.

    Inside Script:

    Inside the Main window:

    /E HEADER

    • &wa_itab-f1&

    what happens is after the loop statement as soon as it encounters the write_form, it searches for the element 'HEADER' in the Main window and values become visible in the form.

    If u need any more details, please tell.

    <REMOVED BY MODERATOR>

    Thanks,

    karthik

    Edited by: Alvaro Tejada Galindo on Feb 20, 2008 4:36 PM

    Add comment
    10|10000 characters needed characters exceeded