Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Query : code to change the display

Former Member
0 Kudos

Hi all,

I have created an Abap Query and generated it. I see the output now as follows:

<u>Bill.doc</u> <u>Item</u> <u>Net value</u> <u>Total amt</u>

900000 10 100 600

900000 20 200 600

900000 30 300 600

900001 10 250 250

900002 10 300 500

900002 20 200 500

Now I want the total amt to be displayed only once for each billing document only for the first item and for the other line items it should be blank as shown below.

<u>Bill.doc</u> <u>Item</u> <u>Net value</u> <u>Total amt</u>

900000 10 100 600

900000 20 200

900000 30 300

900001 10 250 250

900002 10 300 500

900002 20 200

Can someone please explain me where and how I should write the code to get this working?

Thanks,

N

  • Helpful answers will be awarded for sure.

1 ACCEPTED SOLUTION

Manohar2u
Active Contributor
0 Kudos

How you are getting total amount??

Try this way..

Loop at itab.

at new bill doc.

sum. and modify your itab record with the total.

endat.

endloop.

Hope this is what you are looking for...

Cheers

Manohar

3 REPLIES 3

Manohar2u
Active Contributor
0 Kudos

How you are getting total amount??

Try this way..

Loop at itab.

at new bill doc.

sum. and modify your itab record with the total.

endat.

endloop.

Hope this is what you are looking for...

Cheers

Manohar

Former Member
0 Kudos

Hi Manohar,

I am getting the total amount from a field which exists in one of the tables which i used in the abap query.

the total amount is appearing correctly...i dont need to modify that. i just need to display it only once for each billing doc for the first item.

i want to know where i should do the coding...i mean in the Infoset or the Abap Program that gets created when i generate the infoset.

Thanks!

N

Message was edited by:

Narmada Mallavaram

null

Former Member
0 Kudos

Can anyone help?

I can post the query code if it helps.

thanks,

N