‎2008 May 21 9:44 AM
HI,
The code below does not update the DB table even if the commit work is executed... is there something wrong or missing??? Thanks a lot!
Technically complete process Order
CALL FUNCTION 'BAPI_PROCORD_COMPLETE_TECH'
IMPORTING
return = i_messages
TABLES
orders = i_orders.
IF i_messages-type NE c_error.
REFRESH i_messages3.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = i_messages3.
ENDIF.
‎2008 May 21 9:49 AM
Hi this is your code right.
You have to check the return table not messages.
Check the return table is there any message type is there with 'E' .
if it is there then the commit work won't give the result in fact the BAPI function is not executed successfully.
If you got any Error message in return table please have a look into that table errors and take the necessary action.
Pass the required paramaters for the BAPI function module.
Regards,
Madan.
‎2008 May 21 9:49 AM
Hi this is your code right.
You have to check the return table not messages.
Check the return table is there any message type is there with 'E' .
if it is there then the commit work won't give the result in fact the BAPI function is not executed successfully.
If you got any Error message in return table please have a look into that table errors and take the necessary action.
Pass the required paramaters for the BAPI function module.
Regards,
Madan.
‎2008 May 21 10:19 AM
Check the value of i_messages3 after execuing each FM, if it executes sucessfuly database is bound to update
Regards
Bikas
‎2008 May 22 4:07 AM
Hi,
That was also my thinking... that the commit work and wait should work to update the database... but this was not the case...
The bapi sometimes work,, sometimes not... though no error is generated...
Is it due to the sequence of BAPIs used?? since Im using 3 BAPI's:
BAPI_PROCORD_CREATE
BAPI_PROCORDCONF_CREATE_HDR
BAPI_PROCORD_COMPLETE_TECH
Thanks a lot!