‎2014 Nov 06 8:02 AM
Please provide the solution for this error.
We are trying to create notification using this BAPI, BAPI_ALM_NOTIF_CREATE with multiple service orders.
For the first service order, the notification gets created. But when trying to create the notification for the second service order, the BAPI gives a runtime error. When tried in debugging, found that the function module CO_BH_GET_ORDERS returns internal tables(caufvbo and caufvdg)
with the entries of both the service orders. when deleted the first service order entry from these internal tables, the notification was created successfully.
kindly guide how to solve this technically.
‎2014 Nov 06 8:23 AM
Hello Shajna Vijayan.
I guess the data that is passed for each execution of BAPI is incorrect.
Ensure you clear the internal tables passed to BAPI after each execution.
Regards.
‎2014 Nov 06 9:24 AM
Hi Arun,
Thanks for the reply.
But the internal tables passed to the BAPI is already refreshed after each execution and it contains only the data of the individual service order.
Regards,
Shajna
‎2014 Nov 06 9:31 AM
‎2014 Nov 06 9:35 AM
I am using BAPI_ALM_NOTIF_CREATE in my program. This BAPI gives the runtime error.
FM CO_BH_GET_ORDERS is present inside this.
‎2014 Nov 06 12:38 PM
‎2014 Nov 06 12:49 PM
Hi,
please check the dump in ST22 and post the dump description and the code lines where it occurs.
You can check the field values in the lines before the message is called.
Regards,
Klaus
‎2014 Nov 06 12:50 PM
Hi Shajna,
Is this being called in a loop?
Try setting the update task local and do the commit work.
Regards,
Ankur Parab
‎2014 Nov 06 1:22 PM
Hello All,
Please find the details below.
Runtime Errors MESSAGE_TYPE_X
The dump occurs in the point as shown below
BAPI_ALM_NOTIF_CREATE is called inside a loop. When the loop runs for the first time, the BAPI creates the notification. But when the loop runs for the second time, it creates the dump at this point.
But when I try running the BAPI with two other service orders, it does not cause any dump. It creates notification for both the service orders.
‎2014 Nov 06 1:36 PM
Hi,
What do you mean by "But when I try running the BAPI with two other service orders, it does not cause any dump. It creates notification for both the service orders."?
Is this happening only for certain cases?
Did you try creating it via the standard transaction instead of the custom program. Does it give the same error?
It could be also due to the recursive calls, some global internal tables in the function group are not cleared.
Regards,
Ankur Parab
‎2014 Nov 06 10:05 PM
Hi Shajna,
Use 'BAPI_TRANSACTION_COMMIT' after successful execution of BAPI. Clear all variable and pass next record to BAPI.
Regards,
Santosh