Skip to Content
0
Former Member
Feb 24, 2006 at 12:25 PM

BAPI_ACC_DOCUMENT_POST - problem with COPA

3574 Views

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