Application Development and Automation 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: 
Read only

Update characteristic data for material

sri6666
Active Participant
0 Likes
3,910

Hi experts,

When I am using bapi_objcl_change for Update characteristic data for material . Bapi return like assignment changed. But when I checked in VCH2 transaction for material characteristics values are not appear. Please help me.

Hi experts,

When I am using bapi_objcl_change for Update characteristic data for material . Bapi return like assignment changed. But when I checked in VCH2 transaction for material characteristics values are not appear. Please help me.

10 REPLIES 10
Read only

Patrick_vN
Active Contributor
0 Likes
3,317

You're using the BAPI TRANSACTION COMMIT after the BAPI to change your characteristic data, right?

Read only

sri6666
Active Participant
0 Likes
3,317

Yes.. i used same

Read only

OlegBash
Active Participant
0 Likes
3,317

After calling function BAPI_OBJCL_CHANGE you need to call function BAPI_TRANSACTION_COMMIT if the result from BAPI_OBJCL_CHANGE is successful or BAPI_TRANSACTION_ROLLBACK if the result from BAPI_OBJCL_CHANGE is not successful.

Read only

sri6666
Active Participant
0 Likes
3,317

Yes, i call the bapi_transaction_commit . But still VCH2 not show's characteristic values for material. Even bapi return success message.

Read only

OlegBash
Active Participant
0 Likes
3,317

the BAPI distinguish between types of data:

1) char-type characteristics
2) numeric-type
3) currency type

For each type there is its own table-parameter - pay your attention that you put it in correct parameter. Also pay attention to the objectkey and objecttable parameters.

The best way to check whether it is correct would be try to read the characteristcs by bapi BAPI_OBJCL_GETDETAIL

Read only

sri6666
Active Participant
0 Likes
3,317

Yes, i am using get detail Bapi to get all values and pass the values to change bapi and commit bapi. And it's return assignment saved message. But I am not able see the values in VCH2. Are you able to see.

Read only

Abinathsiva
Active Contributor
0 Likes
3,317

Please Check Transaction commit triggered based on sy-subrc

Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
3,317

Hello sri6666

Besides the BAPI you might consider using APIs for Logistics to handle classification.

API for classification names start with CACL_ ; they are in the CACL function group - List of Available APIs

Personally I find this APIs very useful and I prefer them over BAPIs.

Best regards

Dominik Tylczynski

Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,317

So

  • You called BAPI_OBJCL_CHANGE
  • You checked that there are no error in RETURN (type EAX)
  • You called BAPI TRANSACTION COMMIT

Could you

  • check the validity dates of class
  • check SM13 for for possible errors or processing still in progress (when tables which stores the classification data like AUSP and KSSK contains too much data)
  • Call VCH3 first (so not requiring a lock)
Read only

sri6666
Active Participant
0 Likes
3,317

Any other input experts,

I tried with all your input and bapi return with success message. But not updated the values in VCH2 transaction.

Let me know any other process for VCH1 and VCH2. Bapi solution provided by sap support team only along with 2577370 and 2588972 oss notes implementation