‎2008 May 19 11:42 AM
Hi All ,
I have some doubts in Bapi
1) why we can not use exception in Bapi ?
2) BAPI must not execute a COMMIT-WORK command.
3) why its necessary to released the bapi & how ?
4) In Bapi there is a test for Example IF 1 = 2. If the test is true a message is displayed. The condition will obviously never be true, and we will never want to display a message in a BAPI
then why it is necessary ?
Thanks in advance
Rahul
‎2008 May 19 11:58 AM
Hi Sharma,
Award points if useful
BAPI cannot have exceptions in them.
BAPIs themselves must not trigger any messages (such as MESSAGE xnnn) in the coding. In particular they must not generate terminations or display dialog boxes. Instead, all messages must be intercepted internally and reported back to the calling program in the Return parameter. Otherwise the BAPI will not be processed correctly and control may not be given back to the calling program
BAPI cannot use commit work stmt instead
Commit work is used when you code directly in ABAP and make changes in the database and
want to commit the database.
BAPI_TRANSACTION_COMMIT is used when you make changes to the SAP database by calling
a BAPI from outside SAP and want to commit the database. When you use a BAPI, you can not
directly use commit work, instead you are allowed to use only
BAPI_TRANSACTION_COMMIT.
Why Release?
You cannot use the same structures used in existing applications because BAPI structures are frozen when BAPIs are released and then there are restrictions on changing them.
‎2008 May 19 11:58 AM
Hi Sharma,
Award points if useful
BAPI cannot have exceptions in them.
BAPIs themselves must not trigger any messages (such as MESSAGE xnnn) in the coding. In particular they must not generate terminations or display dialog boxes. Instead, all messages must be intercepted internally and reported back to the calling program in the Return parameter. Otherwise the BAPI will not be processed correctly and control may not be given back to the calling program
BAPI cannot use commit work stmt instead
Commit work is used when you code directly in ABAP and make changes in the database and
want to commit the database.
BAPI_TRANSACTION_COMMIT is used when you make changes to the SAP database by calling
a BAPI from outside SAP and want to commit the database. When you use a BAPI, you can not
directly use commit work, instead you are allowed to use only
BAPI_TRANSACTION_COMMIT.
Why Release?
You cannot use the same structures used in existing applications because BAPI structures are frozen when BAPIs are released and then there are restrictions on changing them.