Skip to Content

This document will explain you on how to use the custom user defined functions in the decision step of the process chain.

IMPLEMENTATION OF BADI “RSAR_CONNECTOR”

Display the BADI “RSAR_CONNECTOR” in SE18

/wp-content/uploads/2014/07/01_490807.jpg

Create an implementation as explained below.

/wp-content/uploads/2014/07/01_490807.jpg

/wp-content/uploads/2014/07/02_490839.jpg

Save and activate the implementation, then the implementation will change to Active.

/wp-content/uploads/2014/07/03_490840.jpg

Go to the “Name of implementing class” and do the custom coding inside the method

“IF_EX_RSAR_CONNECTOR~GET”

/wp-content/uploads/2014/07/04_490841.jpg

Make sure that the new custom function should start with “C_”.

/wp-content/uploads/2014/07/05_490842.jpg

Create a class ZTEST_CL_DATE and method CHECK_DATE.

/wp-content/uploads/2014/07/06_490843.jpg

/wp-content/uploads/2014/07/07_490844.jpg

CREATION OF PROCESS CHAIN AND USE OF THE CUSTOM DEFINED FUNCTION

Now go to RSPC transaction and create a process chain as below, where we will use the custom defined function created in the decision step.

In the below chain we will create Start step –>  Decision step –> Program step

/wp-content/uploads/2014/07/01_490807.jpg

Decision step with condition on ‘Friday’

/wp-content/uploads/2014/07/02_490839.jpg

Now from the drop-down list select CUSTOM User defined functions and then add the custom and save the step.

/wp-content/uploads/2014/07/03_490840.jpg

Now do the check and activate the chain, then execute the chain.

/wp-content/uploads/2014/07/04_490841.jpg

After executing monitor it in ST13 and the result should be decision 1 should be executed and it ran as expected.

/wp-content/uploads/2014/07/05_490842.jpg

Kindly provide your feedback or any further points to be included.

To report this post you need to login first.

12 Comments

You must be Logged on to comment or reply to a post.

  1. Alexis Sanz

    Hi,

    Thanks a lot for the document, very helpful!!

    Just a comment about an issue I faced recently: if afterwards, all this, was implemented in the system, you change the method parameters within your class, because you want to enhance the functionality. You may face issues when trying to use it again, because it seems the system it is not updating properly the table: SFBMETHSIG which contains the parameters of the method used in the decision step within RSPC.

    So, until this “bug” is fixed, I recommend you to create a clean new method in that case, and so avoid the issue.

    Regards!

    (0) 
  2. Igor Klushnev

    Hi,

    Could you please show the declaration of importing\exporting parameters of the class? And is it possible to declare more than one importing parameter? If yes, how to pass the values into custom function in formula editor?

    Many thanks!

    (0) 
    1. Alexis Sanz

      Hi Igor,

      The declaration in the import/export has nothing special, you can put anything you need if it is allowed by the formula editor to be used. And of course you can use more than one. In my case I used some strings. Something like:

      C_CHECK_( ‘String1’, ‘String2’ ) = ‘TRUE’

      In the logic, those strings are checked against some tables, and if the meet the requirements for that current day, they send back TRUE.

      (0) 
      1. Igor Klushnev

        Thanks! Thus I mean what is the sequence of the tranfsfer parameters in the formula. Is it match the order of the importing parameters in the method declaration?

        (0) 

Leave a Reply