cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI to create Outbound (Return) Delivery via MIGO

Former Member
0 Kudos

Hi All,

I am looking for a BAPI to create a Return Delivery via MIGO.

I am currently creating this outbound delivery via MIGO as follows :

1) Select the option A02 Return delivery, R02 Material document

2) Enter Material document

3) Enter Delivery Note & Header text

4) Enter Reason for movement

5) Select the 'VIA DELIVERY' check box, then save.

The system then creates an OUTBOUND DELIVERY with a 122 movement.

Any suggestions ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Prasoon
Active Contributor
0 Kudos

Hi,

   As already suggested, you can use the BAPI: BAPI_GOODSMVT_CREATE

Also refer the wiki doc: How To Goods Movements with BAPI - ERP SCM - SCN Wiki and the link: BAPI_GOODSMVT_CREATE to post Goods Movement

Regards,

AKPT

Former Member
0 Kudos

Hi  Prasoon,

Thank you for the reply.

I went through both links, both neither of them mention how to use this BAPI to create a Return Delivery.Does this mean that one cannot use this BAPI for this specific function?

I see that there is no GM code specifically for transaction MIGO and I am not sure if you can create  Return delivery with reference to a material document by using any of the other listed transactions?

Is that possible?

JL23
Active Contributor
0 Kudos

BAPIs have often very limited and dedicated functions, like this one to create movements.

I could not see any hint in its documentation in SE37 that it would be possible to create a delivery from it, nor could I see the field name or a similar field to the box in MIGO that would act as an import parameter. Also there is no KBA or OSS note that mentions anything about delivery creation, only about posting GR for a delivery.

So I pretty much sure that you have to call 2 BAPIs, first to create the delivery  and subsequently a second to post goods issue.

Former Member
0 Kudos

Thank you Jurgen.....I was dreading that answer 😞

But I am not a 100% clear on your suggestion to use 2 BAPIs.....

In my scenario, the user only has a Purchase Order number as Input to the process.

I need to design a custom screen for the user to enter the PO number, Quanity, Reason for movement and Storage Location. The system must then be able to use this information to generate the Return Delivery (with reference to the Material Document of the GR linked to PO number which the user enters in this custom screen).

When creating the Return Delivery via MIGO, a 122 movement is done, but there is no material document generated.....only an outbound delivery number.

If I call 2 BAPIs :

- is it possible to create a delivery with reference to a Material document via a BAPI?

- Will the second goods issue BAPI not then create a 2nd material document number?

jpfriends079
Active Contributor
0 Kudos

Hi

Try FM BAPI_INB_DELIVERY_SAVEREPLICA. Here you have route in the header.

Generally for creating Inbound Delivery with reference to PO, we have TCode VL31N. For Mvt Type 122. You have to check configuration based on your item category determination in your inbound delivery.

Thanks, JP

Former Member
0 Kudos

Hi JP,

Would this BAPI be suitable for an outbound delivery creation?

I need to create an Outbound delivery to return goods to the vendor.

thanks

jpfriends079
Active Contributor
0 Kudos

Hi

Frankly, I'm not sure whether that BAPI will help you. But, you can try.

Moreover, you can give try to BAPI_OUTB_DELIVERY_CREATE_STO.

Thanks, JP

Former Member
0 Kudos

You can use Bapi:BAPI_GOODSMVT_CREATE

Former Member
0 Kudos

Hi Mallinath,

Thank you for the reply.

Can you specify which parameters are mandatory ?

I tried running the BAPI with the following input parameters, but it does not work.

How do you specify the 'via Delivery' option ?

GOODSMVT_HEADER        

PSTNG_DATE                           

DOC_DATE                             

REF_DOC_NO                          

HEADER_TXT

GM CODE = 06        (not sure about this ?)         

GOODSMVT_ITEM         

MATERIAL                               

PLANT                                

STGE_LOC                              

MOVE_TYPE     (I am using a 122)                          

ENTRY_QNT                                        

MOVE_REAS          

REF_DOC_YR                            

REF_DOC    (my reference material document)

Any suggestions ?