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: 

Problem in the code matrial price not counting for particular data?

Former Member
0 Kudos

Hi experts

Matrial price counting when the particular data its not working

1. There are only two items, but the material document has 3 items.

2. The second item has u201C0.000u201D as quantity. It should be u201C100.000u201D.

3. The first item has 275.20 as the price. It should be 275.23

The ZMAT total for 834759 is 550.40. How did 275.20 and 0.00 add up to 550.40?

if it_bkpf-blart eq 'WE' or
       ( it_bkpf-blart eq 'WA' and
     ( it_bseg-werks = '09'  or it_bseg-werks = '99' ) and "DV2K927836
         ( it_bseg-hkont = '0001701010' or
         it_bseg-hkont = '0001720010' ) ).
      it_detail-menge      = it_bseg-menge.
    endif.

1 REPLY 1

Former Member
0 Kudos

A few minutes spent utilizing the debugger will reveal the code or data declaration errors resulting in your problems. I trust that you did at least try debug once before you posted?

And, did you notice this?

The ZMAT total for 834759 is 550.40. How did 275.20 and 0.00 add up to 550.40?

550.4 = 275.20 x 2. Obviously code doesn't clear something or is adding the values twice.....