SAP MM : Automatically Populate SGTXT in MIGO
-
Upload
balanathan-virupasan -
Category
Documents
-
view
1.202 -
download
11
description
Transcript of SAP MM : Automatically Populate SGTXT in MIGO
Automatically Populate “SGTXT” in MIGO
SAP has provided standard user exit EXIT_SAPMM07M_001 (Enhancement MBCF0002) to Populate Material Document item text (SGTEXT) automatically.
Step 1 : Create Enchantments Project in “CMOD”
Step 2 : Assign Enhancement “MBCF0002” to Newly Created Project
Step 3 : Activate The Component
Step 3 : Add the required Code in the Include in Function Exit (EXIT_SAPMM07M_001)
Example ABAP Code
IF I_MSEG-KZVBR = 'V' and I_MSEG-BWART = '101'. e_sgtxt = i_dm07m-maktx.ELSEIF I_MSEG-BWART = '201' and i_mseg-sgtxt is initial. e_sgtxt = i_dm07m-maktx. ELSE. e_sgtxt = i_mseg-sgtxt.ENDIF.
Code Explanation :
IF Movement Type is 101 and Posting is Consumption
Copy Material Short text to SGTEXT Field in Material Document Item
Else IF Movement Type is 201 and SGTEXT is Initial (Empty)
Copy Material Short text to SGTEXT Field in Material Document Item