Skip to Content
Author's profile photo Borja Federico Muro Berdasco

BTEs – Business Transaction Events

Business Transaction Events (BTEs) have been available as of Release 4.0 and are another technique for implementing program exits, and only program exits.

BTEs are generally found in the general ledger accounting (FI-GL), account receivable and payable (FI-AR and FI-AP) and sales and distribution components.

A BTE has a predefined interface and allows you to attach additional functionality in the form of a service funtion module.You must create funtion module with the parameters you have previously dictated. The BTE is called by the SAP standard program by a call to function OPEN_FI_PERFORM_ or OUTBOUND_CALL_. This function checks if there are any active BTEs according to customizing.

articulobte1.JPG

According to its Interface there are 2 types of BTEs:

Publish & Subscribe interfaces. Can not update data. Possible to have multiple implementations

Process interfaces. Can update date. Only one active implementation

How to find a BTE (2 ways)

  • Search the source code for for “OPEN_FI_PERFORM” og ” OUTBOUND_CALL_”
  • Use transaction FIBF menu Environment->Info System (P/S ). Use the Documentation button to see the documentation for the BTE.

ArticuloBte2.JPG

Implementing the BTE

  • Goto transaction FIBF menu Environment->Info System (P/S )
  • Select the BTE you want to implement. (as below)

  • Double click on Sample function module
  • Then we copy the sample function module to a Z-function module (First create a new function group for the function module) .

        Note: The name of the Z-function module is not important

  • Edit the code in the new function module:

  • Go back to transaction FIBF – Menu Settings->Products -> Of a customer and create a new product which identifies the new product .

        Remember to mark the Active field.

  • We enter the product name description and RFC destination if applicable. The check box A is to activate the product.
  • The next step is to link the function module and the event using the product created. Go back to FIBF menu Settings->P/S function modules->of a customer – Create an entry that links the BTE and Product with the new function module (as below)

articulobte1.JPG

  • And that´s all, we only need to save and activate. 🙂

Assigned Tags

      17 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Stephen Johannes
      Stephen Johannes

      Another interesting aspect of these events is that the R3 Adapter of the CRM middleware uses these exits to trigger the outbound flow of changes in ERP to CRM and also to enhance the standard transfer on the outbound ERP to CRM side.

      Take care,

       

      Stephen

      Author's profile photo SHANKARANARAYAN KRISHNAMOORTHY
      SHANKARANARAYAN KRISHNAMOORTHY

      Nice,simple explanation .  But If the Z-FM is created in a separate function group, wont it lose all the global data that is in the function group of the original FM ?

      Author's profile photo Stephen Johannes
      Stephen Johannes

      These are supposed to work with the idea you can only process the data you are given as these are exits.  Never been a problem in my experience when used for SAP CRM middleware processing.

      Author's profile photo SHANKARANARAYAN KRISHNAMOORTHY
      SHANKARANARAYAN KRISHNAMOORTHY

      Yeah you are right . Thanks Stephen .

      Author's profile photo Vijay Chintarlapalli
      Vijay Chintarlapalli

      Nice and useful document

      Author's profile photo Sandip Kurewar
      Sandip Kurewar

      It's useful and understandable...!!

       

      Thanks for Sharing your knowledge..

       

      Regards

      Sandip

      Author's profile photo Pritesh Sharad Raut
      Pritesh Sharad Raut

      Very useful and simple Document.

       

      thanks.

       

      Regards,

      Pritesh

      Author's profile photo Former Member
      Former Member

      Thanks for the useful information. It helps to understand to System better

      Author's profile photo Eric Yang
      Eric Yang

      Very nice sharing, Borja. We are applying what you mentioned above in our project. However, we may miss something, so that it leads the function module cannot be called in the transactions. Our case is bellow, could you please help us to check and give us an advice.

       

      We want to use FM ZSAMPLE_PROCESS_00001610 which is copied from SAMPLE_PROCESS_00001610, to calculate the value date and update it when running payment proposal by F110.

      To realize it, here bellow is what have done in BTE settings:

      (1) Configure: Settings>Products>...of a customer.

           Create the product:Z_1610, and activate it.

       

      (2) Configure: Settings>Process Modules>...of a customer.

           Select process 00001610, FM: ZSAMPLE_PROCESS_00001610, product: Z_1610

       

       

      To validate the FM is activated in F110, we set up a break point in function module. and Here bellow is the testing FM:

       

      FUNCTION ZSAMPLE_PROCESS_00001610.

      *"----------------------------------------------------------------------

      *"*"Local Interface:

      *"  IMPORTING

      *"     VALUE(I_PAYRQ) LIKE  PAYRQ STRUCTURE  PAYRQ

      *"  EXPORTING

      *"     VALUE(E_VALUT) LIKE  SY-DATUM

      *"----------------------------------------------------------------------

      BREAK-POINT.

      I_PAYRQ-VALUT = '20150227'.

      E_VALUT = I_PAYRQ-VALUT.

      ENDFUNCTION.

       

      That is all. Highly appreciated for your advice.

      Eric

      Author's profile photo Former Member
      Former Member

      useful document,thanks for sharing.

      Author's profile photo Paulo Roberto Ribeiro de Campos
      Paulo Roberto Ribeiro de Campos

      Very good! Thanks

      Author's profile photo Jatan Saraf
      Jatan Saraf

      Simple to understand and Very much helpful !!!

      Author's profile photo John Vo
      John Vo

      Thanks, very helpful...

      Can we apply this for anothor module (SD, MM...)

      I tried to use with Tcode MIRO, but it can not trigger debuging.

      Author's profile photo Former Member
      Former Member

      Thank you, this a good introduction to the topic for a beginner such as myself.

      Author's profile photo Former Member
      Former Member

      Great Document.

       

      Thanks a lot for sharing your knowledge.

       

      Regards

      Author's profile photo Pras Venkat
      Pras Venkat

      Another document which is useful on steps to use BTE. Thanks anyways.

      Customer Name Addition to FBL5N Report  Using BTE

      Author's profile photo Srikanth Reddy Keesara
      Srikanth Reddy Keesara

      Great. Thank You.