2013 Jan 21 7:21 PM
I have one problem in my module-pool program, I have created a module-pool program to represent DMS documents similar to CV04N tcode. but the problem is the document type which I have showing, have some classification values(characteristics) and I am using this FM: BAPI_OBJCL_CHANGE to update/delete the characteristics. I am able to update/delete all characteristics values except for one field that is KUNNR value. when I pass an empty value the characteristic value is getting deleted, but not for this field. please provide me the solution. is there any other function modules?
code:
**** call BAPI to save changes in DB ***
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = lv_obj_key
objecttable = 'DRAW'
classnum = lv_class_num
classtype = lv_class_typ
status = '1'
keydate = sy-datum
TABLES
allocvaluesnumnew = lt_classi_num
allocvaluescharnew = lt_classi_char "here Iam populating the values
allocvaluescurrnew = lt_classi_curr
return = lt_return.
2013 Jan 21 7:46 PM
hello,
I hope you are appending zeroes before the kunnr field. Also if possible provide the error message that you get when you use kunnr field.
best regards,
swanand
2013 Jan 22 4:11 AM
Hi Swanand,
my problem is only in the case of Deleting the value. The FM documentation says if you provide empty value means deleting the existing characteristic value, so i am passing an empty value. It is working fine for reaming values.
and the RETURN parameter contains this messages
Regards,
Srikanth
2013 Jan 22 5:43 AM
Hi Srikanth,
Can you check your Commit Statement work? because i also test your scenario but unfortunately i missing commit statement , i got Success MSG what MSG you also shown your screen shot but value is not delete , then i again check and find BAPI_TRANSACTION_COMMIT is missing in my code .
Please Check once .
R u Update/Delete Standard Class Characteristics Value ? if 'Y' then pass 'STANDARDCLASS' = 'X' .
Regard's
Smruti
2013 Jan 22 9:46 AM
Hi Smruti,
I have used "BAPI_TRANSACTION_COMMIT" after the FM calling, and checked with STANDARDCLASS' = 'X' parameter still it is not working..
Regards,
Srikanth
2013 Jan 22 10:19 AM
Hi Srikanth,
Please check this Note :
Note 658035 - Value change using BAPI BAPI_OBJCL_CHANGE not possible.
"A characteristic has a check table defined as an input check and there is a conversion exit for this characteristic. Under some circumstances, this can result in failure to carry out a value change."
and you try to change "KUNNR" (Customer number)
which have Convers. Routine plz check SE11-->Data type (KUNNR)-->Domain Defination Tab check "Convers. Routine"
Regard's
Smruti
2013 Jan 22 10:53 AM
then how can I delete this value? is there any other way to get this one? like FM or BAPI
regards,
Srikanth
2013 Jan 22 11:01 AM
Yes you use "CONVERSION_EXIT_ALPHA_OUTPUT" before passing the characteristics value in above BAPI .
Regard's
Smruti