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

ISSUE with BAPI_SERVNOT_CREATE

Former Member
0 Likes
909

Hi Experts,

   

      I have to create service notifications for this i am using 4 Function modules.

1.BAPI_SERVNOT_CREATE

2. BAPI_SERVNOT_SAVE

3. BAPI_Transaction_commit

4. IQS4_ADD_DATA_NOTIFICATION .

The functionality should add the change notification texts for each notification .In order to achieve this we need to call the same BAPIs many times with same parameters except LONG TEXTS in loop.

currently i am passing

Notification type , Order id and Notification items table and Long texts to BAPI_SERVNOT_CREATE.

Change notifications are created every time but they are not getting saved in the database table QMEL (observed in debugging).

Only for the first time the number is saved in QMEL table .

Any OSS notes available for this functionality.

Thanks in advance.

Regards

Rajasrikanth

3 REPLIES 3
Read only

abranjan
Active Participant
0 Likes
660

Hello Raj,

You can try this sequence too.

1.BAPI_SERVNOT_CREATE

2. BAPI_SERVNOT_SAVE

3. IQS1_POST_NOTIFICATION   ( Set I_WAIT = 'X')

4. BAPI_SERVNOT_ADD_DATA (Longtext can be added with this too)

5. BAPI_SERVNOT_SAVE

6. BAPI_TRANSACTION_COMMIT

If it doesnt work, then  give some wait time (in BAPI_TRANSACTION_COMMIT) so that the BAPI can commit the data to the database before another BAPI tries to process it. I guess even 1 second will be fine but please consider your performance requirement too. If the volume is very large, then additional wait will not be a good option.

Read only

Former Member
0 Likes
660

Thanks abhishek  for your reply .

I tried with this sequence also but no luck ...

Read only

0 Likes
660

If you are updating the notification in the same loop for notification creation, then you can try the update in another loop too. Once all the notifications are created, you can update them.