‎2008 Jan 15 3:23 AM
Hi All,
When the material is created via MM01, depending upon the specific class, characterstic values, the material long text is updated.
My requirement is, is there any FM or BAPI which can give me the values of the class and characters which are in Buffer. I am using the user exit present for MM01 transaction to do this.
Please help on how to retrive characterstic values which are in buffer.
Reagrds,
Shahu
‎2008 Jan 15 5:05 AM
Hi,
Check this sample code, if it helps. Also the BAPI is well documented. If you have any question regarding parameter, please have a look at the documentation.
DATA: begin of lt_valchar OCCURS 0.
include structure BAPI1003_ALLOC_VALUES_CHAR.
data: end of lt_valchar.
DATA: gt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
p_matnr LIKE BAPI1003_KEY-OBJECT,
OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
objectkey = p_matnr
objecttable = 'MARA'
classnum = 'CL000099' " Give Class number
classtype = '001' " Give Class Type
keydate = sy-datum
TABLES
allocvaluesnum = lt_valnum
allocvalueschar = lt_valchar
allocvaluescurr = lt_valcurr
return = gt_return.
Regards
‎2008 Jan 22 9:36 PM
It was not possible to get the characterstic values immidiately in the user exit while material creation. Hence used event material creation to get the values and update the long text.