Friday, 4 January 2019

BTE 00001110 – CHANGE DOCUMENT: Save the standard data VS FI Validation Rule

I would like to share with you the use of Business Transaction Event 1110 – CHANGE DOCUMENT: Save the standard data comparing to the FI Validation Rule.

Many experts in SAP don´t know about the BTE’s and mainly the BTE 1110 – CHANGE DOCUMENT: Save the standard data.

SAP ABAP Tutorial and Material, SAP ABAP Certification, SAP ABAP Learning, SAP ABAP Study Materials

1st BENEFIT:


Personally, I prefer this BTE instead of the FI validation rule in some cases because of the Validation Rule is triggered every time you change the FI document and this sometimes are really boring, even if you don´t save or park the finance accounting document.

So, this is the first benefit of the BTE 1110: it´s triggered only when you Save or Park the finance document.

2nd BENEFIT:


The other benefit is, on the structure of the function module, you have the old data and the new data (after the change).

function zfi_interface_00001110.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(I_XBKPF) LIKE  BKPF STRUCTURE  BKPF
*"     VALUE(I_YBKPF) LIKE  BKPF STRUCTURE  BKPF
*"  TABLES
*"      XBSED STRUCTURE  FBSED
*"      YBSED STRUCTURE  FBSED
*"      XBSEG STRUCTURE  FBSEG
*"      YBSEG STRUCTURE  FBSEG
*"----------------------------------------------------------------------

YBSEG, YBKPF and YBSED keep the original document data while the XBKPF, XBSEG and XBSED has the change and new data of the finance document.

There are some validation case, that you should select BKPF or BSEG table to compare old and new data to perform your validation logic. So, the benefit here, you already have both!!!

3rd BENEFIT


If you need to record and manipulate data in a Z table for example after the validation or substitution rule, when the user are changing the FI document. For example, to log additional change log of the FI document.

You cannot use the Validation Rule or Substitution Rule to Commit data in Z tables if you have some need related to this. The main reason, is because the substition rule and validation rule are called everytime when the user is changing the FI document, so you will not know when insert/change and commit the Z data.

The benefit to use the BTE 1110 is that it´s called only when the user is saving the FI accounting document.

You can access the Finance Accounting BTE’s thru SAP Reference IMG -> Financial Accounting -> Financial Accounting Global Settings -> Business Transaction Events.

No comments:

Post a Comment