Skip to Content
Author's profile photo Former Member

Custom Formulas in SAP BW Transformations

Advantages of Custom Formula used in SAP BW Transformations

1. Will be available in formulas list.

2. No need to write same logic again and again.

3. Faster developments.

4. No ABAP expertise required to use.

5. Can be enhanced centrally.

6. Risk of error will be minimized.

How to Build

Create an implementation using classic BADI with BADI name RSAR_CONNECTOR (SE19 T CODE)

/wp-content/uploads/2013/12/1_343551.jpg

Give your implementation name

/wp-content/uploads/2013/12/2_343552.jpg

An implementation class as ZCL_IN_<Implementaion_name> will be assigned by default. You check in Interface Tab.

/wp-content/uploads/2013/12/3_343590.jpg

Save it and edit the class in SE24 T Code and add your desired custom methods in Methods Tab. Method should be static and public

/wp-content/uploads/2013/12/4_343595.jpg

Select your method and click on Parameters button to define parameters of your method.(Methods can only have exporting, importing and returning parameters)

Changing parameters are not allowed. Only one exporting or returning parameter is allowed

/wp-content/uploads/2013/12/5_343596.jpg

Double click on the method name to write the logic

Use Parameter name exactly same as they are defined

/wp-content/uploads/2013/12/6_343597.jpg

Check your methods once defined

/wp-content/uploads/2013/12/7_343598.jpg

Go to T code SE19 and open your implementation in change mode, make it inactive to edit it

/wp-content/uploads/2013/12/8_343599.jpg

Open Get method in Interface Tab, this is the place where you can incorporate your custom methods as formula

/wp-content/uploads/2013/12/9_343600.jpg

Double click on the method name to write the code inside it

it has two parameters i_key and c_operands

Code section comprise of two parts

a)Create new category for custom formula

b) Assign custom formula’s to new categories

/wp-content/uploads/2013/12/10_343601.jpg

Activate your GET method

Now you can see new category of formula’s inside your transformation formula list and can use them during developments

/wp-content/uploads/2013/12/11_343602.jpg

in formula’s list

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi,

      good information on custom formulae.

      Rgrds

      Puja

      Author's profile photo Former Member
      Former Member

      Informative doc.. 🙂

      Regards,

      Poorna

      Author's profile photo Krishna Chaitanya
      Krishna Chaitanya

      Good one.  Keep it up 🙂

      Regards,

      Krishna Chaitanya.

      Author's profile photo abilash n
      abilash n

      Nice one Thakral. You made us all look into a new option in Formuale window.. 🙂

      Keep it up. Looking for more excellent blogs from you.....