05-05-2009 8:02 AM
hi all,
i made an Implementation for BADI 'BADI_GTIN_VARIANT' for tcode MM01 for making default value '03' in view 'sales organization1' during material creation, but problem is that value is coming during debug but it is not showing on screen, so can anyone please help me?
i m writing code :
if sy-tcode = 'MM01'.
mara-mstav = '03'.
endif.
regards saurabh.
Edited by: saurabh srivastava on May 5, 2009 9:23 AM
05-05-2009 9:35 AM
hello ,
the problem is that ur changing the import parameter and that is the problem
MARA is the import paramter u can just use it u cannot modify it i,e u cannot change it
and the code u use is
if sy-tcode = 'MM01'.
mara-mstav = '03'.
in debug u can change it bu tas it is import parameter the method cannto change it so it is not reflected even though u have implemented it , so try some other alternate way
hope it solves ur problem
afzal
05-05-2009 9:35 AM
hello ,
the problem is that ur changing the import parameter and that is the problem
MARA is the import paramter u can just use it u cannot modify it i,e u cannot change it
and the code u use is
if sy-tcode = 'MM01'.
mara-mstav = '03'.
in debug u can change it bu tas it is import parameter the method cannto change it so it is not reflected even though u have implemented it , so try some other alternate way
hope it solves ur problem
afzal
05-05-2009 9:53 AM
hi thanx for reply,
so can u tell me that which export parameter shud i paas? can u plzz modify my code?
regards saurabh.
05-05-2009 10:05 AM
hai saurabh,
the badi is for User Exit for Customer-Specific GTIN Variant Check
u can check only the GTIN Variant check thrugh it and u can modify it as it is changing paramter
and the fields of MARA u cant change u have to either search other user exit or badi for doign the same
u can use field exit for the same if it exists else create a field exit for the same
u can search for field exits and u get lot of help on sdn
regards
afzal
05-05-2009 11:42 AM
HI,
Why dont u try witha different Bapi. Implement the Bapi BADI_MATERIAL_REF.
METHOD IF_EX_MATERIAL_REFERENCE~CREATE_MATERIAL.
IF SY-TCODE = 'MM01'.
E_MARAU-MSTAV = '03'.
ENDIF.
ENDMETHOD.
Also add the field E_MARAU-MSTDV value if its mandatory.