cancel
Showing results for 
Search instead for 
Did you mean: 

bapi for partial good issue with ref to reservation

Former Member
0 Kudos

I have check the bapi for goods issue with ref to reservation. But how to take care scenario where good issue qty is less than reservation qty. How to map this in bapi.

Please provide input its urgent

Thanks

JENA

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Jena,

Implement a check in your program calling BAPI_GOODSMVT_CREATE.

If you call BAPI_GOODSMVT_CREATE in your own program you have to fill the interface of it (GOODSMVT_HEADER, GOODSMVT_ITEM ...).

So in the first step you have to select/colect all the required data for the interface. If you want to post a goods-issue with

reference to a reservation you can implement a quantity-check in you own program similar to the checks in transaction MB1A or transaction MIGO which lead to message M7064. All the required informations are stored in the table "RESB - Items of reservation".

This is the quantity-check implemented in transaction MIGO (... see note 409754):

...

  • Take only reservation items with open quantity > 0 or

  • or flag 'propose all items' is set (->default settings)

l_open_quantity = ls_resitem-bdmng - ls_resitem-enmng. >(1)

CHECK l_open_quantity > 0 OR

s_defaults-propose_all_items = abap_true.

...

l_open_quantity = open quantity -> is calulated here

ls_resitem-bdmng = Requirement Quantity ->

table RESB / field BDMNG

ls_resitem-enmng = Quantity withdrawn ->

table RESB / field ENMNG

Furthermore you could check, whether the quantity you want to post now is larger than the (remaining) open quantity. If this

not the case you could add this item to the interface-data. Otherwise you can ignore it and send a corresponding message or add the item to an error-log.

After the check has been carried out and the interface has been filled with the valid items you can call BAPI_GOODSMVT_CREATE.

In the customizing-transaction OMCQ you can maintain the category of messages. If you set the message M7 362 to the category "E - error message" the BAPI_GOODSMVT_CREATE will return with this (error-)message as soon as the requirement quantity is exceeded by the goods-issue("Reserved quantity exceeded by ...").

But: other processes/applications are using these settings too.

This means: these processes/applications might have a different behaviour after your changes (error-message instead of a warning- message ... for example).

I hope this helps,

Elaine.

Answers (0)