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

BAPI_ALM_NOTIF_DATA_MODIFY - Equipment not cleared

Former Member
0 Likes
1,521

Hi Forum,

I'm experiencing an error with the use of BAPI_ALM_NOTIF_DATA_MODIFY. I have a program where there could be a possibility to delete the equipment from an existing service notification. But the bapi doesn't work fine beacuse since I'm not getting error from return table the equiment is not cleared properly. The code I have implemented is the following. All suggestions are precious.

Thanks.

PARAMETERS p_qmnum LIKE qmel-qmnum.

DATA wa_header TYPE bapi2080_nothdre.

DATA wa_header_c TYPE bapi2080_nothdri.

DATA wa_header_cx TYPE bapi2080_nothdri_x.

DATA t_return TYPE STANDARD TABLE OF bapiret2.

DATA wa_return LIKE LINE OF t_return.

DATA wa_header_ex TYPE bapi2080_nothdre.

CALL FUNCTION 'BAPI_ALM_NOTIF_GET_DETAIL'

EXPORTING

number = p_qmnum

IMPORTING

notifheader_export = wa_header.

MOVE-CORRESPONDING wa_header TO wa_header_c.

wa_header_cx-equipment = 'X'.

wa_header_c-equipment = ' '.

CALL FUNCTION 'BAPI_ALM_NOTIF_DATA_MODIFY'

EXPORTING

number = p_qmnum

notifheader = wa_header_c

notifheader_x = wa_header_cx

IMPORTING

notifheader_export = wa_header_ex

TABLES

return = t_return.

CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'

EXPORTING

number = p_qmnum

  • IMPORTING

  • NOTIFHEADER =

  • TABLES

  • RETURN =

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

  • IMPORTING

  • RETURN =

.

Edited by: Salvatore Bruno on Feb 6, 2012 9:54 AM

Hi Forum,

I'm experiencing an error with the use of BAPI_ALM_NOTIF_DATA_MODIFY. I have a program where there could be a possibility to delete the equipment from an existing service notification. But the bapi doesn't work fine beacuse since I'm not getting error from return table the equiment is not cleared properly. The code I have implemented is the following. All suggestions are precious.

Thanks.

PARAMETERS p_qmnum LIKE qmel-qmnum.

DATA wa_header TYPE bapi2080_nothdre.

DATA wa_header_c TYPE bapi2080_nothdri.

DATA wa_header_cx TYPE bapi2080_nothdri_x.

DATA t_return TYPE STANDARD TABLE OF bapiret2.

DATA wa_return LIKE LINE OF t_return.

DATA wa_header_ex TYPE bapi2080_nothdre.

CALL FUNCTION 'BAPI_ALM_NOTIF_GET_DETAIL'

EXPORTING

number = p_qmnum

IMPORTING

notifheader_export = wa_header.

MOVE-CORRESPONDING wa_header TO wa_header_c.

wa_header_cx-equipment = 'X'.

wa_header_c-equipment = ' '.

CALL FUNCTION 'BAPI_ALM_NOTIF_DATA_MODIFY'

EXPORTING

number = p_qmnum

notifheader = wa_header_c

notifheader_x = wa_header_cx

IMPORTING

notifheader_export = wa_header_ex

TABLES

return = t_return.

CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'

EXPORTING

number = p_qmnum

  • IMPORTING

  • NOTIFHEADER =

  • TABLES

  • RETURN =

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

  • IMPORTING

  • RETURN =

.

Edited by: Salvatore Bruno on Feb 6, 2012 9:54 AM

5 REPLIES 5
Read only

Former Member
0 Likes
1,236

Anyone who can help me?

Thanks.

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,236

Have you tried using BAPI_ALM_NOTIF_DATA_DELETE?

What is exact error message along with message class and number you are getting..?

Nabheet

Read only

0 Likes
1,236

Hi nabheetmadan09,

thank you for your answer.

the BAPI BAPI_ALM_NOTIF_DATA_DELETE doesn't manage deletion data from header and unfortunately the system doesn't give me any error... the return table is empty and the save and commit work both work fine.

Moreover I was able to try the program above on 2 differen systems: Ona has ECC 600 EHP 4 and the other one has ECC 600 EHP 5. In both the code doesn't return errors but the equipment remains has not been deleted.

Edited by: Salvatore Bruno on Feb 14, 2012 11:35 AM

Read only

Former Member
0 Likes
1,236

Hi,

May be are missing some mandatory parameters in the BAPI s, check them i hope it may resolve your issue.

Regards,

Goutam Kolluru.

Read only

0 Likes
1,236

SAP has answered me that Using BAPI is possibile to delete the equipment if the field SERIAL NUMBER is cleared as well because the BAPI is more restrictive than the interactive use.

I have to make some tries but I close this message as answered due to SAP response.