Skip to Content

HANA SDI FLOWGRAPH - How to pass dynamic value to variable in Filter

Hello,

I have a remote table with a field DateCreated and want to filter and transfer the records from the last 10 days only. When I use constant date in the Flowgraph Filter transformation everything is OK, but I must calculate the period dynamically from current date. I tried using ADD_DAYS(CURRENT_DATE,-10) in FilterExpression, but it was not successfull - there was no where clause in the remote SQL and all records are returned.

Any help with a sample code will be apreciated.Thank you!

Ivaylo Ivanov

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Nov 30, 2017 at 11:05 AM

    Interesting, This should work...

    Are you using XSA or classic flowgraph?

    In fact, what you can do more is to enable debug mode in DPAgent. In the framework.trc will clearly show you which statement has been pushed down to the source. For example when I input filter VBELN = '0000000001' the log will show

    2017-11-30 10:22:44,660 [DEBUG] ABAPAdapter | TableLoaderABAPTable$1.handleRequest - Pushed down whereClause = 2017-11-30 10:22:44,660 [DEBUG] ABAPAdapter | TableLoaderABAPTable$1.handleRequest - options line = ( 2017-11-30 10:22:44,660 [DEBUG] ABAPAdapter | TableLoaderABAPTable$1.handleRequest - options line = VBELN 2017-11-30 10:22:44,660 [DEBUG] ABAPAdapter | TableLoaderABAPTable$1.handleRequest - options line = = 2017-11-30 10:22:44,660 [DEBUG] ABAPAdapter | TableLoaderABAPTable$1.handleRequest - options line = '0000000001' 2017-11-30 10:22:44,660 [DEBUG] ABAPAdapter | TableLoaderABAPTable$1.handleRequest - options line = ) 2017-11-30 10:22:44,691 [TRACE] ABAPAdapter | TableLoaderABAPTable$2.handleRequest - Data callback with num or rows = 1 2017-11-30 10:22:44,691 [DEBUG] ABAPAdapter | TableLoaderABAPTable$2.handleRequest - Responded with end. 2017-11-30 10:22:44,691 [DEBUG] DPFramework | AsyncHandler.processStreamingExecuteStatement - AH(4440): Stream Processing Complete: No Error, Not Closed

    I tried the same statement that you use on the filter node

    "ERDAT" < ADD_DAYS(CURRENT_DATE,-10)

    However, It seems this statement cannot pushed down to the source. I'm opening incident to ask SAP.

    If I know the answer will let you know :)

    Add comment
    10|10000 characters needed characters exceeded