2021 Feb 17 5:03 AM
I am uploading the data through bapi_Acc_document_post. for fb60. I got the succcess messsgae "posted succcessfulIy" . but here the question is :data not updated in table. and I didn't get any reference document number(BELNR) after getting the success message.plz help on this urjent. I called bapi_transcation_commit. tried all the possibilities. will the bapi doesn't work or bdc will work??
2021 Feb 17 1:13 PM
Hi vinay_krishna
Call CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' after Bapi
Regards ,
Ponrajasekharan.
2021 Feb 17 1:17 PM
Hi ponrajasekharan,
I did that, I called bapi_transcation_commit after the bapi
I am getting this message : " document posted successfully". I checked bapi_transcation_commit in debug mode also. still data not updated.I am not getting any BELNR no. I checked in SM13 also.
2021 Feb 17 1:59 PM
Hi ,
Try this and Check for return messages .
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
2021 Feb 18 5:53 AM
Hi ponrajasekharan, I tried that. As I am getting sucess message " document posted successfully". In return message. data is not updated in table and i didn't get any refermce doc. no(belnr) created. message.
here is my code
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
DOCUMENTHEADER = LS_DOCHEADER
* CUSTOMERCPD =
* CONTRACTHEADER =
IMPORTING
OBJ_TYPE = LV_OBJTYP
OBJ_KEY = LV_OBJKEY
OBJ_SYS = LV_OBJSYS
TABLES
ACCOUNTGL = LT_GLACCT
* ACCOUNTRECEIVABLE =
ACCOUNTPAYABLE = LT_ACTPAY
* ACCOUNTTAX =
CURRENCYAMOUNT = LT_CURRAMT
* CRITERIA =
* VALUEFIELD =
* EXTENSION1 =
RETURN = LT_RETURN
* PAYMENTCARD =
* CONTRACTITEM =
* EXTENSION2 =
* REALESTATE =
* ACCOUNTWT =
.
IF LS_DOCHEADER IS NOT INITIAL.
READ TABLE LT_RETURN WITH KEY TYPE = 'S' INTO LS_RETURN.
IF SY-SUBRC = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
WRITE / : 'SUCCESS - ' , LS_RETURN-MESSAGE, LS_RETURN-PARAMETER..
CLEAR LS_RETURN.
ELSE.
LOOP AT LT_RETURN INTO LS_RETURN.
IF LS_RETURN-TYPE = 'A' OR LS_RETURN-TYPE = 'E'.
WRITE / : 'FAIL - ' , LS_RETURN-MESSAGE, LS_RETURN-PARAMETER, LS_RETURN-ROW .
ENDIF.
ENDLOOP.
ENDIF.
2021 Feb 18 7:59 AM
Hi Vinay Krisha
Check this thread ,https://answers.sap.com/answers/9158422/view.html
From the thread it may be helpful for this .
Check the values being returned by BAPI in OBJ_TYPE, OBJ_KEY, OBJ_SYS parameters. You are checking the correct values in OBJ_KEY in FB03 with correct year and company code. The OBJ_SYS is the system in which you are checking the document. Check whether there is any update termination occured in SM13. Also try giving wait = X in BAPI_TRANSACTION_COMMIT.
2021 Feb 18 10:51 AM
Did you
NB: