Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to delete DMS characteristic value in module-pool program using BAPI

srikanth_d4
Participant
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

then how can I delete this value? is there any other way to get this one? like FM or BAPI

regards,

Srikanth

0 Kudos

Yes you use "CONVERSION_EXIT_ALPHA_OUTPUT"  before passing the characteristics value in above BAPI .

Regard's

Smruti