cancel
Showing results for 
Search instead for 
Did you mean: 

SAP SDI flow graph -- Pass values to varaibles

0 Kudos

I created a flow graph batch task with variables as from date and to date and we are using the variables to filter the data in the flow graph.

As we want to run/schedule the flow graph every day with from date = currentdate -1 and to date = current date. Is there a way to pass the from and to date values dynamically.

Thanks

Srini

0 Kudos

Can anyone help me regarding how to pass values into variables dynamically in flow graph

Thanks

Srini

Accepted Solutions (1)

Accepted Solutions (1)

Hi Srini,

you can use expression variables to form the appropriate filter expressions.

Inside those variables you can use hana functions like CURRENT_DATE to make it dynamic.


e.g. variable nextDay with value ADD_DAYS(TO_DATE(CURRENT_DAY),1);

in the filter expression you can access it using $$nextDay$$

Kind regards,

Timo Wagner

0 Kudos

Hi Timo

Thanks for your reply, when i look at the variables in flowgraph.

For expersion kind, i dont see a place to write HANA Function, PLease see the below screenshot.

Let me know if i'm missing anything

Thanks

Srini

Answers (3)

Answers (3)

0 Kudos

Hi all,

I want to do exactly the same but as I have several flowgraphs that need to be started with the same date, I would like to define the variable in the stored procedure, in order to have to input it once for all the flowgraphs. So, I defined a stored procedure where the value of my flowgraph variable is set. However, I cannot pass value of CURRENT_DATE from my stored procedure into my flowgraph. It is giving me '1998'. Four days ago, it was giving me '2002'. How is this possible?

EXEC 'START TASK "<SchemaName>"."1_Flowgraphs::ZTEST_VARIABLE_FLOWGRAPH"("DATE" => ''' ||CURRENT_DATE||''' )'; is giving me "1998" as $$DATE$$.

Thank you.

ivaylo_ivanov
Explorer
0 Kudos

Hi Srinivas,

Could you share the source of the procedure?

My problem is similar...I want to filter records modified last 10 days.I defined variable in Filter Transformation, but can't pass result from ADD_DAYS(TO_DATE(CURRENT_DATE),-10).

Thanks!

Ivaylo Ivanov

0 Kudos

We created a wrapper for the flow graph and population the date values with in the procedure