04-24-2009 9:00 AM
hi all,
I am using the bapi BAPI_CHARACT_CHANGE , it does append new values to the charcteritic but deletes all the previous values, is there a check or something through which we can retain the old values while adding the new one.
Thanks,
sabs
04-24-2009 9:52 AM
Hi,
Could you please let me, know for which Data you are adding the characteristic values.
Suppose if it is for Material or Batch...please follow the below process to add new characteristic values while retaining the old ones.
By using the following function module, you get the existing characteristic values into wtl_num_charac,
wtl_chr_charac and wtl_cur_charac.
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
objectkey = wvl_objectkey
objecttable = c_objtable
classnum = c_classnum
classtype = c_classtyp
keydate = sy-datum
language = sy-langu
TABLES
allocvaluesnum = wtl_num_charac
allocvalueschar = wtl_chr_charac
allocvaluescurr = wtl_cur_charac
return = wtl_return.
Append the New values which you need to update to the same internal tables wtl_num_charac,
wtl_chr_charac and wtl_cur_charac. and call the following BAPI
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = wvl_objectkey
objecttable = c_objtable
classnum = c_classnum
classtype = c_classtyp
keydate = sy-datum
TABLES
allocvaluesnumnew = wtl_num_charac
allocvaluescharnew = wtl_chr_charac
allocvaluescurrnew = wtl_cur_charac
return = wtl_return.
Suppose, if you are uploading the the Characteristic Values for MAterial then the Values of
wvl_objectkey = Material01
Objecttable = 'MARA'
classnum = 'Classnumber'
classtype = 'Classtype'.
Thanks & Regards,
Vamsi.
Edited by: Vamsi Krishna on Apr 24, 2009 10:52 AM
04-24-2009 10:24 AM
Hi,
Please go through the 'BAPI_CHARACT_CHANGE' documentation you clearly understand what is this BAPI for
04-24-2009 11:34 AM
i have gone through it i did not find a way where i can save the values whil retaining the existing values , was cheking if someone knew abt the way , the idea given by another person seems to be useful , anyways thanks