‎2006 Nov 21 3:14 PM
Hi,
We have a Program calling custom transaction in wihich a BAPI for Quotation Creating is called and after the BAPI call we are executing BAPI_TRANSACTION_COMMIT and after this we have some more calculations to do with the created Quote in that Custom Transaction. But the Problem is as soon as the FM BAPI_TRANSACTION_COMMIT is executed, it is coming out of that Custom transaction to the Calling Program.
We are using ECC6 System...
Pls Help... Points Guranteed....:-)
Regards
Sreedhar
‎2006 Nov 21 3:55 PM
Hi,
Direct commit work will be same as BAPI_TRANSACTION_COMMIT
Please find the code inside Bapi_transaction_commit
if wait eq space.
commit work.
else.
commit work and wait.
if sy-subrc ne 0.
call function 'BALW_BAPIRETURN_GET2'
exporting
type = 'E'
cl = 'S&'
number = '150'
importing
return = return.
endif.
endif.
call function 'BUFFER_REFRESH_ALL'.
endfunction.
RAVI:--> I think Sreedhar wants to edit the created quotation details once it created, by giving the commit work in the last not possible to edit the created Quotation,
Sreedhar:--> you try with created a wrapper function module for the bapi call and call in the separate LUW.
Thanks
aRs
‎2006 Nov 21 3:16 PM
Ideally that shouldn't happen, did you debug to see why was it doing that.
Also, as a work around, why don't you move the COMMIT to the end of the called program.
Regards,
Ravi
‎2006 Nov 21 3:17 PM
instead of BAPI_TRANSACTION_COMMIT just use commit...it will stay in the code itself and u can execute the below code.
‎2006 Nov 21 3:20 PM
hi,
try using this give a value for wait in the importing parameters.
IMPORTING
*" VALUE(WAIT) LIKE BAPITA-WAIT OPTIONAL
*" EXPORTING
*" VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
santhosh
‎2006 Nov 21 3:28 PM
During Call Transaction, set the parameter RACOMMIT to X.
Then use OPTIONS FROM params during call transaction. See sample code below.
params-racommit = 'X'.
params-defsize = 'X'.
params-dismode = 'N'.
params-updmode = 'S'.
call transaction <tcode>
using bdcdata
options from params
messages into messtab.
‎2006 Nov 21 3:46 PM
This is to Ramesh will the regular commit work when a BAPI is called?
‎2006 Nov 21 3:55 PM
Hi,
Direct commit work will be same as BAPI_TRANSACTION_COMMIT
Please find the code inside Bapi_transaction_commit
if wait eq space.
commit work.
else.
commit work and wait.
if sy-subrc ne 0.
call function 'BALW_BAPIRETURN_GET2'
exporting
type = 'E'
cl = 'S&'
number = '150'
importing
return = return.
endif.
endif.
call function 'BUFFER_REFRESH_ALL'.
endfunction.
RAVI:--> I think Sreedhar wants to edit the created quotation details once it created, by giving the commit work in the last not possible to edit the created Quotation,
Sreedhar:--> you try with created a wrapper function module for the bapi call and call in the separate LUW.
Thanks
aRs
‎2006 Nov 21 4:00 PM
Hi,
I think the problem is the control comes back to the calling program from the called transaction as soon as a commit work is executed in the called transaction. In order to avoid this, the RACOMMIT parameter needs to set to 'X' during calling the transaction from the main program.
Thanks.