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

Multiple Reversal using BAPI_GOODSMVT_CREATE

kirankerudi
Active Participant
0 Likes
1,931

hello,

Can anyone explain the logic behind multiple reversal ?

I'm using the bapi BAPI_GOODSMVT_CREATE with gm_code = 01 and movement type as 102.

what fields needs to be populated ? and is material document number needed for multiple reversal ??

Thanks and Regards.

10 REPLIES 10
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,633

What error message is triggered, did you try BAPI_GOODSMVT_CANCEL?

Regards;

Raymond

Read only

0 Likes
1,633

Hi Raymond,

I have not tried it because I don't know the logic/concept behind reversal of goods movement.

If possible could you explain taking any scenario.

Using the bapi BAPI_GOODSMVT_CREATE I could do GR and get a Material Document Number.


But, GR reversal, I don't know what fields to populate. I would appreciate if you could help.

Regards,

Kiran

Read only

0 Likes
1,633

For the « logic » first read some documentation, or ask the functional on his exact requirement, e.g . currently called transaction.

Ref: Online help in Inventory Management and Physical Inventory (MM-IM), look for Goods Movement, Cancelling a Material Document and/or Return Delivery.

Regards,

Raymond

Read only

0 Likes
1,633

Hi Raymond,

Thanks for the help. The called transaction is MB01.

Also, I have a doubt. Much appreciated if you could help.

For reversal using BAPI_GOODSMVT_CREATE do I need to fetch material document number and pass it to BAPI ??

Thanks.

Kiran

Read only

0 Likes
1,633

Should not be required with BAPI_GOODSMVT_CREATE (PO number and item are sufficient) only required with BAPI_GOODSMVT_CANCEL of course.

But don't forget to post a reversal of 101 and not a 102, so in GOODSMVT_ITEM set

  • MOVE_TYPE = 101
  • XSTOB         = X

Now code, test and check RETURN table

Regards,

Raymond

Read only

0 Likes
1,633

Hi,

BAPI_GOODSMVT_CREATE is used to post material document and for reversal, BAPI_GOODSMVT_CANCEL should be used. Parameters are Material document number, Year and posting date. It is just like executing transaction code MBST. For multiple reversal, you need to call this bapi in loop.

Thanks,

Ashok Veer

Read only

0 Likes
1,633

That the reason why I asked for the actual transaction called by users.

OP answered MB01, so BAPI_GOODSMVT_CREATE , had he answered MBST,  BAPI_GOODSMVT_CANCEL. Also OP confirmed reversal and not return delivery.


Regards,

Raymond

Read only

0 Likes
1,633

Hello Raymond,

Thanks for the reply. I'm pretty sure that the called transaction is MB01.

So, I need to call BAPI_GOODMVT_CREATE and pass MOVE_TYPE as '102' right ?

If I have multiple entries in GOODSMVT_ITEM then how should I handle this ?

Do I need to set the XSAUT indicator ? ( Because it gave me an error saying enter serial numbers)

Please help !!

Thanks and Regards.

Read only

0 Likes
1,633

Hello Ashok,

Thanks for the reply. I'm writing interface for IDOC. Hence the header info that is being recieved into SAP contains transaction MB01.

So, I need to use BAPI_GOODSMVT_CREATE, right ?

Thanks and Regards,

Kiran

Read only

0 Likes
1,632

Hi Raymond,

If there is repetition of material in a Purchase Order, only first one is processed.

But second one is not considered.

How to handle this repetition which is not considered by the FM 'BAPI_GOODSMVT_CREATE' ?

Thanks,

Kiran