SAP MM : Automatically Populate SGTXT in MIGO

3
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

description

SAP Material Management Enchanment to Automatically Populate SGTXT in MIGO.

Transcript of SAP MM : Automatically Populate SGTXT in MIGO

Page 1: 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

Page 2: SAP MM : Automatically Populate SGTXT in MIGO

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.

Page 3: SAP MM : Automatically Populate SGTXT in MIGO

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