product hierarchy (MVKE-PRODH).
This issue is not yet solved . Please give me a clue to solve the same.
(MM02) When the material level hierarchy (MARA-PRDHA) is updated on the Basic Data 1 view of the material master, upon saving the system should find all the sales organisations (sales org 2 TAB)n material and update the product hierarchy (MVKE-PRODH).
For this I wrote a piece of code in the exit u2026zxmg0u02 which is in FM : EXIT_SAPLMGMU_001
select single PRDHA from mara into v_PRDHA where matnr = wmara-matnr.
if v_PRDHA NE wmara-PRDHA.
t_mara-MANDT = wmara-MANDT.
t_mara-matnr = wmara-matnr.
t_mara-PRDHA = wmara-PRDHA.
t_mara-tcode = 'MM02'.
SELECT matnr VKORG VTWEG
FROM mvke into CORRESPONDING fields of table t_mvke
WHERE matnr = wmara-matnr.
IF sy-subrc = 0.
loop at t_mvke.
t_mvke-PRODH = t_mara-PRDHA.
modify t_mvke from t_mvke index sy-tabix.
IMPORT V_FLAG FROM MEMORY ID 'Z_FLAG'.
IF V_FLAG IS INITIAL.
CALL FUNCTION 'MATERIAL_MAINTAIN_DARK'
P_KZ_NO_WARN = 'W'
KZ_PRF = 'E'
AMARA_UEB = t_mara
AMVKE_UEB = t_mvke
KSTATUS_EMPTY = 1
TKSTATUS_EMPTY = 2
T130M_ERROR = 3
INTERNAL_ERROR = 4
TOO_MANY_ERRORS = 5
UPDATE_ERROR = 6
OTHERS = 7
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*COMMIT WORK AND WAIT.
V_FLAG = 'X'.
EXPORT V_FLAG TO MEMORY ID 'Z_FLAG'.
But the Function Module -MATERIAL_MAINTAIN_DARK is recessively calling the exit .
Please correct if this is not the right way to solve the requirement.
suggest the best.