2011 Dec 06 9:08 AM
Hello,
I am using function "BAPI_ACC_DOCUMENT_POST" to post the document.. After executing this function , i m getting the document number..
Further I m using "BAPI_TRANSACTION_COMMIT" to commit the transaction.. i am not able to get this document no either in FB03 or FB02.
i m not able to understand the exact cause why bapi document is not getting updated in database...
Pls help..
Regards,
in fb03 are you passing the correct fiscal year??
2011 Dec 06 9:32 AM
BAPI_TRANSACTION_COMMIT has a return parameter, what is it returning ?
2011 Dec 06 9:55 AM
2011 Dec 06 10:36 AM
Hi,
UIse BAPI_TRANSACTION_COMMIT in below format.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.BR,
Vijay
2011 Dec 06 12:03 PM
Hi,
The data will be saved to database once you use " BAPI_TRANSACTION_COMMIT".
call again bapi and pass the data and update .. try like this
LOOP AT .... "For example, 10 times for 10 Documents
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING ...
IMPORTING ...
TABLES ....
RETURN = BAPI_RETURN_TABLE.
read table BAPI_RETURN_TABLE with msgtype = 'E'.
if sy-subrc eq 0.
error = 'X'.
exit.
endif.
endloop.
Throw error message here.
if error is initial.
LOOP AT .... "For example, 100 times for 100 Documents
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING ...
IMPORTING ...
TABLES ....
RETURN = BAPI_RETURN_TABLE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = RETURN.
endloop.
endif.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |