Skip to Content
author's profile photo Former Member
Former Member

Issue in Asset Posting while using BAPI BAPI_ACC_DOCUMENT_POST

I am getting errors while trying to perform an asset massive posting with posting keys “70” (debit asset) and “75” (credit asset). I was trying to test the BAPI BAPI_ACC_DOCUMENT_POST by creating a test program and just passing the values to the respective Internal tables. Kindly check the code and also the errors I am getting and suggest.

DATA: w_header TYPE bapiache09 ,

i_gl TYPE STANDARD TABLE OF bapiacgl09,

i_currency TYPE STANDARD TABLE OF bapiaccr09 ,

i_return TYPE STANDARD TABLE OF bapiret2,

v_objtype TYPE awtyp,

v_objkey TYPE awkey,

v_objsys TYPE awsys,

w_currency TYPE bapiaccr09,

w_gl TYPE bapiacgl09 .

w_header-username = sy-uname.

*w_header-obj_type = 'BKPFF'.

*w_header-obj_key = '$'.

*w_header-obj_sys = 'CEDCLNT120'.

*w_header-bus_act = 'RFBU'.

w_header-doc_date = '20151106'.

w_header-comp_code = 'CTBT'.

w_header-pstng_date = '20151106'.

w_header-header_txt = 'ABCD'.

w_currency-currency = 'USD'.

w_currency-itemno_acc = '0000000010'.

w_currency-amt_doccur = 100.

APPEND w_currency TO i_currency.

w_currency-currency = 'USD'.

w_currency-itemno_acc = '0000000020'.

w_currency-amt_doccur = -100.

APPEND w_currency TO i_currency.

w_gl-gl_account = '0000738000'.

*w_gl-bus_area = 'RFBU'.

w_gl-sub_number = '0000'.

w_gl-itemno_acc = '0000000010'.

w_gl-item_text = 'WERTT'.

w_gl-acct_type = 'A'.

w_gl-doc_type = 'AA'.

w_gl-comp_code = 'CTBT'.

w_gl-ALLOC_NMBR = '1234567891'.

w_gl-funds_ctr = '1A12B'.

w_gl-cmmt_item = 'TCIOTHER'.

w_gl-fund = 'CIFS'.

w_gl-asset_no = '140000000012'.

w_gl-sub_number = '0000'.

w_gl-FUNC_AREA_LONG = '1001_2015'.

w_gl-CS_TRANS_T = '120'.

APPEND w_gl TO i_gl.

w_gl-gl_account = '0000738000'.

*w_gl-bus_area = 'RFBU'.

w_gl-sub_number = '0000'.

w_gl-itemno_acc = '0000000020'.

w_gl-item_text = 'WERT'.

w_gl-acct_type = 'A'.

w_gl-doc_type = 'AA'.

w_gl-comp_code = 'CTBT'.

w_gl-ALLOC_NMBR = '1234567891'.

w_gl-funds_ctr = '1A12B'.

w_gl-cmmt_item = 'TCIOTHER'.

w_gl-fund = 'CIFS'.

w_gl-asset_no = '140000000012'.

w_gl-sub_number = '0000'.

w_gl-FUNC_AREA_LONG = '1001_2015'.

w_gl-CS_TRANS_T = '120'.

APPEND w_gl TO i_gl.

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'

EXPORTING

DOCUMENTHEADER = w_header

IMPORTING

obj_type = v_objtype

obj_key = v_objkey

obj_sys = v_objsys

TABLES

ACCOUNTGL = i_gl

* ACCOUNTRECEIVABLE =

* ACCOUNTPAYABLE =

* ACCOUNTTAX =

CURRENCYAMOUNT = i_currency

return = i_return.

Errors screenshot is attached.

BAPI Errors.png (160.3 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 09, 2015 at 09:12 AM

    Hi,

    I suggest that you debug, or do a where-used on the message numbers listed in the BAPI return table.

    You'll learn more (and have some fun) by solving it yourself!

    cheers

    Paul

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.