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

MIGO batch modify check

Former Member
0 Likes
2,342

Hello everyone,

My requirement is related to the batch field in MIGO.

When we run MIGO for goods receipt outbound delivery a batch is determined and displayed in the batch tab.

I need to disable i/p for batch field. i searched the forum for this but i guess setting batch in non-editable mode is not possible w/o the use of enhancement.

So i have decided to display an error message if the batch is changed.

I believe BADI MB_MIGO_BADI method LINE_MODIFY will suffice my requirement. Can someone help me figure out the right way to go about it.

Any help would be appreciated.

Regards,

Xineohpi.

8 REPLIES 8
Read only

former_member16553
Active Participant
0 Likes
1,689

Hi

     I think this should be done by customization, So please ask your Functional Consultant to do this.

Read only

0 Likes
1,689

I checked that. However, this check can not be implemented for all scenarios. The check will be based on certain material types and other logic.

Read only

0 Likes
1,689

Hi

     Then do this with screen variant tcode SHD0 or implement any enhancement.

Read only

Former Member
0 Likes
1,689

Hi

I think you can do this by creating a screen variant SHD0 Simply.No requirement to implement a BADI  .

Regards

Ajit

Read only

0 Likes
1,689

Thanks for ur reply but I was instructed using screen variants on MIGO is not the best of solutions...

Read only

0 Likes
1,689

my dear friend,

   Screen Variant option given by sap to use it and it is better for your requirement.the badi  you are going to implement is not for that purpose.and implementing badi for such purpose not a good idea.

You have another option that sap provide there Enhancement option You can use it.

Regards

Ajit

Read only

Former Member
0 Likes
1,689

I really appreciate your suggestions.

But I have established that i can not use screen variant and i do not wish to use enhancements because modifying standard code will be my last resort. Since i have a badi which can suffice my requirement, i would like to try my luck with it first...

Now i know the badi, the only problem is i do not have an indicator to indicate change on the field or a new and old internal table. i am trying to figure out a solution for this.

Regards,

Xineohpi

Read only

former_member189779
Active Contributor
0 Likes
1,689
Hello,
Generally while doing MIGO batch gets created by FM VB_CREATE_BATCH. Batch only gets created when you post the MIGO document.
Check when the batch is changed manually does it also changes the buffer values? These buffer values are generally avialable globally.
Also check VB_CHANGE_BATCH and
    call function 'VB_BATCH_READ_BUFFER_DB'
      exporting
        matnr            = ymcha-matnr
        werks            = ymcha-werks
        charg            = ymcha-charg
        read_from_buffer = x
      importing
        batch_buffer     = mcha_old
        rc_batch_buffer  = subrc.
When you do Item OK and and press on "Check" you get pop up saying batch is created. You can naviagte from message where used list to find out from where this message is coming and which FMs are called. Also there are many enchancement points available during above FMs as well to check if batch is changed.
Hope this helps.