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

Need Badi/user exit-migo-update batch classification

sriram_ramesh
Participant
0 Likes
7,767

Hello all,

I need to update revision level and country of origin in batch classification tab in migo while posting GR.

I've already done using exit "EXIT_SAPLV01Z_014".

But this exit triggers only when classification tab is clicked in migo.

But i need to also update rev level and country of origin when GR is posted(Save button is pressed).

I tried MB_CF001,MB_CF001,MBCF0002,MBCF0005,MBCF0006,MBCF0007,MBCF0009,MBCF0010,MBCF0011

and badis

MB_DOCUMENT_BADI,CACL_VALUE_CHANGE.

Please someone help me

Thanks in advance

Hello all,

I need to update revision level and country of origin in batch classification tab in migo while posting GR.

I've already done using exit "EXIT_SAPLV01Z_014".

But this exit triggers only when classification tab is clicked in migo.

But i need to also update rev level and country of origin when GR is posted(Save button is pressed).

I tried MB_CF001,MB_CF001,MBCF0002,MBCF0005,MBCF0006,MBCF0007,MBCF0009,MBCF0010,MBCF0011

and badis

MB_DOCUMENT_BADI,CACL_VALUE_CHANGE.

Please someone help me

Thanks in advance

9 REPLIES 9
Read only

atul_mohanty
Active Contributor
0 Likes
4,907

Hi Sriram -

Check the user exit - exit_sapmm07m_004 for batch characteristics modification in MIGO transaction.

Hope it helps.

Let us know, in case any further info.

Regards,

Atul Mohanty

Read only

0 Likes
4,907

Hi Atul,

I've tried this.

but this include is not triggering when save button is pressed while creating GR in MIGO.

I had set breakpoint and checked.

Read only

0 Likes
4,907

Hi

Please debug the standard SAP code and check the conditions prior to User exit being called and see why the user exit is not called. The exit which I provided above is for modifying the batch characteristics.

I believe here you have two characteristics 'revision level' and 'country of origin'. correct me if I am wrong.

Read only

0 Likes
4,907

Correct.

But how do I debug the standard program and find where this exit comes?

sorry im new to ABAP

Read only

0 Likes
4,907

Hi

Go to transaction MIGO and input the details.

Then put /H in the command box and then SAVE. Then it will go debug mode and you can debug the standard program.

One more thing before doing that go to SE38 and put sapmm07m and search for  CALL CUSTOMER-FUNCTION '004' and put break point accordingly. You need check the form in which the user exit it called and the prerequisite are met or not.

Read only

0 Likes
4,907

Hi Sriram,

If you want to add logic on particular action you need to search for exact BADI.

e.g.

As you are expecting that your code need to be trigger when user press SAVE button (Time of Posting) so at that time you need to check which BADI get trigger ( I am assuming that you have knowledge on how to search BADI)

List down the BADI name and check the methods. You will get exact method name in listed BADI's.

I am hoping that while checking badi you will find MB_MIGO_BADI just check and use method [POST_DOCUMENT] for your logic.

Also in User Exit you will see multiple function modules in component those function modules are behaving like PAI and PBO. so you need to find out whcih function module will trigger as per your requirement.

please find below link which will help you to understand how to search User Exit.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0041d4e6-1e43-2e10-0db4-9386abe98...

Please let me know if its work for you.

Regards,

Nikhil

Read only

0 Likes
4,907

hi nikhil,

I'm currently using badi only. The problem with that is, we cannot use bdc there.

I'm using two bapis : BAPI_OBJCL_CHANGE for revision level update

    and BAPI_BATCH_CHANGE for country of origin update.

now my issue is, we cannot use bapi commit inside badi. so I've created an RFC for BAPI_BATCH_CHANGE bapi...

again, when i debugged this RFC having BAPI_BATCH_CHANGE bapi, at the runtime, the batch is not getting created. so I've used wait statement inside my RFC.

Now the final issue is, in MSC2N transaction, batch characteristics : revision level and country of origin are getting updated when posting MIGO. but in MIGO, when i see the GR, only revision level is getting updated but not country of origin.

Read only

sriram_ramesh
Participant
0 Likes
4,907

No one has a solution for this?

Read only