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: 

BADI for batch management check box in purchase view of MM01, MM02 to be enabled always.

dineshs
Explorer
0 Kudos

Hi Team,

Need your help to find the BADI spot for batch management check box in purchase view of MM01, MM02 to be enabled always.

I already used "BADI_MATERIAL_REF" and I gave 'X' in the MARA-XCHPF and pressed the F8 key and the Check box is not getting checked.

The requirement is should enable the batch management check box when ever MM01, MM02 is used.

Please suggest....

6 REPLIES 6

former_member513101
Active Contributor
0 Kudos

Hi Dinesh,

Try SMOD: MGA00001. Field CMARA-XCHPF = 'X' If you want to default it.

Thanks

0 Kudos

Hi,

Greetings,

Thanks for your replay KK Lam,

I have tried debugging by placing break-point.

But the spot is not triggered in enhancement MGA00001.

Used exit: EXIT_SAPLMGMU_001.

And i have also directly declared the value CMARA-XCHPF = 'X' but the batch management check box in MM01 is not checked.

Please suggest any alternative....

I also tried in below mentioned EXITS..

MGA00001, MGA00002, MGA00003...

Is there any possibility to find the enhancement spot when we check the Batch management check box in MM01.

Cause I have been checking for that functionality.

Need help to resolve this issue....

Regards,

Dinesh.S

0 Kudos

Hi Dinesh,

Did you activated it with CMOD after you putting the code in SMOD?

Thanks

0 Kudos

I have checked in CMOD and activated the same after putting the code in SMOD..,

But I am not getting the Batch management box checked.

Below is the code written in "Include ZXMG0U02. in EXIT_SAPLMGMU_001 under MGA00001"

CODE:

if cmara-xchpf = ' '.

cmara-xchpf = 'X'.

message 'Batch management' type 'S'.

endif.

0 Kudos

Hi Dinesh,

You can debug it why it is not passing value to this change value. Please check the material code CMARA-MATNR also before you update the batch management indicator.

Thanks

JL23
Active Contributor
0 Kudos

It pretty much depends on the batch level whether you can use MARA-XCHPF or have to use MARC-XCHPF

The BADI has a coding example for a MARA field. Just go SE18 enter the BADI BADI_MATERIAL_REF, click display, then select Goto > coding example from the menu, double click the method IF_EX_MATERIAL_REFERENCE~CREATE_MATERIAL