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

Cross company posting with BAPI_ACC_DOCUMENT_POST, ACC_DOCUMENT03

Former Member
0 Likes
2,708

Hi, I am having issue in cross company posting with BAPI_ACC_DOCUMENT_POST/ACC_DOCUMENT03.

As per SAP note 561175, first ACCOUNTGL line item should have same comp code as that of header.

In our implementation, any ACCOUNTGL line item may not match header company code. All IDocs are failing in this scenario. Can you help?

Below is the Idoc data for reference.

Segment:E1BPACHE09 (header)

BUS_ACT RFBU

USERNAME GISADMIN

HEADER_TXT TEXT

COMP_CODE 1020

DOC_DATE 20081216

PSTNG_DATE 20081102

DOC_TYPE Z2

REF_DOC_NO AE500

Segment: E1BPACGL09 (G/L Line item)

ITEMNO_ACC 1

GL_ACCOUNT 0000435010

ITEM_TEXT Miscellaneous Correc

COMP_CODE 1031

PROFIT_CTR 0011290003

ITEMNO_ACC 2

GL_ACCOUNT 0000100100

ITEM_TEXT Miscellaneous Correc

COMP_CODE 1031

PROFIT_CTR 0011290003

ITEMNO_ACC 3

GL_ACCOUNT 0000202000

ITEM_TEXT Miscellaneous Correc

COMP_CODE 1031

PROFIT_CTR 0090660003

Segment: E1BPACCR09

ITEMNO_ACC 1

CURR_TYPE 00

CURRENCY USD

AMT_DOCCUR -100

ITEMNO_ACC 2

CURR_TYPE 00

CURRENCY USD

AMT_DOCCUR 50

ITEMNO_ACC 3

CURR_TYPE 00

CURRENCY USD

AMT_DOCCUR 50

It is giving 'FI/CO interface: Inconsistent FI/CO document header data for updating

Message no. RW015' error.

Any help is approciated.

Hi, I am having issue in cross company posting with BAPI_ACC_DOCUMENT_POST/ACC_DOCUMENT03.

As per SAP note 561175, first ACCOUNTGL line item should have same comp code as that of header.

In our implementation, any ACCOUNTGL line item may not match header company code. All IDocs are failing in this scenario. Can you help?

Below is the Idoc data for reference.

Segment:E1BPACHE09 (header)

BUS_ACT RFBU

USERNAME GISADMIN

HEADER_TXT TEXT

COMP_CODE 1020

DOC_DATE 20081216

PSTNG_DATE 20081102

DOC_TYPE Z2

REF_DOC_NO AE500

Segment: E1BPACGL09 (G/L Line item)

ITEMNO_ACC 1

GL_ACCOUNT 0000435010

ITEM_TEXT Miscellaneous Correc

COMP_CODE 1031

PROFIT_CTR 0011290003

ITEMNO_ACC 2

GL_ACCOUNT 0000100100

ITEM_TEXT Miscellaneous Correc

COMP_CODE 1031

PROFIT_CTR 0011290003

ITEMNO_ACC 3

GL_ACCOUNT 0000202000

ITEM_TEXT Miscellaneous Correc

COMP_CODE 1031

PROFIT_CTR 0090660003

Segment: E1BPACCR09

ITEMNO_ACC 1

CURR_TYPE 00

CURRENCY USD

AMT_DOCCUR -100

ITEMNO_ACC 2

CURR_TYPE 00

CURRENCY USD

AMT_DOCCUR 50

ITEMNO_ACC 3

CURR_TYPE 00

CURRENCY USD

AMT_DOCCUR 50

It is giving 'FI/CO interface: Inconsistent FI/CO document header data for updating

Message no. RW015' error.

Any help is approciated.

5 REPLIES 5
Read only

arjun_subhash
Active Participant
0 Likes
1,231

Hi,

Dont u have any entries in accountrecievable or accountpayable tables?

regards

Arjun

Read only

0 Likes
1,231

this is a working code,

HEADER structure:

doc_header-bus_act = 'RFBU'.

doc_header-doc_date = sy-datum.

doc_header-doc_type = KR.

doc_header-comp_code = 100. -


> 1st Company Code

doc_header-pstng_date = sy-datum.

doc_header-username = sy-uname.

ACCOUNTPAYABLE table:

doc_vendor-itemno_acc = 0000000001.

doc_vendor-vendor_no = '500000'.

doc_vendor-comp_code = 100. -


> 1st Company Code

APPEND doc_vendor.

CURRENCYAMOUNT table:

doc_values-itemno_acc = 0000000001.

doc_values-curr_type = '00'.

doc_values-currency = 'INR'.

doc_values-amt_doccur = -1000.00.

doc_values-itemno_acc = 0000000002.

doc_values-curr_type = '00'.

doc_values-currency = 'INR'.

doc_values-amt_doccur = 1000.00.

APPEND doc_values.

ACCOUNTGL table:

doc_item-itemno_acc = 0000000002.

doc_item-gl_account = '6500000000'.

doc_item-acct_type = S.

doc_item-comp_code = 200. -


> 2nd Company Code

doc_item-costcenter =xxxxxx.

APPEND doc_item.

regards

Arjun

Read only

0 Likes
1,231

which process code to use

I have assigned as BAPI

it is proposing function --- BAPI_IDOC_INPUT1

can i have to change the function as in the table TBDBE

as IDOC_INPUT_ACC_DOCUMENT.

or the system proposed will work....

Read only

0 Likes
1,231

BAPI process code will point to BAPI_IDOC_INPUT1 and in this FM it will execute IDOC_INPUT_ACC_DOCUMENT FM.

Read only

Former Member
0 Likes
1,231

I checked the SAP note and it says first line item number's comp code should match header comp code and it worked.