Application Development and Automation 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: 
Read only

BAPI

Former Member
0 Likes
729

Hi,

I am having one issue , can any one give me suggestion.

I am creating goods movement through BAPI_GOODSMVT_CREATE against prodution order. i require the remaining receipt quantity in order .

7 REPLIES 7
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
682

Maybe hitting the AFPO table would help.

remaining_reciept_qty = afpo-PSMNG  - afpo-WEMNG. 

Regards,

Rich Heilman

Read only

0 Likes
682

Hi Rich,

I was also trying like that , but the issue is even i am creating goods movement again and again , goods movement is being done and i am also recieving Delivery del no created, but WEMNG field is not getting updated, can u pls suggest me why it is happening.

Read only

0 Likes
682

I’d rather recommend you to hot table Mseg and MKpf with movement type 101 and 102 . you’ll get the remaining qty against PO. PO is also get updated in Mseg against 101 and 102 . You have to add the QTY for Movement type 101 and 102 ( -) and then subtract ....

Moreover, ALso look the<b> IS ( Information structure) S021 and S022</b>

Pl.. give it a try ..........

Hope this’ll give you idea!!

<b>P.S award the points.</b>

Good luck

Thanks

Saquib Khan

"Some are wise and some are otherwise"

Read only

0 Likes
682

Saquib's suggestion is definitly a good way, but make sure that you are careful with performance. MSEG is a huge table.

I would have expected that field in AFPO to be updated each time a reciept was done agaist the production order, very interesting.

Regards,

Rich Heilman

Read only

0 Likes
682

You might also be able to look at confirmations in the AFRU table. This should give the comfirmation qtys for all of the confirmations done against the production order. It may be better for performance.

Regards,

Rich Heilman

Read only

0 Likes
682

You can also see information structure , if its populated in your system as it has accumulate data in IS against the material number and also no performance problem ,But only if they are populating in your system ..

Here’re the IS for materials .. <b>S031,S032 and S033</b>

Thanks

SK

Read only

Former Member
0 Likes
682