cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Add damage text to create work notification

Former Member
0 Likes
558

I have an MII transaction which creates a work order notification and I want to add a text code to indicate the source of the Notification. I can see that under the Item area on SAP (IW22) there is a field which allows text to be entered (Screen shot attached). Through SAP I have successfully input and saved some text (without entering any Cause or Damage information) and I want to do the same thing through my MII transaction. I can see the xml from the notification created through SAP (in attachment), which shows the entered text in the DESCRIPT field of the NOTITEM section, and I am explicitly setting the NOTITEM fields in BAPI_ALM_NOTIF_CREATE, as per the attached:

ITEM_SORT_NO = "0001"

DESCRIPT = "Quality Incident"

I have tried it both with and without setting the ITEM_KEY to "0001" (I was creating DAMAGE information in the same Item section before without setting this).

I can set the CAUSE and DAMAGE information in the same NOTITEM section successfully through the same MII transaction but it does not seem to update the DESCRIPT field.

Please can someone confirm if the BAPI does not update this field or am I doing something wrong?

I am using MII v12.1 and SAP ECC 6.0

Many thanks

Richard Peters

Accepted Solutions (0)

Answers (2)

Answers (2)

salvatore_castro
Product and Topic Expert
Product and Topic Expert
0 Likes

I think you are after the "LONG_TEXT" field in the BAPI Request that you need to map this description to.

Sam

Former Member
0 Likes

Thanks for your reply, Sam, but I think this is a problem in my code which means I am not passing the value I think I am passing. I will find it and resolve. I should have tried it directly through the workbench before raising it here - apologies.

salvatore_castro
Product and Topic Expert
Product and Topic Expert
0 Likes

No need to apologize Richard, you can also test the BAPI operation via se37...or should I say wrap the two BAPIs with custom ABAP code and test them via SE37.  This way it will be easier to see exactly how the fields map to each directly and you can also look at the documentation in the transaction code BAPI for additional details on how they work.


Sam

Former Member
0 Likes

Richard, check the Automatically Commit Transaction Checkbox in configure if you using JCo Interface action.

Former Member
0 Likes

Padma, thanks for your reply. I am using JCo Start Session and JCo End Session since I am also releasing the notification in the same transaction. It looks like JCo Interface action does a single start session, execute function and end session in one go? I don't see a checkbox for Automatically Commit Transaction in the JCo Start Session.

Former Member
0 Likes

Okay, then you need to use SAP JCo Commit action to update.

Have you checked this thread?

http://scn.sap.com/thread/358790

Former Member
0 Likes

Yes - I am calling BAPI_ALM_NOTIF_SAVE and using a JCo SessionCommit. The transaction is creating a notification successully and returning a notification number but the NOTITEM/DESCRIPT does not seem to be picking up the text. Looking at the thread I am populating the NOTITEM fields as per the correct example. I notice in that example that there is some text being put in the DESCRIPT field so it should work. I just tried it directly through the workbench and it worked ok so it must be a problem with my code passing the parameters. Many thanks for your help and confirmation.