Hi Jerome
I thought the issue was that the description names brought back more matches than you needed.
The BAPI uses the SAP field name, not the description, so it's always unique and always finds the right one to update/set.
In CT04 you'll see the field name and description

From your screen shot, you're showing the descriptions, not the field names.

If you go into the tcode, position your cursor on a characteristic description and hit F1, it will pull up the characteristic in display mode


There you will find the Characteristic field name - in my case SK-RECTIFIERTYPE.
Note that BAPIs are case sensitive, so please use the right case for those field names.
FYI
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle NA
------------------------------
Original Message:
Sent: 03-03-2021 08:51
From: jerome gaden
Subject: MM02 CLASSIFICATION VIEW UPLOAD ISSUE
Dear all,
Thanks for your time and support i would never have found the logic alone regarding the BAPI script provided.
But i still get an error with, (object does not exist assignment was not created, despite object exist).
I have used the recommandations from Sigrid/Jan (as i'm not allowed to use T-code CLMM) about script and template and just replaced by the value i need for the loop. I'm not sure about the classnum field and/or how to proceed to be close from your solution. You will find attached screen shoot in order to compare yours and mine. Many thanks for your feedbacks.
Best regards
------------------------------
jerome gaden | [Logistic analyst]
Atlas Copco Power Tools Distribution N.V. | +33 02.40.80.20.63
Original Message:
Sent: 03-02-2021 08:27
From: Sigrid Kok
Subject: MM02 CLASSIFICATION VIEW UPLOAD ISSUE
Hi Jerome
There is a transaction script template here: https://community.winshuttle.com/sap-module-templates/viewdocument/change-material-class-001-charact?CommunityKey=8a12989f-fefe-4b81-8147-4bbb11af6820&tab=librarydocuments
However if the character description (which is what you see in the tcode) does not allow you to find a unique row, a BAPI might be better, as Jan suggested.
The BAPI will use the characteristic field name instead of the description to find the right row to change, which is always unique. The only difficulty is that SAP wants to load numeric and character values separately. So I used an IF statement and additional field that had a flag sharing which data type was being uploaded.
Reattaching the example here.
Best Regards,
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle NA
Original Message:
Sent: 02-26-2021 13:12
From: jerome gaden
Subject: MM02 CLASSIFICATION VIEW UPLOAD ISSUE
Hello Te@m,
Need your help regarding script mm02 for Characteristic modification in view Classification.
Normally the script below attached work well for a single value with a unique characteristic description.
But i have many description that are very close in terms of designation and it require a new window with selection during the mapping selection (screenshoot attached)
How i can fix that with my script or with the relevant settings needed for this kind of situation
Many thanks for your help/support
Best regards
------------------------------
jerome gaden | [Logistic analyst]
Atlas Copco Power Tools Distribution N.V. | +33 02.40.80.20.63
------------------------------