Skip to Content
Author's profile photo Former Member

Integrating TVARV and Decision Node to determine Process Chain flow

Business Requirement

Business needs set of data flows to be executed at the end of the month based on certain configuration parameters value.  Data load program / method should have intelligence to decide which data loads to carry out based on set of configuration parameter’s values.

Technical Solution Overview

Technical / Configuration parameters to be created & updated in table TVARV.

Following parameters were created in TVARV

  • CORRECT_RUN (Possible Values ‘Y’ ‘N’ ‘ ‘)

Process chain should execute only when we have “CORRECT_RUN” parameter set as “Y” and then for given “FISCAL_PERIOD” parameter should extract data in corresponding data target. Dynamic determination of “FISCAL_PERIOD” was  executed in DTP using filter with Code option.

Technical solution was accomplished using combination of “BADI” and “Decision node” in Process chain. BADI is implemented to create custom function which will read data from TVARV into formula editor and return values from this custom function would be feed into decision node to determine which set of data loads to be continued.

Step by Step Solution

Following is step by step approach of achieving business  functionality,

  1. Go to SE19 ->  Input BADI implementation name and click on Create Implementation.


This implementation should be created on definition named “RASR_CONNECTOR”.

     2. Double click on “GET” method ,


     3. Paste following code in the ABAP Editor ,

      CASE I_KEY.
      WHEN 'CUSTOM'.
                    CLEAR: L_FUNCTION.
     **Specfiy implementing class name below It can be referred in the screen **above just below “Interface Name”
                      L_FUNCTION-CLASS      = 'ZCL_IM_....'.
     ****Name of the method to be created in the class
     ***Technical name of the function , This will be used in the formula builder
     ***Technical name of the function , This will be used in the formula builder **as text of the function
      L_FUNCTION-DESCRIPTN  = 'Read from TVARV'.

     4.Now double click on the implementing class, and following screen will be displayed.


     5.Add new method “SOME_PARA_READ” . Specify level as “Static” and Visibility as “Public”.


     6.Double click on the method  “SOME_PARA_READ”  and write code as specified below,


  select single low into e_param_value from TVARV where name = i_param_name.

     Note : This code is very specific to read data from TVARV table, based on the scenario this may be changed.

     7.Activate BADI Implementation by pressing Ctrl + F3 or clicking on highlighted button in the tool bar. Unless activation is done we may not see the functions

        in formula editor.


     At this step we are through with BADI implementation, now process chain with decision node to be focused on to work upon.

     8.Include Decision node in the process chain and following screen will appear. Click on create/ edit formula,



     9.Functions defined in the BADI are available only when we click on “User Defined Functions”. Click on “User Defined Functions” and select the functions         which have been coded in section above.


     10. Following formula should be put in the formula editor to validate values of parameter named “CORRECT_RUN” and “FISCAL_PERIOD”.


     11. Sample process chain looks like as follows with usage of Decision node. Based on parameters specified in TVARV table, decision node will decide which           process chain to trigger.


Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.