Showing posts with label BTE. Show all posts
Showing posts with label BTE. Show all posts

Aug 13, 2024

BTE, BADI or Eser-exit for Transaction F110

When working with transaction F110 (Automatic Payment Program) in SAP, you have several options to enhance or customize its functionality, including BTEs, BADIs, and User Exits. Each has its use case depending on the specific requirement. Here's an overview of when and how to use each:

1. BTE (Business Transaction Events)

  • Use Case: BTEs are suitable for situations where you need to extend SAP standard processes without modifying the core code. For F110, BTEs can be used to enhance the payment process by adding custom validations or processing steps.
  • Relevant BTEs:
    • BTE 1810: Can be used for adding additional validations during the payment proposal run.
    • BTE 00002040: Useful for custom modifications during the payment run.
  • Configuration: Use transaction FIBF to search, implement, and register BTEs.

2. BADI (Business Add-In)

  • Use Case: BADIs are more flexible and powerful than BTEs, offering object-oriented enhancements. They are ideal when you need to add custom business logic or integrate additional processing steps during the payment run.
  • Relevant BADIs:
    • BADI_F110_SCHEDULE_JOB: Allows for enhancements when scheduling the payment job.
    • BADI_F110_PRINT: Used to enhance the print program for the payment advice or other documents.
  • Configuration: Use transaction SE18 to explore and implement BADIs. You can define and implement multiple instances of a BADI.

3. User Exits

  • Use Case: User Exits are more traditional and can be used when you need to make specific adjustments at predefined points in the program. They are often used when dealing with older versions of SAP.
  • Relevant User Exits:
    • EXIT_SAPF110S_001: This exit allows you to include additional data or processing before the payment run starts.
    • EXIT_SAPF110V_001: It can be used to influence the selection of items for payment.
  • Configuration: User Exits require code to be added to include programs. You can explore these using transactions CMOD and SMOD.

Which One to Use?

  • For Simple Enhancements: Use BTEs if your enhancement is straightforward and falls within the scope of what a BTE can handle.
  • For Complex Enhancements: If you need more complex processing or object-oriented enhancements, BADIs are generally more powerful and flexible.
  • For Specific Adjustments: If you need to adjust specific points within the F110 process that are covered by User Exits, they can be a suitable option, especially in older SAP environments.

Conclusion

  • BTE: Best for simple, event-driven customizations.
  • BADI: Ideal for complex, object-oriented enhancements.
  • User Exit: Suitable for targeted modifications within predefined areas of the program.

Choose based on your specific needs, the complexity of the enhancement, and the SAP environment you're working in.

Feb 10, 2016

Change item text in FB60 using BTE 1120

Step 1. Go to transaction FIBF. Click Environment > Infosystem (process)










Step 2. Atribute Type  = 'A' (Application Component). and execute



















Step 3. Click on Process 00001120
















Step 4. Click on Sample Function Module























Step 5. Copy the sample program SAMPLE_PROCESS_00001120 to Z or Y program and create the customized codes.
























































Step 6. Name the Product. Settings > Products > of a Customer




















Step 7. Settings > Process Module > of a Customer













The Result:















Jan 27, 2016

How to Search BTE?

Posted by Vinod Vemuru in SAP ERP Financials on May 13, 2014
http://scn.sap.com/community/erp/financials/blog/2014/05/13/how-to-search-bte


Are you facing difficulties in finding out correct BTE to implement for your custom requirements? Doing extensive search over net/SCN? Not required now!!!

Yes, SAP has already given awesome “BTE search tool” which many people are unaware. I came across this interesting tool during my R&D and found it very helpful.
Hence, sharing this with the community.

Before we go on how to use this tool, let us go through little basics of BTE.

Business transaction event is delivered by SAP to code customer specific requirements during predefined standard processes. Call points are already defined by SAP. All we need to do is just plug in our code in the BTE based on our requirements and SAP would play it during standard process

Business transaction events are of two types.

Process BTE:

Process BTEs are called at a fixed, predefined points during the standard SAP program flow at which the system can process user defined/custom function modules instead of the standard function module. The pre-conditions/rules for calling up alternative processes are defined in the  customization of BTEs in t-code FIBF. There would be standard function module OPEN_FI function module assigned by default by SAP. If there are no custom function modules assigned in FIBF, standard function module is processed. Data and process flow of standard SAP can be changed in BTE.

OPEN_FI function module select the FM to be processed for P/S BTE.

Function module PC_FUNCTION_FIND determines the function module to process from the following tables (equal priority):

a) TPS34 Customer-Specific Function Modules
b) TPS32 Partner Function Modules
c) TPS31 SAP Function Modules
d) TPS01 Standard Function Module


Publish & Subscribe (P/S) BTE:

P/S BTEs are called at a fixed, predefined points during the standard SAP program flow. Data can only be published to another application through P/S BTE i.e. we can only export the data to P/S BTE. Changes to program flow or data can’t be performed here. The pre-conditions/rules for calling up alternative processes are defined in the  customization of BTEs in FIBF.

OPEN_FI function module select the FM to be processed for P/S BTE.

Function module BF_FUNCTIONS_FIND which is called inside OPEN_FI function module determines the function modules to process from the following tables:

