cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_ACC_DOCUMENT_POST - problem with COPA

Former Member
0 Kudos

Hi all,

I'm using the function BAPI_ACC_DOCUMENT_POST to post documents like F-02. It's working right, but it's not transfering to CO-PA. I'm trying to fill the table CRITERIA to pass values for proftability segment, but it's not working right for that.

I was filling CRITERIA for the follow fields, but I receive a error message in return of BAPI that says 'Complete PA structure ... ' :

CLEAR I_BAPIACKEC9.

I_BAPIACKEC9-ITEMNO_ACC = p_item.

I_BAPIACKEC9-FIELDNAME = 'KNDNR'.

I_BAPIACKEC9-CHARACTER = i_report-kunnr.

APPEND I_BAPIACKEC9.

CLEAR I_BAPIACKEC9.

I_BAPIACKEC9-ITEMNO_ACC = p_item.

I_BAPIACKEC9-FIELDNAME = 'ARTNR'.

I_BAPIACKEC9-CHARACTER = i_report-matnr.

APPEND I_BAPIACKEC9.

Could anyone send me an example of the function ( BAPI_ACC_DOCUMENT_POST ) using table CRITERIA to transfer data to COPA ?

Thanks

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Savitha,

follow the values in structures to call BAPI:

HEADER:

-


OBJ_TYPE BKPFF

OBJ_KEY $

OBJ_SYS CTD600

BUS_ACT RFBU

USERNAME FERRATRE

HEADER_TXT 4400000325

COMP_CODE 7100

DOC_DATE 20060209

PSTNG_DATE 20060209

TRANS_DATE 00000000

FISC_YEAR 2006

FIS_PERIOD 08

DOC_TYPE GG

BAPIACKEC9:

-


0000000002|ARTNR|000000000000530404

0000000002|KNDNR|0000080018

0000000002|SPART|10

0000000002|VKORG|BZ01

0000000002|VTWEG|10

BAPIACGL09:

-


ITEMNO_ACC 0000000002

GL_ACCOUNT 0000040000

DOC_TYPE GG

FIS_PERIOD 08

FISC_YEAR 2006

PSTNG_DATE 20060209

VALUE_DATE 20060209

CUSTOMER 0000080018

TAX_CODE SD

MATERIAL 000000000000530404

BAPIACCR09:

-


ITEMNO_ACC 0000000001

CURRENCY BRL

AMT_DOCCUR 136.0000

MESSAGE ERROR FROM BAPI:

-


E|RW|609|Error in document: BKPFF $ CTD600

E|KF|018|Complete PA transfer structure FI

W|KI|350|Profitability segment being derived again

Former Member
0 Kudos

Hi,

Fill the customer no in BAPIACCR09 not in BAPIACGL09.

Dont fill these fields in HEADER

OBJ_TYPE BKPFF

OBJ_SYS CTD600

DOC_TYPE GG - what does GG represents I couldn't find doctype with type GG. Is it DG- Customer credit memo??

Message was edited by: savitha m

Message was edited by: savitha m

Former Member
0 Kudos

Hi Regis,

The criteria table which u r filling is correct. That should work . Just check whether the item no matches the correct line item no. Can u specify the GL's for which u r trying to post & exact error message.

Try passing all these fields for COPA table CRITERIA TABLE

'KNDNR'

'ARTNR'

'VKORG'

'VTWEG'

'MATNR'

'SPART'

Regards,

Savitha

Message was edited by: savitha m

Former Member
0 Kudos

Hi

Have you filled the structure BAPIACKEV9?

Max

former_member188685
Active Contributor
0 Kudos

Hi,

Check this Report Program <b>ACC_BAPI_TEST_DOCUMENT</b>.

here you can see the code for Criteria..

Regards

vijay

FredericGirod
Active Contributor
0 Kudos

Hi Regis,

I'm not sure you can send data to CO-PA with this BAPI. What about using user-exit ZXKKEUxx for this ?

Rgd

Frédéric