10-10-2016 3:40 PM
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&
10-10-2016 6: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