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: 

finding Notification no.

0 Kudos
95

Hi gurus,

I'm trying to create a new notification using :

1. BAPI_ALM_NOTIF_CREATE

2. BAPI_ALM_NOTIF_SAVE

3. BAPI_TRANSACTION_COMMIT

The notification is created succesfully but i am not able to get that Not. no.

for ref. code is :

CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'

EXPORTING

  • EXTERNAL_NUMBER =

NOTIF_TYPE = P_099

NOTIFHEADER = P_IT_NOTIFHEADER

TABLES

RETURN = IT_RETURN.

READ TABLE IT_RETURN WITH KEY TYPE = 'E'.

IF SY-SUBRC EQ 0.

MESSAGE ID IT_RETURN-ID TYPE IT_RETURN-TYPE NUMBER IT_RETURN-NUMBER

WITH IT_RETURN-MESSAGE_V1

IT_RETURN-MESSAGE_V2

IT_RETURN-MESSAGE_V3

IT_RETURN-MESSAGE_V4.

ELSE.

CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'

EXPORTING

NUMBER = IT_NOTIFHEADER_EXPORT-NOTIF_NO

IMPORTING

NOTIFHEADER = IT_NOTIFHEADER_EXPORT

TABLES

RETURN = IT_RETURN.

ENDIF.

READ TABLE IT_RETURN WITH KEY TYPE = 'E'.

IF SY-SUBRC EQ 0.

MESSAGE ID IT_RETURN-ID TYPE IT_RETURN-TYPE NUMBER IT_RETURN-NUMBER

WITH IT_RETURN-MESSAGE_V1

IT_RETURN-MESSAGE_V2

IT_RETURN-MESSAGE_V3

IT_RETURN-MESSAGE_V4.

ELSE.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT =

  • IMPORTING

  • RETURN =

.

I want notification no.that is generated, without finding that in table (database) so that i can flash that no. on screen in message

Thanks in Advance.

4 REPLIES 4

0 Kudos
69

Hi gurus,

I'm trying to create a new notification using :

1. BAPI_ALM_NOTIF_CREATE

2. BAPI_ALM_NOTIF_SAVE

3. BAPI_TRANSACTION_COMMIT

The notification is created succesfully but i am not able to get that Not. no.

I want notification no.that is generated, without finding that in table (database) so that i can flash that no. on screen in message. are these BAPI's gives correct Not. no. or not meaning is it possible or not ?

Points will be awarded to right one.

Thanks in Advance.

0 Kudos
69

Hi

Check the data of IT_RETURN correctly,

whether the saved number is coming into that or not.

If it is not coming into that IT_RETURN then you can't display without fetching from database table QMFE.

Reward points for useful Answers

Regards

Anji

0 Kudos
69

hi Anji thanks for ur attention,

I checked IT_RETURN but the no. is not coming in that table.

is there any other BAPI which gives me Not. no. along with IT_RETURN table.

0 Kudos
69

you are not importing anything back from BAPI_ALM_NOTIF_CREATE.

( Check the Export paramaters of this function in SE37)

NOTIFHEADER_EXPORT-NOTIF_NO should have the notification number.

( Never used this and but used BAPI_SERVICENOTIFICAT_CREATE).

Siva