‎2008 Jul 04 8:30 AM
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 .......
‎2008 Jul 04 8:40 AM
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
‎2008 Jul 04 8:40 AM
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
‎2008 Jul 04 10:11 AM
seen the function group but couldnt understand how to capture messages .can you explain me in brief
‎2008 Jul 04 8:40 AM
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
‎2008 Jul 04 10:11 AM
‎2008 Jul 04 10:17 AM
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
‎2008 Jul 04 10:42 AM
Hi,
There are some demo Reports to expalin how to use the FM's.
Example: SBAL_DEMO_01
Kind Regards