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: 

Calling BAPI_INCOMINGINVOICE_CREATE in MIGO t-code

Former Member
0 Kudos

Hi Gurus,

Is there any possibility to call the bapi BAPI_INCOMINGINVOICE_CREATE while creating GR(using MIGO t-code)? If yes then at which place can i call that BAPI? Is there any other function available to do this task?

The requirement is to create invoice automatically when a GR is created.

Let me know in case of any clarifications.

Thanks in advance,

Varadharajan.S

5 REPLIES 5

former_member262988
Active Contributor
0 Kudos

Hi,

Use the badi MB_MIGO_BADI method IF_EX_MB_MIGO_BADI~POST_DOCUMENT ...in this method call the program using the statement.....SUBMIT <prg name > WITH <field values> AND RETURN.

and write the logic inside the program

Thanks,

Shailaja Ainala.

0 Kudos

Hi Shailaja,

I am unable to edit the method IF_EX_MB_MIGO_BADI~POST_DOCUMENT in the class CL_EX_MB_MIGO_BADI to insert the SUBMIT statement. Is there any other alternative to achieve this?

0 Kudos

Hi,

You need to implement the badi then ......write the code in the method...

Thanks,

Shailaja Ainala.

0 Kudos

Shailaja,

I have done a new implementation called ZMB_MIGO_BADI for the badi MB_MIGO_BADI. Now while writing code in the method IF_EX_MB_MIGO_BADI~POST_DOCUMENT, shall i call the bapi BAPI_INCOMINGINVOICE_CREATE directly from the method itself or should i go for SUBMIT statement & then call the bapi from that z-program?

Edited by: Varadharajan S on Jan 29, 2010 4:19 AM

0 Kudos

Hi,

Directly you can create but the thing is that if at all you are using the document number just create from migo .....then you cant use that directly because the commit for migo does not happen still..then go for submit..else if its just another data which is been send to the bapi you can use...in the method ...directly

Thanks,

Shailaja Ainala.