‎2011 Dec 25 1:03 PM
Hi folks,
I am trying to post GL documents for assets using 'BAPI_ACC_DOCUMENT_POST' which is returning the below error's.
Error 1 : Accounting transaction category RFBURFBU000000000000 is not defined.
Error 2 : Enter a transaction type.
I am passing the following parameters to the function module.
Header data :
gs_dochead-username = sy-uname.
gs_dochead-header_txt = gs_accdata-bktxt.
gs_dochead-comp_code = gs_accdata-bukrs.
gs_dochead-doc_date = gs_accdata-bldat.
gs_dochead-doc_type = gs_accdata-blart.
gs_dochead-ref_doc_no = gs_accdata-xblnr.
GL Account data
gs_glacc-gl_account = ktansw. " Bal. sheet account: Acquisition and production costs
gs_glacc-asset_no = asset_no. " Asset no
gs_glacc-acct_type = 'A'. " Account Type
gs_glacc-cs_trans_t = gs_accdata-newbw. " Asset Transaction Type
append gs_glacc to gt_glacc.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = gs_dochead
IMPORTING
obj_key = gv_obj_key
TABLES
accountgl = gt_glacc
accountreceivable = gt_aracc
accountpayable = gt_apacc
currencyamount = gt_curr
return = gt_return .
For G/l posting and for vendor and customer it is working fine .. I am getting problem only with the assets. Please help me out like what mistake I am doing and let me know the additional parameters which I am not passing to the function module.
I know this question is posted in the SDN but I was not able to find a proper solution ..
Thanks ,
Irfan.
‎2011 Dec 26 9:52 AM
‎2011 Dec 26 9:58 AM
Hi Anusha,
Thanks for your reply.
The configuration is already in place. I am not getting any error when I am running FB01 with the same test data. I am getting the error only when I am doing with the 'BAPI_ACC_DOCUMENT_POST'. I think I am not passing correct parameters to the BAPI or I need to pass some more information ..
I need help on what parameters I am I suppose to pass to the BAPI.
Thanks,
Irfan.
‎2011 Dec 26 10:20 AM
Hi Mohammed,
There are some parameters are missing.Please go through this [Wiki|http://wiki.sdn.sap.com/wiki/display/ABAP/BusinessTransactionEvent-RWBAPI01-ForAccountingDocument+Interface]from vinod.
Regards,
Madhu.
‎2011 Dec 26 11:46 AM
Hi Mohammed,
You need this parameter "gs_dochead-bus_act = 'RFBU' " , this is solve your problem.
Best regards,
İ.M
‎2011 Dec 26 12:00 PM
Hello Madhu,
The link shared by you is for vendor and for vendor it is working fine .. I am facing problem while posting Asset.
@Irfan : I tried with your option .. I am getting the same error ...
Please help me .. or shall I go ahead for BDC .. please advise...
Thanks .
Irfan Mohammed.
‎2011 Dec 27 3:14 AM
Hi Nisar,
You can do with bapi.Pass the value BUS_ACT = 'RFBU'.
Regards,
Madhu.