How Azure datafactory call SAP ECC RFC custom function.

Suttisun Suthad Na Ayudthya 0 Reputation points
2025-02-28T15:43:38.22+00:00

I try to use Custom function module, SAP Table dataset, in Azure data factory.

I have to call function to get data (no permission to access table).

Could you please suggest?

thanks

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

1 answer

Sort by: Most helpful
  1. Ganesh Gurram 7,295 Reputation points Microsoft External Staff Moderator
    2025-02-28T17:35:40.4966667+00:00

    Hi @Suttisun Suthad Na Ayudthya

    Thank you posting your query!

    To call a custom RFC function module in SAP ECC from Azure Data Factory (ADF) using the SAP Table connector, follow these steps:

    Create a Custom RFC Function Module in SAP ECC

    • Define the Function Module - In your SAP system, create a custom RFC function module that retrieves the required data. Ensure that the function module's interface (import, export, tables) is similar to /SAPDS/RFC_READ_TABLE2, which is the default interface used by ADF. This similarity allows ADF to interact seamlessly with your custom function module.

    User's image

    • Handle Mandatory Parameters - If your custom function module doesn't include certain parameters like QUERY_TABLE, which are expected by ADF, you can modify your function module to accept these parameters but ignore them in the logic. This approach ensures compatibility with ADF's requirements.

    Configure Azure Data Factory to Use the Custom Function Module

    • Set Up a Linked Service - In ADF, create a linked service to connect to your SAP ECC system. This setup involves providing necessary connection details such as the SAP system's hostname, client ID, system number, and user credentials.
    • Create a Dataset: Within ADF, create a dataset that utilizes the SAP Table connector. In the dataset's configuration, specify the name of your custom RFC function module in the customRfcReadTableFunctionModule property.
    • Configure the Copy Activity - In your ADF pipeline, add a Copy activity that uses the dataset configured above as the source. In the source settings of the Copy activity, you can provide any necessary input parameters required by your custom function module.

    By following these steps, you can effectively call a custom RFC function module in SAP ECC from Azure Data Factory, enabling you to retrieve data as needed without direct table access.

    Reference: SAP table as source

    Similar issues: https://learn.microsoft.com/en-us/answers/questions/655705/sap-table-connector-how-to-call-rfc-function-modul

    https://learn.microsoft.com/en-us/answers/questions/1658342/how-can-i-use-a-custom-rfc-to-retrieve-data-via-sa

    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


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.