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: 

Sq02 ABAP coding for extra field

Former Member
0 Kudos

Hi experts ,

I have created a Query to find the difference in PO value and Invoice Value . I have defined a Extra field named " Difference"  and got the value but I am unable to code the below cases

where one PO line has more than one Invoice . I want to code so that System add all Invoices posted on PO line .

So for example

PO line 100

Invoice 1   50

Invoice 2    50

Total of Invoice for Line iten is 100 so difference is 0 . Right now I am getting 2 separted line and -50 each in difference Field .

Many Thanks

Regards

PreetI Agarwal

5 REPLIES 5

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Preeti,

I am afraid this is not possible with query. You need to go for ABAP program for this. (With Query route, at the most you will be able to get the invoice totals by sub-totalling on POs in the ALV screen, but you will not be able to compute the difference.)

KJogeswaraRao

0 Kudos

HI

Is it possible for me to get the total of all Invoice posted  on PO for one line Item.

As I am Thinking of creating Another Field which will have total of Invoice posted on one PO . and then I can do calcuation on that .

Many Thanks for your help.

Regards

Preeti Agarwal

0 Kudos

No, That's what I was hinting at. This needs access to internal tables of standard program, which involves use of field-symbols in coding etc. There will be other complexities also.

0 Kudos

Thank you

0 Kudos

Hi

Can you please help me creating one .

I am new to ABAP and learning myself .

Many Thanks

Regards