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
Go to FIBF transaction code > Settings in menu bar > Products > Customer > Create one product as ZPRODUCT and save.
2. Assign FM to the Product
Go to FIBF transaction code > Settings in menu bar > Process Modules > of a customer >
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.
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
Double click on the line item
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.
2. Go to FIBF transaction code > Settings in menu bar > Products > P/S Modules > of a customer > Create one product as ZTEXT and save.
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.
.
5. Once coding is done we can do the invoice posting to check the long text
Long text is updated as shown below
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |