In this blog, we will learn the details about BTE with Example. ( Example: how to make the screen field non-editable by using BTE in the FB02 transaction. )
BTE: BTE standards for Business Transaction Event. It is mostly used for the FI modules. In short, BTE is nothing but a custom function module attach to the standard program to enhance the functionality.FIBF is the tcode for BTE.
BTE is of two categories
- Public & Subscribe interface : In this type, it is used to put some additional steps external to application.Lets suppose add mail functionality in the flow Dunning process or send an IDoc etc. This will not change the application data in the flow.Basically the custom FM which is attached to the BTE,does not have changing parameters.
- Process: interface: It is used for changing the functionality of application by changing the application data in the flow.In short the custom FM attach to the BTE does have changing/Exporting paramters.
The custom function module is a hook and attached to the standard function module. The standard function module having the following naming convention
OPEN_FI_PERFORM_<BTE NUMBER>_P - for Process type
OPEN_FI_PERFORM_<BTE NUMBER>_E - for Public & subscribe (P/S)
Methods to find a BTE in standard Tcode
- Using the Tcode FIBF
- Using Breakpoint method: Set the Breakpoint on the FM BF_FUNCTIONS_FIND (For Public & subscribe) , FM PC_FUNCTIONS_FIND (for Process)
In our case, we need to find the Process BTE in the FB02 transaction. So we have set the breakpoint at PC_FUNCTIONS_FIND FM and get the BTE number like below
Let’s check out an example to implement the BTE in the system.
Requirement:
Make the line item text field (BESG-SGTXT) non-editable for a particular company code in the FB02 Transaction.
Steps: This is a five step process. Steps are given below
FUNCTION ztest_process_00001420.
*"--------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_BKPF) LIKE BKPF STRUCTURE BKPF
*" VALUE(I_BSEG) LIKE BSEG STRUCTURE BSEG
*" VALUE(I_AKTYP) LIKE T020-AKTYP
*" TABLES
*" T_NOINPUT STRUCTURE OFIBM
*" T_INVISIBLE STRUCTURE OFIBM
*"--------------------------------------------------------------------
IF i_bkpf-bukrs = 1016.
"make the BSEG-SGTXT non editable
APPEND VALUE #( fname = 'BSEG-SGTXT' ) TO t_noinput.
ENDIF.
ENDFUNCTION.
Result:
Like customer exit (detail can be found in the link ) it has also the feature of switch on-off functionality. The BTE can be disabled by deactivating the Product (in step 4).
Check out our OData series OData – ABAP Skill
Check out our CDS View Series CDS – ABAP Skill
Check out ABAP Blogs ABAP – ABAP Skill
SAP Document: Link
0 Comments