Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

internal table control break processing

Hi all,

My internal table is like this.

ProjID DocNo Amount Currency Date

A007 t123 300 USD 20.09.2007

A007 t123 500 INR 23.09.2007

A007 t123 800 USD 01.10.2007

A008 t124 300 USD 20.09.2007

the out put should be

A007 t123 1100 USD 01.10.2007

A007 t123 500 INR 23.09.2007

A008 t124 300 USD 20.09.2007

I have to add those record which have same Proj Id,Doc no,and currecy and populate latest date.

I am using the follwing logic.

LOOP AT it_invoice3.

on change of it_invoice3-pspid or it_invoice3-xblnr or it_invoice3-waers.

move it_invoice3 to it_invoice5.

append it_invoice5.

endon.

endloop.

LOOP AT it_invoice3.

at new waers.

sum.

move it_invoice3-invcoll_amt to it_invoice5-invcoll_amt .

modify it_invoice5 transporting invcoll_amt where xblnr = it_invoice3-xblnr.

endat.

ENDLOOP.

I am not getting the requied output. pls any one can suggest me right way to have the required output.

Regards

reddy

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question