Skip to Content
avatar image
Former Member

Issue with WRITE_FORM in non-main window

I am trying to write an internal table to a non-main window but the sapscript "bounces" out during the normal process. (It hits the element and then drops out of the window without printing anything.) However at the END_FORM and CLOSE_FORM the last entry in the internal table is printed the same number of times as there are entries in the table. For example, if there are 2 entries in the table I will end up with the last entry in the table twice on the output.

Print program:

loop at tab_regup.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'CHECKRM1'
element = '599'
function = 'APPEND'
EXCEPTIONS
window = 1
element = 2.
endloop.

SAPSCRIPT:

Window: CHECKRM1

/E 599

T1 &TAB_REGUP-BELNR&,,&TAB_REGUP-BLDAT&,,&TAB_REGUP-WRBTR&,,

= ®UH-RBETR(C)&,,&TAB_REGUP-WSKTO&,,®UH-RBETR&

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 10, 2016 at 05:32 PM

    Hi Rich, try using the FM WRITE_FORM_LINES instead of WRITE_FORM.

    WRITE_FORM_LINES has a Tables parameter so you can pass the Internal table

    Add comment
    10|10000 characters needed characters exceeded