2008 Oct 20 11:47 AM
hi all,
i have problem with AT NEW COMMAND.
IF THE BELNR IS DIFFERENT THEN IT SHOULD goto prps-post1 and pass post1 to
gt_line_item-postl, if the same belnr repeats 2 times varaible.
at new command is not working
please see my code as below.
gt_line_item-BELNR = bseg-belnr.
at new belnr.
gt_line_item-post1 = prps-post1.
endat.
gt_line_item-name1 = gt_lfa1-name1.
please help me if the belnr is same as previoue belnr it should not goto post1 filed,
Hello hemal latha,
At new commnad will work only in Loop and Endloop.
It will not work in IF conditions
Example.
Loop at gt_line_item.
at new belnr.
Write u r logic.
endat.
endloop.
2008 Oct 20 11:53 AM
Hello hemal latha,
At new commnad will work only in Loop and Endloop.
It will not work in IF conditions
Example.
Loop at gt_line_item.
at new belnr.
Write u r logic.
endat.
endloop.
2008 Oct 20 11:53 AM
2008 Oct 20 11:55 AM
Hi,
First store first belnr in other table or field then compare the current belnr with the previous.If the entries in the second table is available then continue.
.
2008 Oct 20 12:01 PM
Hi,
Please go for the following code. It may solve your problem.
gt_line_item-BELNR = bseg-belnr.
Loop at gt_line_item.
at new belnr.
gt_line_item-post1 = prps-post1.
endat.
ENDLOOP.
gt_line_item-name1 = gt_lfa1-name1.
Thanks.
Nitesh
2008 Oct 20 12:01 PM
hi,
you can use 'on change of' statement to apply this requirement.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |