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

regarding capturing the error message

Former Member
0 Likes
779

hi all ,

i have a requirement of having to capture the message generated when the bapi is being called .following are the bapi's BAPI_PLANNEDORDER_CREATE

BAPI_PLANNEDORDER_CHANGE..but the problem is that messages captured should be displayed in the spool of another report which is an independant identity .and the function module is not being called in the report.any pointers plz .......

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
745

Hi Friend,

Mantain a Z table like return parameter of BAPI.

Store recent messages in that Z table after each call of that BAPI.

Call that Z table from report.

I think it will resolve your problem.

Regards

Krishnendu

6 REPLIES 6
Read only

Former Member
0 Likes
745

Hi,

Have a look into Function group SBAL.

With the Function modules you can create a log and add the messages and store the log.

-> See Transactions SLG0 and SLG1.

These logs can then be read in your second program.

Kind Regards

Read only

0 Likes
745

seen the function group but couldnt understand how to capture messages .can you explain me in brief

Read only

Former Member
0 Likes
746

Hi Friend,

Mantain a Z table like return parameter of BAPI.

Store recent messages in that Z table after each call of that BAPI.

Call that Z table from report.

I think it will resolve your problem.

Regards

Krishnendu

Read only

0 Likes
745

any other option other than creating a ztable ..

Read only

Former Member
0 Likes
745

Hi,

Declare the Internal table of type BAPIRETURN(check in BAPI Fm ur using) and apss this to BAPI Fm. and send this T_return(Internal table_ to FM FORMAT_MESSAGE to have the exact errors as a report.

Reward if helpful.

Best Wishes,

Chandralekha

Read only

Former Member
0 Likes
745

Hi,

There are some demo Reports to expalin how to use the FM's.

Example: SBAL_DEMO_01

Kind Regards