SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Note 487722 - Using EXTENSION1 for accounting BAPIs



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> FI
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Thu Oct 04, 2007 9:05 pm    Post subject: Note 487722 - Using EXTENSION1 for accounting BAPIs Reply with quote

Note 487722 - Using EXTENSION1 for accounting BAPIs

Summary
When you implement an accounting BAPI, fields are missing in the transfer structure. However, this information has to be transferred.

Other terms
AC interface, CMOD, SMOD, ACBAPI01, EXTENSION1
BAPIs:
BAPI_ACC_DOCUMENT_POST BAPI_ACC_DOCUMENT_CHECK
BAPI_ACC_GL_POSTING_POST BAPI_ACC_GL_POSTING_CHECK
BAPI_ACC_BILLING_POST BAPI_ACC_BILLING_CHECK
BAPI_ACC_INVOICE_RECEIPT_POST BAPI_ACC_INVOICE_RECEIPT_CHECK
BAPI_ACC_GOODS_MOVEMENT_POST BAPI_ACC_GOODS_MOVEMENT_CHECK

Message types:
ACC_DOCUMENT
ACC_GL_POSTING
ACC_BILLING
ACC_INVOICE_RECEIPT
ACC_GOODS_MOVEMENT

Reason and Prerequisites
The fields do not exist in the required structure.

Solution
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.
ENDIF.

Implementing the Business Transaction Event (BTE, also OPEN FI) RWBAPI01 with enhancement structure EXTENSION1 at BAPI_ACC_DOCUMENT_POST
As for CMOD/SMOD exit ACBAPI01, it is possible to change the accounting document in this case. Access: Transaction FIBF:

1. Call the menu path "Settings > Products -> ...of a customer" and create a product that mirrors the function which is to be mapped in the BTE.
2. Create a function module that contains the same interface, such as example module SAMPLE_INTERFACE_RWBAPI01.
3. Call menu path "Settings -> Process function modules > ...of a customer" enter process = RWBAPI01, the function module created and the product.
4. Finally, activate the product you have created in the first step so that the module will run.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> FI All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.