Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Business Transaction Event for populating text in FI transaction

$
0
0
  • Business Transaction Event are generally found in the Financial Accounting Module in SAP and is available from release 4.0 onwards.
  • A BTE has a predefined interface and allow us to attach additional functionality in the form of a service funtion module.
  • BTE can be used only as source code enhancement. We can’t use BTE for screen and Menu enhancement.
  • BTE are called at specific locations in the SAP object and the association of BTE to the FM is done via T code FIBF.
  • Every BTE has an interface defined by SAP which indicates the various parameters available for use. The interface exists using the naming convention
    ‘SAMPLE_INTERFACE_<BTE event>.
  • Custom BTE’s are created by copying the standard sample interface. The custom FM’s are then associated to the BTE using a product.

 

 

How to find BTE: While executing SAP transaction, the program has to check which functions need to be called for that BTE. This is done by function module BF_FUNCTIONS_FIND. Put a break-point in the source code of function module, the value of the BTE can be found in variable I_EVENT.

       

1st Requirement: To auto populate the text in Tcode FB01, FB60, FB70.

 

Solution: The solution is driven by using the Business Transaction Events (BTE). A Function Module is written to populate the text whenever the BTE triggers.

 

 

This solution will be reflected in T Code FB01, FB60, and FB70.

 

Configuration steps

 

  1. Create a Product in Business Transaction Events(BTE):

 

   Go to FIBF transaction code > Settings in menu bar > Products > Customer > Create one product as ZPRODUCT and save.

Capture.PNG

 

2. Assign FM to the Product

 

Go to FIBF transaction code > Settings in menu bar > Process Modules > of a customer >

Capture.PNG


3. Create a Custom function module by copying SAMPLE_PROCESS_00001120.

 

4.Write the logic in the customized FM to populate the field as per requirement.

 

We need to modify the structure T_BSEGSUB in order to populate the text.

 

Write the logic as per your requirement in FM to display the text.

Capture.PNG

 

 

Once the FM is activated we can do the invoice posting through the respective T Code and the text will be updated in the document as shown below

 

Capture.PNG

Double click on the line item

Capture.PNG

2nd Requirement: To auto populate the long text of line items in TCode FB01, FB60, FB70.


Solution:

1. Create a Product in Business Transaction Events(BTE):

 

  Go to FIBF transaction code > Settings in menu bar > Products > Customer > Create one product as ZTEXT and save.

Capture.PNG

 

2. Go to FIBF transaction code > Settings in menu bar > Products > P/S Modules > of a customer > Create one product as ZTEXT and save.

Capture.PNG

3.Create a Custom function module by copying SAMPLE_INTERFACE_00001030.

 

4. Below is the sample code written in the customized FM to update the long text.



Capture.PNG

  

       .

5. Once coding is done we can do the invoice posting to check the long text

Capture.PNG

 

Capture.PNG

 

Long text is updated as shown below

Capture.PNG


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>