‎2013 Oct 14 7:46 AM
Hello Experts,
I am creating a Return Order Document w.ref.to Invoice using BAPI_CUSTOMERRETURN_CREATE , It is generating Return Order number once the execution is done , But saying that Return order number is Archived. Reason behind that is It was not committed once the Execution has been done.
If we execute BAPI_TRANSCTION_COMMIT in a sequence , it is working fine.
Is there any Auto-Commit field available within the BAPI_CUSTOMERRETURN_CREATE . I don't want to use Explicit commit for the BAPI. Bcoz I need to generate a OData service using Gateway for the same Return order generation . Odata Multiple row creation(Changeset Method) doesn't allow Commit Statement . So Is there any chance to get Auto-Commit on the BAPI.
Appreciate your help.
Thanks,
Uday.
‎2013 Oct 14 8:31 AM
Hi Uday,
You can try,
If SY-SUBRC = 0.
COMMIT WORK.
ENDIF.
Regards
Ajit
‎2013 Oct 15 12:24 PM
Hi , Could anyone update my query and suggest the desired solution.
Appreciate your help.
Thanks,
Uday.
‎2013 Oct 15 12:52 PM
Hi Uday,
This BAPI is just like simulation.
That is good thing to use BAPI_TRANSACTION_COMMIT. BAPI always returns sy-subrc EQ 0.
Call BAPI_TRANSACTION_COMMIT if your return table does not have any message of Type 'E' else do BAPI Rollback.
I dont think there is way of autocommit for this BAPI because Update function module are not processed automatically.
Deependra