a) TBE34 Customer-Specific Function Modules
b) TBE32 Partner Function Modules
c) TBE31 SAP Function Modules

(Source: Partly from F1 help)

How to search BTE:

Assume you have business requirement to implement a custom functionality to send an SMS alert to customers when dunning run is done. Since standard SAP does not have such functionality,
You can look for BTE for this.

Go to below t-codes
BERP: To search for process BTE
BERE: To search for P/S BTE

Both t-codes have same selection fields.

Select the attribute type A (Application component) and click F4 on selection attributes field.

z.png
In the next popup, drill down to the process area you are looking for. The paths displayed here are similar to SPRO path.
Select appropriate node. In this case it is DUNNING.

z.png
Path would come as shown below.
z.png

You can further restrict the search by entering other selection parameters which are self-explanatory. Now execute the program.
Output would show the list of available BTEs for the given node. Most of the times, description of the BTE says functionality.

z.png
Select appropriate BTE and use below tool bar options to explore further. We can see the sample FM delivered by SAP, interface of the BTE, Documentation etc.
z.png
Custom FMs can be created with the same interface as of sample FM. One common error seen while implementing the BTE is, custom FM interface may differ than standard FM interface.
In this case, the process would go for dump. This is because, SAP determines the FM name during run time (Dynamic call).

Similarly, search can be done based on other parameters like based on Business object name, IMG nodes etc.

You are welcome to post your comments and feedback on this blog

Regards,
V V

Sep 30, 2015

BTE - Business Transaction Event

BTE - Business Transaction Event

Enhancement type developed for FI (Financial Accounting).
 SAP Reference IMG -> Financial Accounting -> Financial Accounting Global Settings -> Business Transaction Events  .
Customizing can be done via transaction FIBF.
Main steps for activating a BTE:
  1. Check OSS note for documentation and explanation 
  2. Copy sample function module SAMPLE_INTERFACE_<event_number> to Customer namespace 
  3. Make sure the application is active for Business Transaction Events , else maintain table TBE11.
  4. Maintain table TBE34 and TBE01
  5. Enter code to the BTE function module
How to check/debug?
To check the functionality, you can put a break-point in your BTE function module. If it's not called, put a breakpoint at FM OPEN_FI_PERFORM_<BTE number>_E.
Related Transaction Code :
    BERE Business Event Repository
    BERP Business Processes
    BF31 Application modules per Event
    BF32 Partner Modules per Event
    BF34 Customer Modules per Event
    BF41 Application Modules per Process
    BF42 Partner Modules per Process
   BF44 Customer Modules per Process 
 BTE exits to add additional components to the SAP standard system, for example in the form of function modules. There are two types of interface:
-        Publish and Subscribe interfaces
-        These give information that specific events have occurred in the SAP standard application and provide the data generated to external software. However the external software does not return any data to the SAP standard system.
-        Process interfaces
These subject business processes to an external control function that is not part of the standard system; in other words the process interfaces interrupt the standard process and deliver data to the SAP application.
A BTE exit is called up in the process, meaning that process modules check the events in Customizing for calling up the BTE exits. In the BTE method, function modules are called up in specified events, to which they have been assigned in Customizing. The event interface is predefined. To activate the process modules, choose _Settings for Process Interfaces -> Assign Customer Function Modules to Process Interfaces.



Jan 3, 2011

Add Field in Transaction FBL3N

Add Field in Transaction FBL3N

You can use OpenFI 1650 and add any fields to ALV line in FBL1N, FBL3N, FBL5N. It's simple. In this sampe you will add fields Vendor (LIFNR) and Customer (KUNNR).

Steps:
  • Include field ZZLIFNR & ZZKUNNR as add.structure in RFPOS, RFPOSX.
  • Copy func.module SAMPLE_INTERFACE_00001650 in ZFM_FBL3N and developing use ZZLIFNR & ZZKUNNR field...
FUNCTION zfm_fbl3n.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(I_POSTAB) LIKE  RFPOS STRUCTURE  RFPOS
*"  EXPORTING
*"     VALUE(E_POSTAB) LIKE  RFPOS STRUCTURE  RFPOS
*"----------------------------------------------------------------------

*-------------- Initialize Output by using the following line ----------

  e_postab = i_postab.
  TABLES: lfa1, kna1, bseg.
  SELECT SINGLE lifnr kunnr
    FROM bseg INTO (e_postab-zzlifnr, e_postab-zzkunnr)
    WHERE bukrs = i_postab-bukrs
      AND gjahr = i_postab-gjahr
      AND belnr = i_postab-belnr
      AND ( kunnr  <> '' OR lifnr <> '' ).

ENDFUNCTION.
  • Activate OpenFI (FIBF tr.code).
  • Create product of a customer
addfieldfbl3n001

  • Add Z1650 and Text and activate
addfieldfbl3n002

  • Create P/S Modules of a customer
addfieldfbl3n003

  • Assign Func.Module ZFM_FBL3N to Event 1650 & Product Z1650
addfieldfbl3n004

  • Run RFPOSXEXTEND (regenerate structure) and BALVBUFDEL (clear ALV).
This program can only be run by user who has admin authority. Contact Basis user or IT administrator for assistance