Implementing and Creating a RFC destination for the RFC Function Module

 

Important Point related to RFC :-

  • RFC function module is just like a function module created in the transaction code SE37, with some specific pre-requisites.
  • The processing type of the function module should be remote-enabled module.
  • All parameters must be pass by value

Creating a RFC Function Module :-

Requirement :-

Let’s take a requirement to display Sales Order Details from VBAK table on the basis of Sales Document Number ( VBELN ) given by user.

  • Step 1 :- Go to SE37 transaction code.

  • Step 2 :- Give a name for your function module and click on create button.



    • Provide the above necessary details
  • Step 3 :- Click on save button

  • Step 4 :- Go to attributes tab and select Remote - Enabled Module.



  • Step 5 :- Go to import tab and give a parameter for a range of Sales document number and pass the range of Sales Document Number as its associated data type.

    • You will receive a popup message.



    • make sure all your parameters should be pass by value.



  • Step 6 :- We will pass the exporting parameter as a table type for a structure that we had created in the previous part for our VBAK table.



  • Step 7 :- Go to Source code and write the logic to fetch data in the exporting parameter.




Creating a RFC Connection :-

  • Step 1 :- Now we need to create a RFC destination for the device in which I will call the above created function module.

  • Since, I don’t have any other device, therefore I will create a RFC destination for my same system.

  • Step 2 :- Go to SM59 transaction code.



  • Step 3 :- Go to ABAP Connections.



  • Step 4 :- Click on create button to create a connection → A pop up screen will appear where you need to provide the necessary details.



  • Step 5 :- Press enter. Here, provide the description.

  • Step 6 :- Provide the target host.



  • Step 7 :- Click on Logon and Security and provide the access credentials.



  • Step 8 :- Click on connection Test to check whether RFC connection has been done or not.



    • We can see that RFC connection has been done completely.
    • Now we can use it.

Comments

Popular posts from this blog

Understanding Different Types of SAP Function Modules: Normal, RFC, and Update

Mastering ABAP: A Step-by-Step Guide to Function Modules and Groups for Modularized Programming

Unlocking SAP ABAP Secrets: Interactive Classical Reports with GET CURSOR, At User Command, and a Comparison of HIDE Statements