ADF -- Extract from SAP with RFC table option, filter on 2 or more columns

Yannick Seynhaeve 0 Reputation points
2023-09-13T18:17:24.0766667+00:00

Hello

Is there any way we can use multiple conditions on the RFC Table Option field of a copy activity?

Something like this:

User's image

Doing this on 1 column works. However having multiple conditions doesn't seem to work. I've seen that 'AND' operator or 'OR' operator aren't supported.

What's the equivalent for these options in ADF/RFC?

Thanks in advance!

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Amira Bedhiafi 33,071 Reputation points Volunteer Moderator
    2023-09-14T11:28:11.34+00:00

    The filter syntax used in that field is not standard SQL syntax. As per the feedback you provided, it seems that using multiple conditions with standard SQL operators such as 'AND' or 'OR' doesn't work.

    If you can't filter on multiple columns simultaneously, consider performing multiple copy activities in sequence, each with a filter on a different column. This may not be efficient and might add complexity to your pipeline, but it's a workaround.

    If you are able to perform a more general extraction from SAP (with broader criteria) and use subsequent activities in Azure Data Factory to further filter and refine the data go for it . You can do it using Data Flow or Data Bricks activities, depending on the volume and complexity of the transformations required.

    If possible (I don't have a big knowledge of SAP Hana), you may think about encapsulating the complex logic/filter on the SAP side, like creating a custom RFC or a view in SAP that encapsulates this logic and then copying the data from this custom entity.

    0 comments No comments

  2. MADHUSUDAN PANWAR 101 Reputation points
    2024-01-19T12:23:04.79+00:00

    Hi,
    I am able to use 'AND and 'OR' operator in RFC Function module. As an example, you can simply say- GJAHR EQ '2024' AND BUKRS IN ('VALUE1', 'VALUE2')

    GJAHR EQ '2024' OR BUKRS IN ('VALUE1', 'VALUE2')

    Let me know if it helped or you found any alternative solution.

    Thanks,
    Maddy

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.