Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

GL posting for Assets not working with BAPI 'BAPI_ACC_DOCUMENT_POST'

Former Member
0 Likes
4,017

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.

6 REPLIES 6
Read only

Former Member
0 Likes
1,632

Hi,

Please refer to SAP Note 662461

Thanks & regards.

Read only

0 Likes
1,632

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.

Read only

0 Likes
1,632

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.

Read only

Former Member
0 Likes
1,632

Hi Mohammed,

You need this parameter "gs_dochead-bus_act = 'RFBU' " , this is solve your problem.

Best regards,

İ.M

Read only

0 Likes
1,632

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.

Read only

0 Likes
1,632

Hi Nisar,

You can do with bapi.Pass the value BUS_ACT = 'RFBU'.

Regards,

Madhu.