‎2011 Oct 20 1:14 PM
Dear All,
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.
Regards,
Deepu.K
‎2011 Oct 20 7:49 PM
Call WRITE_FORM in loop only not START_FORM and END_FORM. << Point begging and 2 points removed >>
Edited by: Rob Burbank on Oct 21, 2011 11:17 AM
‎2011 Oct 20 7:52 PM
Hello Kumar,
It's a strange issue.
The same code did not work in Dev System.
But, it worked in Quality system.
Regards,
Deepu.K
‎2011 Oct 21 4:12 PM
Dear All,
As i Mentioned in my earlier post, the same coding working fine in Quality server --> Printing multiple lines in script output.
But now, I have the same reqt. in another window.
So, I did the same coding.
But, this time it's printing the last line of the internal table in all the lines.
This is happening in Quality Server only.
The only difference between the previous internal table and this int. table is:
1. The first int. table content is printing in MAIN Window. ---> working fine
2. The second int. table content is printing in VARIABLE window. ---> NOT WORKING.
Can any one tell me what's the issue with this ?
Regards,
Deepu.K