I'm trying to print multiple lines of my internal table in a script.
But only the last line is being printed all the time in all the lines.
Attached is my code.
... CLEAR GS_REGUP. LOOP AT GT_REGUP INTO GS_REGUP. * Start the Form CALL FUNCTION 'START_FORM' EXPORTING ARCHIVE_INDEX = TOA_DARA FORM = 'ZFORM' "T042E-ZFORN LANGUAGE = SY-LANGU "T001-SPRAS STARTPAGE = 'FIRST' PROGRAM = 'ZPROG'. * Net Amount CLEAR GV_NETWR. GV_NETWR = ( GS_REGUP-WRBTR - GS_REGUP-PSSKT ). * Print the Content CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = '525' "Header FUNCTION = 'APPEND' TYPE = 'BODY' WINDOW = 'MAIN'. * End the Form CALL FUNCTION 'END_FORM' IMPORTING RESULT = ITCPP. IF ITCPP-TDPAGES EQ 0. "Print via RDI ITCPP-TDPAGES = 1. ENDIF. ENDLOOP.
Please let me know the flaw in it.