How can I use a custom RFC to retrieve data via SAP table connector in ADF?

Zazazan 0 Reputation points
2024-04-20T14:18:25.79+00:00

How can I use a custom RFC to retrieve data via SAP table connector in ADF. My custom remote function does not have the same importing parameters (QUERY_TABLE, Delimiter, ROWCOUNT/Option/Fields) as the standard module SAPDS/RFC_READ_TABLE2 but custom parameters. Thus, how can I input my custom parameters in Azure data factory?

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

2 answers

Sort by: Most helpful
  1. Amira Bedhiafi 15,596 Reputation points
    2024-04-21T18:39:45.48+00:00

    Using the SAP Table Connector, it's definitely possible to filter data as you described. For example, if you're retrieving table DD03L from SAP and want to exclude rows where certain patterns appear at the beginning, you can use the following query:

    FIELDNAME NOT LIKE '.%' AND FIELDNAME NOT LIKE '$%' AND FIELDNAME NOT LIKE '#%'
    

    You can find more information about SAP query operators in the "Copy Activity Properties" section of the documentation.

    COLUMN EQ 'SOME VALUE' AND COLUMN1 EQ 'SOME VALUE'
    

    https://learn.microsoft.com/en-us/azure/data-factory/connector-sap-table?tabs=data-factory#create-custom-function-module

    https://stackoverflow.com/questions/74940848/sap-table-connector-how-to-querying-sap-table-using-rfc-from-azure-synapse

    0 comments No comments

  2. Harishga 3,505 Reputation points Microsoft Vendor
    2024-04-23T03:12:27.4066667+00:00

    @Zazazan
    The error message "Element QUERY_TABLE of container metadata ZZ_READ_VM unknown" states that the SAP RFC function module ZZ_READ_VM you are using in Azure Data Factory (ADF) does not have the QUERY_TABLE parameter defined in its import interface.

    To resolve this issue, you will need to modify your custom RFC function module ZZ_READ_VM to include the QUERY_TABLE parameter in its import interface. The QUERY_TABLE parameter is mandatory for the SAP table connector in ADF, as it is used to specify the name of the SAP table that you want to read data from.

    Once you have modified your custom RFC function module ZZ_READ_VM to include the QUERY_TABLE parameter, you can specify the name of the SAP table you want to read data from in the source dataset of your ADF pipeline.

    If you have already modified your custom RFC function module ZZ_READ_VM to include the QUERY_TABLE parameter and are still encountering issues, you may need to check the metadata of the ZZ_READ_VM function module to ensure that the QUERY_TABLE parameter is defined correctly. You can also try testing the ZZ_READ_VM function module in SAP to ensure that it is working correctly.

    I hope this information helps you. Let me know if you have any further questions or concerns.

    0 comments No comments