Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI_ACC_DOCUMENT_POST enhancement ACBAPI01 not working properly

We work with SAP Realise ECC 6.0

We use functions BAPI_ACC_DOCUMENT_CHECK and

BAPI_ACC_DOCUMENT_POST to post FI document automatically.

And we need to fill FI document HEADER field BKPF-XREF1_HD.

In BAPIs I don’t see field XREF1_HD in structure DOCUMENTHEADER.

I read note 487722 and created project with enhancement ACBAPI01 as a component.

At implementation (include ZXACCU15) we have code:

DATA: wa_header TYPE acchd.

DATA: wa_extension TYPE bapiextc.


LOOP AT extension INTO wa_extension WHERE field1 = 'HEADER'.

ASSIGN COMPONENT wa_extension-field2 OF STRUCTURE t_acchd TO <fld>.

IF sy-subrc = 0.

<fld> = wa_extension-field3.



I activated project.

Before calling BAPI we have code:

CLEAR wa_extension1.

wa_extension1-FIELD1 = 'HEADER'.

wa_extension1-FIELD2 = 'XREF1_HD'.

IF u_wa_pdata_temp-prime_id IS NOT INITIAL.

wa_extension1-FIELD3 = 'TS korekcija'.


wa_extension1-FIELD3 = 'TS normalus'.


APPEND wa_extension1 TO it_extension1.

I have a break-point in my exit (include ZXACCU15), but it seems that the exit is not even being performed.

Also I tried to use implement BTE event RWBAPI01.

Buti n SAMPLE_INTERFACE_RWBAPI01 in DOCUMENT_HEADER structure I dont find XREF1_HD field.

How can I fill header field XREF1_HD using BAPIs BAPI_ACC_DOCUMENT_CHECK and


Not what you were looking for? View more on this topic or Ask a question