Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Last function module (BAPI_TRANSACTION_COMMIT) is not working in USER-EXIT

DATA: I_BAPI2080_NOTHDRI TYPE STANDARD TABLE OF BAPI2080_NOTHDRI WITH HEADER LINE.

DATA: I_BAPIRET2 TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.

DATA: I_BAPI2080_NOTHDRE TYPE STANDARD TABLE OF BAPI2080_NOTHDRE WITH HEADER LINE.

DATA : RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'

EXPORTING

  • EXTERNAL_NUMBER =

NOTIF_TYPE = 'M2'

NOTIFHEADER = I_BAPI2080_NOTHDRI

  • TASK_DETERMINATION = ' '

  • SENDER =

  • ORDERID =

IMPORTING

NOTIFHEADER_EXPORT = I_BAPI2080_NOTHDRE

TABLES

  • NOTITEM =

  • NOTIFCAUS =

  • NOTIFACTV =

  • NOTIFTASK =

  • NOTIFPARTNR =

  • LONGTEXTS = I_BAPI2080_NOTFULLTXTI

  • KEY_RELATIONSHIPS =

RETURN = I_BAPIRET2.

CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'

EXPORTING

NUMBER = I_BAPI2080_NOTHDRE-NOTIF_NO

  • IMPORTING

  • NOTIFHEADER =

  • TABLES

  • RETURN =

.

LOOP AT RETURN WHERE TYPE = 'E'.

EXIT.

ENDLOOP.

IF SY-SUBRC EQ 0.

WRITE: / 'BAPI call failed - debug and fix!'.

ELSE.

CLEAR RETURN.

REFRESH RETURN.

  • COMMIT WORK AND WAIT.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT =

IMPORTING

RETURN = RETURN.

WRITE: / 'Notification Number', I_BAPI2080_NOTHDRE-NOTIF_NO.

ENDIF.

CAN ANYONE HELD ME OUT .

EVERY SUGGESTION WILL BE APPRECIATED.

REGARDS

VICKY

Moderator message: please do not post in all upper case, remember you were this close to user ID deletion already.

Edited by: Thomas Zloch on May 13, 2011 12:59 PM

Former Member
Not what you were looking for? View more on this topic or Ask a question