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: 

How to add a new additional field in MIGO

former_member143179
Participant

Dear Sir,

As a business requirement , we are required to capture some additional information related to Material packing /sizes at the time of MIGO . This information need to be captured /input at the Item level during the MIGO .

We request sap gurus , to kindly guide as what steps need to be followed for adding a new field and also will it require a Z-table also to save the data pertaining to new added field .

Regards

B Mittal

1 ACCEPTED SOLUTION

martin_voros
Active Contributor

Hi,

there is BADI MB_MIGO_BADI which is suitable for your requirement. You can add a new tab on the header level as well as on the item level. So you will add new tab where you will put additional input fields. Just go to SE18, enter name of the BADI and then in menu go to Display -> Sample Code (I do not have access to SAP system so it can be slightly different). It is really helpful code example for implementing this BADI. Or look for this BADI here on SDN.

It is up to where you will store your additional data, you can choose a new Z table or you can add some new fields into standard SAP tables.

6 REPLIES 6

martin_voros
Active Contributor

Hi,

there is BADI MB_MIGO_BADI which is suitable for your requirement. You can add a new tab on the header level as well as on the item level. So you will add new tab where you will put additional input fields. Just go to SE18, enter name of the BADI and then in menu go to Display -> Sample Code (I do not have access to SAP system so it can be slightly different). It is really helpful code example for implementing this BADI. Or look for this BADI here on SDN.

It is up to where you will store your additional data, you can choose a new Z table or you can add some new fields into standard SAP tables.

Former Member
0 Kudos

Hi,

you have to go to SE19, create a new implementation with the standard definition MB_MIGO_BADI.

Go to the example code and modify it as you need.

Change the custom class automatically created, create a Function pool in copy of the standard MIGO_BADI_EXAMPLE and change it with your custom FM, custom tables to store your data.

The standard tables in which the data are stored in the example code are: MIGO_BADI_EXAMPL and MIGO_BADI_EXAMP2: you have to create yours as copy of them.

I've just done it and it works!!

Hope this helps

Regards

AP

0 Kudos

Hi,

Can we have our custom field on the table grid in MIGO? I did some changes in the screen 0200, added field to GOITEM structure as an append, did changes in PROCESS_ITEM method of my implementation and when start MIGO transaction and typed material number the system returns me a warning message: BADI: You are not allowed to change the content of the field GOITEM-ZZGROES.

Where is the problem ?

We kindly request you for assistance !

Stefan

0 Kudos

Hi ,

Create a BADI implementation for MB_MIGO_BADI .

Create a program with the screen type sub-screen in SE80 and design the layout for the custom fields.

Declare the custom fields in a Z**TOP include.

Under the PBO method declare the program name and screen number as shown below:

gf_class_id = 'MIGO_BADI_IMPLEMENTATION_CIN'

e_cprog = <program name>

e_dynnr = <screen number>.

e_heading = <heading>

Under PAI method declare the field to u2018Xu2019.

e_force_change = 'X'.

Under the line modify method declare a flag and set to u2018Xu2019 checking for material document number by which we can set the fields to be in display mode when we open MIGO for display of material document created after doing goods receipt.

Under the POST_DOCUMENT method write the code for appending the value to Z table along with the values of the line item .For these values to be available here in this method use the memory concept u201CExport to memory idu201D in the method LINE_MODIFY.

In order to do any validations to the custom fields, go to transaction SE80 and mention the program Name created and in PROCESS ON VALUE_REQUEST create a module and provide the validations required for those custom Fields.

order to make the fields to be in display mode during the display of material document, create a module under PBO and import the flag value in the method LINE_MODIFY and if that flag = u2018Xu2019, use

LOOP AT SCREEN.

IF SCREEN-NAME = <NAME>.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Retrieve the values from the Z table matching the key field (production order number) and pass the value of the custom field on to the screen.

Thanks,

Shailaja Ainala.

Former Member
0 Kudos

Hi,

To find user exits and screen exits, go to MIGO and get the development class.

Goto SMOD, press F4 in Enhancement field and put develpment class there.

You will get the list of all the exits there.

Here see whether the relevent screen exit is present or not. For implementing it generally documentation is provideed in SMOD.

If not then search in OSS notes for the enhancement.

regards,

Gaurav

Former Member
0 Kudos

hi mittal,

u can hav custom screen in migo using this badi.

MB_MIGO_BADI - BAdI in MIGO for External Detail Subscreens.

And regarding the updation you can use a Z-table or standard table for the Updation.

Hope its clear to you,

Reward points if usefull,

Thanks,

Kalyan.