Showing results for 
Search instead for 
Did you mean: 

ABAP Query Quantity totals wrongly - M.Type 101+, 102-

Former Member
0 Kudos

Hi Friends,

Could any one help me in this? I created an ABAP Query for the combination of MB51 & MB52. When I see the total qty for the item which has GR and Goods return document.........say first by 101 I rerceive 5 nos and using 122 returns 3 nos. Here Query shows total is 8nos instead of 2 nos.

The same way correnponding price also shows for 8nos instead 2 nos.

Kind Regards,


Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sankar,

You can use MSEG-SHKZG field for +(plus)/-(minus) indicator where 'H' is -(minus) and 'S' is +(plus).

I hope this can answer your problem.



Former Member
0 Kudos

Dear Sankar,

I think that its because you dont use the debit/credit indicator (MSEG-SHKZG) to mark the transaction as in/out. Please add the logic to your query.

Active Contributor
0 Kudos


Which tables are you using in the query ?

Cheers !