on 03-05-2007 2:01 PM
Hi Experts,
I am calling an SAP Script form from a custom program. The code snippet is as follows:
*****************************************************************************************
MOVE : 'ZFRM_EX_COM_INV' TO w_form.
PERFORM open_form USING w_form.
PERFORM write_form USING 'MAIN' 'HEADER'.
PERFORM write_form USING 'MAIN' 'LINE_ITEM'.
LOOP AT it_cond INTO wa_cond.
<b>PERFORM write_form USING 'TOTAL' 'TOTAL_COND'.</b>
<i> " TOTAL is the page window and TOTAL_COND is the element.</i>
ENDLOOP.
PERFORM close_form.
&----
*& Form write_form
&----
text
----
-->VAR1 text
----
FORM write_form USING var1 var2.
IF var2 IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = var1
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
OTHERS = 8.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = var2
window = var1
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
OTHERS = 8.
ENDIF.
ENDFORM. " WRITE_FORM
*****************************************************************************************
In the text that is in bold in teh code snippet, I am tring to pass the values one-by-one and print in the output.
But only the last line item from that table is begining printed. The other lines are overwritten by the last line.
How should I display all the lines in the internal table it_cond.
Please help me...
regards,
arul jothi a.
U are using a variable window to print the 'total_cond' text element..
so whenever u call the write form for a variable window .. it will get over written by the current contents.. I t wont append the contents to the form...
Instead u use this text element in the MAIN window then onli u will get all the data..
i hope this is the problem..
reward if it helps u...
sai ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.