2008 Dec 08 10:33 PM
Hi
I am trying to post GL account documents using BAPI - BAPI_ACC_GL_POSTING_POST.
While I try to run the BAPI, I pass the next number + Company Code + Fiscal Year for OBJ_KEY field in the documentheader.
After I execute the BAPI, it gives the message doc posted sucessfully.. But I am not able to find the record in BKPF or BSEG.
Plz let me know if anyone knows how to overcome this problem. I can provide the complete details of my inputs for the BAPI..
Thanks
Geetha
2008 Dec 08 10:36 PM
I hope you call also BAPI_TRANSACTION_COMMIT to validate the execution of the BAPI.
- Look at [Transaction Model for Developing BAPIs|http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm] and [BAPI User Guide CA-BFA) |http://www.google.fr/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fhelp.sap.com%2Fprintdocu%2Fcore%2Fprint46c%2Fen%2Fdata%2Fpdf%2Fbcmidapii%2Fcabfaapiintro.pdf&ei=U6I9SdXVD5be0gWOxZm7BQ&usg=AFQjCNF1rSwXqXLS9tooOk6D_Di22BMr3A&sig2=PUpci0cSApb0VVgrWTBBpg]
- For OBJ_TYPE, etc, look at [ Note 561175 - BAPI posting in accounting with FI as reference|https://service.sap.com/sap/support/notes/561175]
Regards
2008 Dec 08 10:36 PM
I hope you call also BAPI_TRANSACTION_COMMIT to validate the execution of the BAPI.
- Look at [Transaction Model for Developing BAPIs|http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm] and [BAPI User Guide CA-BFA) |http://www.google.fr/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fhelp.sap.com%2Fprintdocu%2Fcore%2Fprint46c%2Fen%2Fdata%2Fpdf%2Fbcmidapii%2Fcabfaapiintro.pdf&ei=U6I9SdXVD5be0gWOxZm7BQ&usg=AFQjCNF1rSwXqXLS9tooOk6D_Di22BMr3A&sig2=PUpci0cSApb0VVgrWTBBpg]
- For OBJ_TYPE, etc, look at [ Note 561175 - BAPI posting in accounting with FI as reference|https://service.sap.com/sap/support/notes/561175]
Regards
2008 Dec 26 9:56 AM
Hi Geetha,
Can u please let me know wat was the object type u passed as import parameters; all your help is highly appreciated..
2009 Jan 15 4:24 PM
OBJ_T should be BKPFF,
OBJ_KEY should be doc.no + company code + year (this should actually be the next no. automatically generated by the system. you may call FM "NUMBER_GET_NEXT" to generate the no. by the system & use it.)
OBJ_SYS should be your SAP system id
For me It was sucessfully posting the data only when I give these.. They also say we should leave these blank & it will be generated automatically to us. But I dont know how it works if we leave it blank. It did not work that way for me.
2009 Jan 15 4:30 PM
Hi Geetha,
You dont have to pass any thing in the obj_key or obj_type or obj_sys fields. The BAPI would auto fill these fields if everything is fine.
I have used the below parameters and have been successfully posting documents, try it.
documentheader-username = sy-uname.
documentheader-header_txt = gs_header-bktxt.
documentheader-comp_code = gs_header-bukrs.
documentheader-doc_date = gs_header-bldat.
documentheader-pstng_date = gs_header-budat.
documentheader-fis_period = gs_header-monat.
documentheader-doc_type = gs_header-blart.
documentheader-reason_rev = gs_header-stgrd.
documentheader-ref_doc_no_long = gs_header-xblnr.
documentheader-acc_principle
documentheader-obj_type
documentheader-obj_key
documentheader-obj_sys
documentheader-ref_doc_no
documentheader-compo_acc
documentheader-ac_doc_no
documentheader-fisc_year
documentheader-obj_key_r
documentheader-trans_date
2009 Jan 15 4:31 PM
The above bulleted parameters are actually the commented ones,...in the abap editor
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |