Application Development 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: 

BAPI_ALM_NOTIF_DATA_MODIFY does not change short text

former_member267947
Participant
0 Kudos

Hi all

I am trying to use BAPI_ALM_NOTIF_DATA_MODIFY as following:


REPORT zam_order_maintain.
DATA lt_notlongtxt TYPE STANDARD TABLE OF bapi2080_notfulltxte.
DATA lt_notitem TYPE STANDARD TABLE OF bapi2080_notiteme.
DATA lt_notifcaus TYPE STANDARD TABLE OF bapi2080_notcause.
DATA lt_notifactv TYPE STANDARD TABLE OF bapi2080_notactve.
DATA lt_notiftask TYPE STANDARD TABLE OF bapi2080_nottaske.
DATA lt_notifpartnr TYPE STANDARD TABLE OF bapi2080_notpartnre.
DATA lt_return TYPE STANDARD TABLE OF bapiret2.
DATA lt_extensionout TYPE STANDARD TABLE OF bapiparex.
DATA ls_notifheader_export TYPE bapi2080_nothdre.
DATA ls_notifhdtext TYPE bapi2080_nothdtxte.
DATA ls_maintactytype TYPE ila.
"Change structure
DATA lt_notifpartnr_modi TYPE STANDARD TABLE OF bapi2080_notpartnri.
DATA ls_notifpartnr_modi LIKE LINE OF lt_notifpartnr_modi.
DATA lt_notifpartnr_x_modi TYPE STANDARD TABLE OF bapi2080_notpartnri_x.
DATA ls_notifpartnr_x_modi LIKE LINE OF lt_notifpartnr_x_modi.
DATA ls_notifheader_modi TYPE bapi2080_nothdri.
DATA ls_notifheader_x_modi TYPE bapi2080_nothdri_x.
DATA ls_maintactytype_export TYPE ila.
START-OF-SELECTION.
CALL FUNCTION 'BAPI_ALM_NOTIF_GET_DETAIL'
 EXPORTING
 number = '100000000052'
 IMPORTING
 notifheader_export = ls_notifheader_export
 notifhdtext = ls_notifhdtext
 maintactytype = ls_maintactytype
 TABLES
 notlongtxt = lt_notlongtxt
 notitem = lt_notitem
 notifcaus = lt_notifcaus
 notifactv = lt_notifactv
 notiftask = lt_notiftask
 notifpartnr = lt_notifpartnr
 return = lt_return
 extensionout = lt_extensionout.
DATA(ls_notifpartnr) = lt_notifpartnr[ 1 ].
ls_notifpartnr_modi-partn_role = ls_notifpartnr-partn_role.
ls_notifpartnr_modi-partn_role_old = ls_notifpartnr-partn_role.
ls_notifpartnr_modi-partner = '00000017'.
ls_notifpartnr_modi-partner_old = ls_notifpartnr-partner.
INSERT ls_notifpartnr_modi INTO TABLE lt_notifpartnr_modi.
ls_notifpartnr_x_modi-partn_role = 'X'.
ls_notifpartnr_x_modi-partn_role_old = ls_notifpartnr-partn_role.
ls_notifpartnr_x_modi-partner ='X'.
ls_notifpartnr_x_modi-partner_old = ls_notifpartnr-partner.
INSERT ls_notifpartnr_x_modi INTO TABLE lt_notifpartnr_x_modi.
ls_notifheader_modi-short_text = 'Novi ligure'.
ls_notifheader_x_modi-short_text = abap_true.
CALL FUNCTION 'BAPI_ALM_NOTIF_DATA_MODIFY'
 EXPORTING
 number = '100000000052'
 notifheader = ls_notifheader_modi
 notifheader_x = ls_notifheader_x_modi
 IMPORTING
 notifheader_export = ls_notifheader_export
 maintactytype_export = ls_maintactytype_export
 TABLES
* notifpartnr = lt_notifpartnr_modi
* notifpartnr_x = lt_notifpartnr_x_modi
 return = lt_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

And the short text does not get update as expected.

What am I doing wrong?

Thanks


4 REPLIES 4

raymond_giuseppi
Active Contributor

Read documentation of BAPI you must also call BAPI_ALM_NOTIF_SAVE before commit.

  1. BAPI_ALM_NOTIF_DATA_MODIFY
  2. BAPI_ALM_NOTIF_SAVE
  3. BAPI_TRANSACTION_COMMIT

0 Kudos

Hi.

I need set some parameters to call this BAPI_ALM_NOTIF_SAVE ?

I just made as test, but unsuccessful.

Thanks in advantage.

0 Kudos

Do you guess your error in your code:

ls_notifpartnr_modi-partner = '00000017'.
ls_notifpartnr_modi-partner_old = ls_notifpartnr-partner.

0 Kudos

Hello! I'm having the same issue. I'm suing with RFC and the code don't throw errors, but the return message say "no changes made".

I already checked the commit functions and don't find nothing stranger.

Someone help me? Tks.