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

Problem with BAPI_ALM_NOTIF_DATA_ADD

Former Member
0 Likes
2,297

Hi All,

I am trying to add task to a PM notification through BAPI_ALM_NOTIF_DATA_ADD but am getting error as "Not a Valid Assembly" in the message table. But if I try to add the same damage through IW22 its working fine.

Please let me know where am I going wrong. Below is the code that am using.

A_NOTITEM-ITEM_KEY = '0001'.

WA_NOTITEM-ITEM_SORT_NO = '0001'.

WA_NOTITEM-D_CODEGRP = 'DDR'.

WA_NOTITEM-D_CODE = 'BDBD'.

WA_NOTITEM-DL_CODEGRP = 'DDR'.

WA_NOTITEM-DL_CODE = 'WAGN'.

APPEND WA_NOTITEM TO NOTITEM.

CALL FUNCTION 'BAPI_ALM_NOTIF_DATA_ADD'

EXPORTING

NUMBER = NOTIF

  • NOTIFHEADER =

  • TASK_DETERMINATION = ' '

  • SENDER =

  • ORDERID =

  • IMPORTING

  • NOTIFHDTEXT =

  • NOTIFHEADER_EXPORT =

TABLES

  • NOTFULLTXT =

NOTITEM = NOTITEM

  • NOTIFCAUS =

  • NOTIFACTV =

  • NOTIFTASK =

  • NOTIFPARTNR =

  • KEY_RELATIONSHIPS =

RETURN = MSG

.

Thanks in Advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,447

Hi,

For the notification for which you are able to add the damage, check the VIQMEL-BAUTL value. You have to give the value for assembly while it gets determined in IW22. Also, I don't see a assembly value in the structure.

Hope it helps.

Sujay

6 REPLIES 6
Read only

Former Member
0 Likes
1,448

Hi,

For the notification for which you are able to add the damage, check the VIQMEL-BAUTL value. You have to give the value for assembly while it gets determined in IW22. Also, I don't see a assembly value in the structure.

Hope it helps.

Sujay

Read only

Former Member
0 Likes
1,447

Hi Sujay,

Thanks for the response.

The VIQMEL_BAUTL value is blank for the notification for which am trying to add the damage. But still am able to add the damage through IW22 but not through the BAPI.

Please help.

Read only

Former Member
0 Likes
1,447

Hi,

If there are already items exist, give item number accordingly. Also, Try giving only the D_CODEGRP and the D_CODE instead of DL_CODEGRP and DL_CODE.

Also, Check for the values in the table VIQMFE for the corresponding entries saved using IW22.

Hope it helps.

Sujay

Read only

Former Member
0 Likes
1,447

Hi Sujay,

Giving only the D_Code and D_COdeGrp also did not work and I still have the same problem "Not a valid assembly". I checked the values being updated in VIQMFE and the values am passing seems to be sufficient.

Please help.

Thanks

Read only

Former Member
0 Likes
1,447

Hi,

The problem was due to the type of the internal table I was using that is BAPI2080_NOTITEME instead of BAPI2080_NOTITEMI.

Issue is resolved. Thanks for all your reply and apologies for a bugging with a wrong question.

Thanks,

Read only

0 Likes
1,447

Hi all,

I need to update with tasks for a notification in IW52. Can i use the same BAPI? i am facing a issue while updating long text for particular task. Can anybody suggest me on this.

Thanks in advance.