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

BAPI_ACC_DOCUMENT_POST populating coding block fileds in stru EXTENSION1


We have implemented the OSS note 487722 to populate the coding block fields zzcomm_cd and zzmfg_cd to T_ACCIT in BTE RWBAPI01, since these fields are not available in ACCOUNTGL for BAPI_ACC_DOCUMENT_POST, in debug mode these field values are getting mapped correctly and populated to the table t_accit but after posting the document, these coding block fields are not updated at the item level.

If we map these fields at header level in BTE i.e to the structure DOCUMENT_HEADER

  • DOCUMENT_HEADER-ZZCOMM_CD = extension-field2.

  • DOCUMENT_HEADER-ZZMFG_CD = extension-field3.

then these fields are updated with same value with all line items, that make sense. But my question is why these fields not updated when we map to the table T_ACCIT in BTE RWBAPI01 (OSS note 487722 )

Please let me know if you aware of this issue ?

do we need to apply any note ?

BTE Code:


READ TABLE IT_ACCIT WITH KEY POSNR = extension-field1(10).


  • DOCUMENT_HEADER-ZZCOMM_CD = extension-field2.

  • DOCUMENT_HEADER-ZZMFG_CD = extension-field3.

it_accit-zzcomm_cd = extension-field2.

it_accit-zzmfg_cd = extension-field3..




NOTE: the below lines are commented , dont confuse

  • DOCUMENT_HEADER-ZZCOMM_CD = extension-field2.

  • DOCUMENT_HEADER-ZZMFG_CD = extension-field3.

even i have tried by implementing the specified user eixt EXIT_SAPLACC4_001 in the oss note also but did not work.

OSS note 487722:

The fields do not exist in the required structure.


If this situation involves an error (this business transaction was not considered during the development of the BAPI), contact SAP Development. However, an enhancement is possible for the next release since it is not possible to change the stable BAPI interfaces in a current release.For the current project, you have to use enhancement structure EXTENSION1 and implement the CMOD exit ACBAPI01.

If the requirements are not relevant for the SAP Standard System (the business transaction to be implemented is very unusual and company-specific), do not contact SAP and implement the above-mentioned exit.

Implementing CMOD/SMOD exit ACBAPI01 with enhancement structure EXTENSION1:

Transaction CMOD: Select your project or create one.Assign enhancement ACBAPI01 to the project.You can branch to the source code via "Components".Navigate to function module EXIT_SAPLACC4_001.This function module indicates the parameters that are available to change the document.In INCLUDE ZXACCU15 (Customer namespace), carry out your implementation as an ABAP program.

When the BAPI is called, parameter EXTENSION1 is available with the following fields:FIELD1, FIELD2, FIELD3, FIELD4, each with 250 characters.Fill the structure with offset specification, for example, a text is to be transferred to line item 5 (ITEMNO_ACC):

DATA: wa_extension TYPE bapiextc,

it_extension TYPE STANDARD TABLE OF bapiextc.

wa_extension(3) = '005'. "ITEMNO_ACC

wa_extension+3(11) = 'Note 487722'. "Data, not in standard interface

APPEND wa_extension TO it_extension.

Internal table IT_EXTENSION is assigned to the BAPI during the access.

In the implementation of the exit, you have to read the same offset again:

  • Determine line item

READ TABLE t_accit WITH KEY posnr = extension(3).

IF sy-subrc IS INITIAL.

  • Update the line item text

t_accit-sgtxt = extension+3(11).

MODIFY t_accit INDEX sy-tabix.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 09, 2013 at 07:04 PM


    Did you get a solution for your problem?

    I am having the same and can not find any help on SCN.

    Best regards and thank you,


    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.