Skip to Content
0
Former Member
May 09, 2011 at 05:10 AM

To create a notification and to put it in progress status.

39 Views

Hi All,

following Piece of code works only in debug mode.

The purpose of this is to create a notification and to put it in progress status.

If I put a breakpoint before "CALL FUNCTION 'BAPI_ALM_NOTIF_PUTINPROGRESS'" it works.

If I execute this without putting a breakpoint at that place

it creates the notification but doesnt put it in progress status.

for Tcode IW21

  • Implementation of object type ZBUS2038 *****

INCLUDE <OBJECT>.

BEGIN_DATA OBJECT. " Do not change.. DATA is generated

  • only private members may be inserted into structure private

DATA:

" begin of private,

" to declare private attributes remove comments and

" insert private attributes here ...

" end of private,

BEGIN OF KEY,

NUMBER LIKE VIQMEL-QMNUM,

END OF KEY.

END_DATA OBJECT. " Do not change.. DATA is generated

BEGIN_METHOD PUTINPROGRESS CHANGING CONTAINER.

DATA:

LANGU TYPE BAPI2080_NOTSTI-LANGU,

LANGUISO TYPE BAPI2080_NOTSTI-LANGUISO,

TESTRUN TYPE BAPI20783T-STATUS_IND,

SYSTEMSTATUS TYPE BAPI2080_NOTADT-SYSTATUS,

USERSTATUS TYPE BAPI2080_NOTADT-USRSTATUS,

notification type VIQMEL-QMNUM,

RETURN LIKE BAPIRET2 OCCURS 0.

SWC_GET_ELEMENT CONTAINER 'Langu' LANGU.

SWC_GET_ELEMENT CONTAINER 'Languiso' LANGUISO.

SWC_GET_ELEMENT CONTAINER 'Testrun' TESTRUN.

SWC_GET_ELEMENT CONTAINER 'Notification' Notification.

ait up to 3 seconds.

F LANGU IS INITIAL.

ANGU = SY-LANGU.

ANGUISO = SY-LANGU.

NDIF.

f OBJECT-KEY-NUMBER is initial.

ALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = Notification

IMPORTING

OUTPUT = Notification

.

OBJECT-KEY-NUMBER = Notification.

endif.

CALL FUNCTION 'BAPI_ALM_NOTIF_PUTINPROGRESS'

EXPORTING

NUMBER = OBJECT-KEY-NUMBER

LANGU = LANGU

LANGUISO = LANGUISO

TESTRUN = SPACE

IMPORTING

SYSTEMSTATUS = SYSTEMSTATUS

USERSTATUS = USERSTATUS

TABLES

RETURN = RETURN

EXCEPTIONS

OTHERS = 01.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .

CASE SY-SUBRC.

WHEN 0. " OK

WHEN OTHERS. " to be implemented

ENDCASE.

SWC_SET_ELEMENT CONTAINER 'Systemstatus' SYSTEMSTATUS.

SWC_SET_ELEMENT CONTAINER 'Userstatus' USERSTATUS.

SWC_SET_TABLE CONTAINER 'Return' RETURN.

END_METHOD.

regards,

Dhananjay