‎2007 Jun 15 12:16 PM
hi all,
in PM module i m using "BAPI_EQUI_DISMANTLE" bapi and then "BAPI_transaction commit"..
Now my requirement is that after commit is one of my condition fails i need to revert bak/ Roll back the operation performed by BAPI_EQUI_DISMANTLE..
can any one suggest me some thing related to this..?
thnx
‎2007 Jun 15 9:33 PM
Wait until you check the condition before doing the commit.
Rob
‎2007 Jun 15 11:48 PM
Hi Neha,
I dont much about that particular BAPI function module. But, one thing I can suggest you if you want to check the condition b/w BAPI fn module and commit:
If you are working in ECC 6.0 environment, then you are having a new concept called Enhancement spots which is similar to User exits/BADIs. By using that concept, inside the BAPI function module, search for an enhancement spot and create a new implementation and write your check and add a message into the return table the function module is returning. Now, between the BAPI call and the BAPI transaction commit function modules in ur code, check for that particular message and do not execute ur commit function module if u find that particular message. This only helps if you are using ECC 6.0.
But, if you want to check the condition after complete updating the data, then check for any simulate function module.
From,
Adithya K
‎2007 Jun 16 12:25 AM
Hi neha,
if the documentation of this BAPI is correct:
Return Parameter
Description
In the event of error, this structure contains the following
information:
o Message type (Field TYPE)
o Message code (Field CODE)
o Message text (Field MESSAGE)
In the event of success, the message type is set to 'S', otherwise the
structure is empty.
After callin FM BAPI_EQUI_DISMANTLE, check the RETURN-parameter::
IFreturn-type = 'S'.
** do all your follow-up actions here ***
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.Regards,
Clemens
Message was edited by:
Clemens Li