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

BAPI_ALM_NOTIF_CREATE creates runtime error MESSAGE_TYPE_X

Former Member
0 Likes
2,493

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.

10 REPLIES 10
Read only

Arun_Prabhu_K
Active Contributor
0 Likes
2,211

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.

Read only

0 Likes
2,211


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

Read only

0 Likes
2,211

Shajna,

What for you are using the FM CO_BH_GET_ORDERS ?

Read only

0 Likes
2,211


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.

Read only

0 Likes
2,211

Any updates please.

Read only

0 Likes
2,211

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

Read only

0 Likes
2,211

Hi Shajna,

Is this being called in a loop?

Try setting the update task local and do the commit work.

Regards,

Ankur Parab

Read only

Former Member
0 Likes
2,211

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.

Read only

0 Likes
2,211

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

Read only

0 Likes
2,211

Hi Shajna,

Use 'BAPI_TRANSACTION_COMMIT' after successful execution of BAPI. Clear all variable and pass next record to BAPI.

Regards,

Santosh