2007 Aug 04 7:05 AM
Hi to all experts.
My recuirement is.
Internal table a.
Doc no tax code amt
01 11 100
01 12 50
02 11 30
02 11 10
And output is
01 11 100
12 50
02 11 40
How I put codition.
How can I got this output.
Thanks in advance and reward also.
Regard : deep.
2007 Aug 04 7:09 AM
Hiii
loop at main internal table and then read the record line by line by passing the values in it.
eg
loop at itab.
itab-docno = ..
..
endloop.
Reward Points if helpful
Hitesh
2007 Aug 04 7:16 AM
Hi deep, just try the following
first sort the IT
loop at a.
on change of (field of 01 n 02).
write 😕 a-field name.
end on.
write: a-seconf field, a-thiird.
endloop.
2007 Aug 04 7:57 AM
Hi Deep,
Check this code.
types: begin of ty_tax,
docno type <docno>,
taxcode type <taxcode>,
amt type <amt>,
end of ty_tax.
data itab type standard table of ty_tax with header line.
data it_output type standard table of ty_tax with header line.
sort itab by docno taxcode.
loop at itab.
collect itab into it_output.
endloop.
sort it_ouput by docno taxcode.
loop at it_output.
write:/ it_output-docno , it_output-taxcode , it_output-amt.
endloop.
<b>Friendly Note:</b> You have many open threads and Plz close the threads if they are answered/solved and reward points to the people who are helping you by taking their valuable time apart from their regular activities.
Thanks,
Vinay