‎2007 Apr 25 2:17 PM
Hi,
I have dec a variable and incr its value in loop then prn it.
data: no type i.
loop at itab.
no = no +1.
call fn write_form.
endloop.
here am getting the number 1 twice.
1
1
2
3
4
and so on.
How to ignore the first number from printing.
Regards,
Siri
‎2007 Apr 25 3:19 PM
hi Siri,
If you change your table type, the problem will get solved.
data: T_TEMP type table of ......
currently you are using an internal table with header line; I guess, Somewhere in
your code, you are calling WRITE_FORM before the loop statement, and it is
printing the record in the header line (though the body part of the internal table
is looped, the header will contain the data if you have not cleared the header
using <b>clear t_temp</b> statement).
alternatively, you can use CLEAR T_TEMP statement to clear the header,
after the internal table is manipulated in the code.
Hope this helps,
Sajan Joseph.
‎2007 Apr 25 2:19 PM
what is the code inside the WRITE_FORM.
just check that.
Thanks & Regards
Santhosh
‎2007 Apr 25 2:24 PM
‎2007 Apr 25 2:27 PM
Hi,
Unable to conclude from the peice of code which you have sent can you send your code so that it would be helpful.
Regards,
Varun.
‎2007 Apr 25 2:37 PM
> Hi,
>
> Unable to conclude from the peice of code which you
> have sent can you send your code so that it would be
> helpful.
>
> Regards,
>
> Varun.
THIS IS MY CODE AND BELOW OUTPUT
LOOP AT T_EMP.
W_SNO = W_SNO + 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
1 00003 09.09.19890 4345
1 00003 09.09.19890 4345
2 0004 8.09.98 3423
3 00005 8.08.98 234234
Regards,
Siri
‎2007 Apr 25 3:19 PM
hi Siri,
If you change your table type, the problem will get solved.
data: T_TEMP type table of ......
currently you are using an internal table with header line; I guess, Somewhere in
your code, you are calling WRITE_FORM before the loop statement, and it is
printing the record in the header line (though the body part of the internal table
is looped, the header will contain the data if you have not cleared the header
using <b>clear t_temp</b> statement).
alternatively, you can use CLEAR T_TEMP statement to clear the header,
after the internal table is manipulated in the code.
Hope this helps,
Sajan Joseph.