2006 Jan 25 8:49 PM
i have a problem, because the bapi BAPI_CUSTOMERRETURN_CREATE created a sales order of customer return, but don't save the number in VBAK, the system error is: "SD document & is not in the database or has been archived"
help please
Message was edited by: Gustavo Zuluaga
2006 Jan 26 3:46 PM
Did you execute the BAPI from SE37 or did you execute it from the program?
I am guessing that the above BAPI may not have commit work and you may have to manually CALL BAPI_TRANSACTION_COMMIT to save the changes to DB.
You can probably test this from SE37 USING Function Module ->Test -> Test Sequences and then give your BAPI_CUSTOMERRETURN_CREATE and BAPI_TRANSACTION_COMMIT in the list.
After executing the first function module and exiting, you will prompted to execute the BAPI_TRANSACTION_COMMIT.
2006 Jan 26 3:46 PM
Did you execute the BAPI from SE37 or did you execute it from the program?
I am guessing that the above BAPI may not have commit work and you may have to manually CALL BAPI_TRANSACTION_COMMIT to save the changes to DB.
You can probably test this from SE37 USING Function Module ->Test -> Test Sequences and then give your BAPI_CUSTOMERRETURN_CREATE and BAPI_TRANSACTION_COMMIT in the list.
After executing the first function module and exiting, you will prompted to execute the BAPI_TRANSACTION_COMMIT.
2006 Jan 26 4:49 PM
I executed the bapi from SE37. i tested in mode Test Sequences the two bapis indicated, first the BAPI_CUSTOMERRETURN_CREATE, second, BAPI_TRANSACTION_COMMIT, but That did not work.
This way save the documents in the VBAK table.
So, now i will modify the BApi - BAPI_CUSTOMERRETURN_CREATE for including the BAPI_TRANSACTION_COMMIT.
is that correct ?
2006 Jan 26 5:09 PM
Are you saying that document is now saved in VBAK table, but you are unable to see it from VA03 transaction?
Further, if BAPI_TRANSACTION_COMMIT using test sequences doesn't work there is no way it will work if you modify the BAPI_CUSTOMERRETURN_CREATE...
2006 Jan 26 5:14 PM
Yes, i can see the documents throught VA03.
Don't you know if exist some note or hotpackages resolve this problem ?
I can do the Bapi Z using the Standard and combinate both bapis, but i prefer search sapnote or aplicate the hotpackages if those repair the problem.
What do you opinion ?
2006 Jan 26 8:04 PM
Yes, i can see the documents from VA03.
if you use the BAPI_TRANSACTION_COMMIT and BAPI_CUSTOMERRETURN_CREATE in sequence was working perfect.
Don't you know if exist some note or hotpackages resolve this problem ?
I can do one Bapi Z using the Standard and combinate both bapis, but i prefer search sapnote or aplicate the hotpackages if those repair the problem.
What do you opinion ?
2006 Jan 26 8:12 PM
Gustavo, what is your exact requirement. I presume you will be wanting to automate this and hence will be invoking the BAPI from a program. In such a scenario you can invoke the two BAPI's in sequence (call commit bapi on successful execution of first BAPI).
But for manually calling this BAPI, you have to live with Test sequence or creating a ZBAPI like you have mentioned.
2006 Jan 26 8:46 PM
So, I have two enviroment, Version 4.0B SAP R/3 and Version 5.0 Sap R/3. In ther version 4.0B the BAPI_CUSTOMERRETURN_CREATE work very good, because the bapi make the sales document perfect and save in VBAK, but in the version 5.0 don't make the sales document perfect. What can i do in this case ?
2006 Jan 27 9:09 AM
Hi Gustavo!
Check, if your test data is alright. Most likely your master data for the test in 5.0 is not OK (missing price, wrong logistic data, missing customer view...).
Regards,
Christian
2006 Jan 27 3:22 PM
I CREATED THE ZBAPI USING BAPI_CUSTOMERRETURN_CREATE AND BAPI_TRANSACTION_COMMIT, I CHECKED THE RESULT, THE SALES DOCUMENT IS OK, DIDN'T MISSING PRICE, WRONG LOGISTIC DATA, ETC.
THANKS FOR YOUR HELP.
TO SSG AND CHRISTIAN FOR YOUR HELP.
2006 Jan 26 3:48 PM
Hi!
Sounds like you are missing the commit work afterwards.
Or is this a message from inside the BAPI? I thought you are trying the result in a different transaction and get this error.
Regards,
Christian
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |