0% found this document useful (0 votes)
379 views4 pages

BADI Implementing Screen MIGO

This document provides instructions for adding custom fields to transaction MIGO in SAP. It involves: 1. Creating a BADI implementation to add a new tab for custom fields. 2. Designing a sub-screen layout for the custom fields and declaring them in a Z table include. 3. Writing code in various screen events like PBO, PAI, and POST_DOCUMENT to display, save, and retrieve the custom field values from the Z table. 4. Adding validations to the custom fields using a PROCESS ON VALUE_REQUEST module.

Uploaded by

Lindiawati
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
379 views4 pages

BADI Implementing Screen MIGO

This document provides instructions for adding custom fields to transaction MIGO in SAP. It involves: 1. Creating a BADI implementation to add a new tab for custom fields. 2. Designing a sub-screen layout for the custom fields and declaring them in a Z table include. 3. Writing code in various screen events like PBO, PAI, and POST_DOCUMENT to display, save, and retrieve the custom field values from the Z table. 4. Adding validations to the custom fields using a PROCESS ON VALUE_REQUEST module.

Uploaded by

Lindiawati
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Implementing Screen-exit for transaction MIGO

Requirement:  

Add new Tab to MIGO and store the custom values in a Z table, as there is no provision for adding
custom fields in MSEG table except for Accounting details by Standard Include (CI_COBL). 

Solution:

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:

Under PAI method declare the field to ‘X’. 

Under the line modify method declare a flag and set to ‘X’ 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 (In this case production order number, material, …….). For these values to
be available here in this method use the memory concept “Export to memory id” 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. 

In 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 and the production order number details in the method
LINE_MODIFY and if that flag = ‘X’, use  

LOOP AT SCREEN.
IF SCREEN-NAME = 'ZZGBAGS'.
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. 

ZZBAGS = (fetched value from Z table). 

Following is the transaction with the custom field: 


 

You might also like