‎2010 May 14 6:25 AM
Hi Friends,
i am creating a RFC where i have to create sales order .
I am using bapi
BAPI_SALESORDER_CREATEFROMDAT2for same and entering values to it.
I got the following return messages:
S V4 233 SALES_HEADER_IN has been processed successfully
S V4 233 SALES_ITEM_IN has been processed successfully
S V1 311 BDN Order 3112800903 has been saved
But when I go to transaction VA03 and enter the number i get the following error:
SD document 3112800903 is not in the database or has been archivedCan any one know how to resolve this error.I am also using BAPI_TRANSACTION_COMMIT with wait = 'X'.
Regards,
Santosh Alle
‎2010 May 14 6:39 AM
when you call the FM BAPI_TRANSACTION_COMMIT just check the return code
‎2010 May 14 6:43 AM
Hi,
Try to check the return message once.
SD document 3112800903 is not in the database or has been archived
You will get this message if the sales document is deleted from the database .The BAPI 'BAPI_SALESORDER_CHANGE' is used to delete salesorder.Check whether anyone has deleted it
Also, sometimes it may take few seconds to update the sales order in the database when using BAPI. Check the transaction after some time.
Regards,
Lakshman.
Edited by: Lakshman N on May 14, 2010 7:43 AM
‎2010 May 14 6:46 AM
HI Laxman,
As soon as the Sales Order is been generated I check in VA03. How can it be deleted.Its been arceived I guess..
Santosh
‎2010 May 14 6:53 AM
Santosh,
Have u coded for commit work after the bapi executed successfully
IF SY-SUBRC <> 0.
CALL FUNCTION *'BAPI_TRANSACTION_COMMIT'*.
MESSAGE 'Document Created TYPE 'I'.
SET PF-STATUS 'ZBAPI1'.
ELSE .
MESSAGE 'Document contains Errors' TYPE 'E'.
ENDIF.
‎2010 May 14 6:57 AM
Not sure whether its been deleted or archived.But check ,some program might be running behind this.
Regards,
Lakshman.
Edited by: Lakshman N on May 14, 2010 7:57 AM
‎2010 Sep 03 6:14 AM