Creating custom functions

In this recipe, we will get familiar with a Smart Editor tool available in Designer to help you write your scripts or functions in a convenient way.

We will create a new function that can be executed either within a script or within a dataflow. This function accepts two parameters: date value and number of days. It then adds the number of days to the input date and returns the result date.

How to do it…

  1. Open Designer and go to Tools | Custom Functions… from the top level menu:
    How to do it…
  2. In the opened window, right-click in the area with the list of functions and choose New….
  3. Choose the name of the new fn_add_days function and populate ...

Get SAP Data Services 4.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.