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: 

BAPI for GR for Outbound delivery

Former Member
0 Kudos

Hi Gurus,

I need to create a Goods Receipt against an Outbound Delivery ( movement type "101" ) using the BAPI BAPI_GOODSMVT_CREATE

user is using MIGO transaction for the same. There he will choose the GOODS RECEIPT for OUTBOUND DELIVERY and enters the delivery number. The movement type "101" is used.

I tried passing gm_code = 01 and mvt_type = 101 and mvt indicator as u2018Bu201D , but Iu2019m getting an error message 'ENTER PURCHASE ORDER NUMBER'.

I donu2019t have PO number . I just have shipment number from which I have found open outbound deliveries and now I need to do GR for each of the Outbound delivery.

Please let me know if Iu2019m passing the right gm_code and mvt indicator to the BAPI or if Iu2019m missing any parameters. Iu2019m passing the following parameters to the BAPI ?

Delivery. No. , delivery item, Doc. Date , Posting Date , ref document num , Quantity, Storage Location, External qty, External qty unit, matnr, werks .

Your help is greatly appreciated.

Thanks in advance.

4 REPLIES 4

madhu_vadlamani
Active Contributor
0 Kudos

Hi Sparul,

Please check the documentation of that bapi. Still if there is any issue post it.

Regards,

Madhu.

0 Kudos

Thanks for replying. I went through the entire BAPI documentation but did not found anything related to GR for outbound deliveries.

I searched some older posts in sdn related to this problem but almost all are unanswered question.

I'm passing gm_code = 01 , mvt_type = 101 and have tried all movement indicator like 'B' , 'F' and blank.

here is what I'm passing in my Bapi.Please let me know if I'm missing something or if I'm passing something incorrectly.

gm_header-pstng_date = sy-datum.

gm_header-doc_date = sy-datum.

gm_header-ref_doc_no = wa_lips-vbeln. "The Outbound delivery Number

gm_code-gm_code = '01'.

MOVE '101' TO gm_item-move_type.

gm_item-material = wa_lips-matnr . "Material Number from the Delivery.

gm_item-plant = wa_lips-werks . "Receiving Site.

gm_item-stge_loc = wa_lips-lgort. "Receiving Storage Location.

gm_item-entry_qnt = wa_lips-lfimg.

  • gm_item-entry_uom = wa_lips-vrkme.

gm_item-ENTRY_UOM_ISO = wa_lips-vrkme.

gm_item-mvt_ind = 'B ' .

gm_item-deliv_numb = wa_lips-vbeln.

gm_item-deliv_item = wa_lips-posnr.

gm_item-DELIV_NUMB_TO_SEARCH = wa_lips-vbeln. "delivery number

gm_item-DELIV_ITEM_TO_SEARCH = wa_lips-posnr. "delivery item

if I donot pass any value in mvt indicator the error I'm getting is 'Update control of movement type is incorrect (entry 101 X X)'

if I pass 'B' in mvt indicator error is 'Material document data and PO data do not match (Plant)'

if i pass 'F' , erro ris 'Order not found or not permitted for goods movement'.

Please help me. This is kind of critical issue. or please suggest if I can do GR for outbound delv in any other way.

Thanks...!!!!

0 Kudos

Hi

Are you doing the GR in the destination plant for a STO? If the answer is yes, see SAP Note 498143 - FAQ: Stock transfer with delivery in purchasing.

In SAP Note 520813 - FAQ: BAPIs for goods movements, read carefully question 7. It seems that if in tcode MIGO you have the GR with the PO as ref.document when you populate it with the delivery in the field.

I hope this helps you

Regards

Eduardo

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

See SAP Note 520813 - FAQ: BAPIs for goods movements.

Regards

Eduardo