2007 Aug 04 11:31 AM
Hi to all experts
Doc no tax amt
01 11 100
01 12 200
02 13 25
02 13 75
Output is
Doc no tax amt
01 11 100
01 12 200
02 13 100
Process : first I check the doc no than check tax no
If both are sama as previous then I sum the amt. just
Like at 02 doc no. in first loop system check doc no = 01
Tax = 11 amt = 100.
At second loop system check doc no is same but tax is not sama.
At third time doc no = 02 tax = 13 amt = 25.
At forth time system check doc no is same, tax is also same then sum the amt.
Please help me for write the condition for checking the doc no and tax.
Please given me sample code for that.
Thanks in advance and reward also.
Regard : deep.
2007 Aug 04 11:46 AM
Use SORT & Control break logic..
SORT itab BY doc_no tax.
LOOP AT itab.
AT NEW tax.
This will check any change in doc_no tax combination.
Write your logic
ENDAT.
ENDLOOP.
SORT itab BY doc_no.
LOOP AT itab.
AT NEW doc_no.
This will check any change in doc_no.
Write your logic
ENDAT.
ENDLOOP.
Hi to all experts
Doc no tax amt
01 11 100
01 12 200
02 13 25
02 13 75
Output is
Doc no tax amt
01 11 100
01 12 200
02 13 100
Process : first I check the doc no than check tax no
If both are sama as previous then I sum the amt. just
Like at 02 doc no. in first loop system check doc no = 01
Tax = 11 amt = 100.
At second loop system check doc no is same but tax is not sama.
At third time doc no = 02 tax = 13 amt = 25.
At forth time system check doc no is same, tax is also same then sum the amt.
Please help me for write the condition for checking the doc no and tax.
Please given me sample code for that.
Thanks in advance and reward also.
Regard : deep.
2007 Aug 04 11:46 AM
Use SORT & Control break logic..
SORT itab BY doc_no tax.
LOOP AT itab.
AT NEW tax.
This will check any change in doc_no tax combination.
Write your logic
ENDAT.
ENDLOOP.
SORT itab BY doc_no.
LOOP AT itab.
AT NEW doc_no.
This will check any change in doc_no.
Write your logic
ENDAT.
ENDLOOP.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |