We have moved our domain from sapnuts.com to zapnuts.com, please bookmark and share.

Creating RFC Function Module in SAP


Developing RFC function module in SAP, working with remote enabled function module in SAP

A+ A-

Whenever we create a RFC function module, we need to follow below things.

We cannot use exceptions in RFC`s.

All parameters must be pass by value not pass by reference.

To create RFC function module follow below steps.

Step 1: Go to SE37, provide a name ZSAPN_RFC_FM, create, a popup will come provide function group, short text and save.

Creating RFC Function Module in SAP

Step 2: Go to 'Attributes' tab, select 'Remote-Enabled Module', enter.

Creating RFC Function Module in SAP

Step 3: Go to import tab, add importing parameter as below, you must select pass value check box as pass by reference are not possible in RFC`s.

Creating RFC Function Module in SAP

Similarly, go to export tab, add another parameter as below.

Creating RFC Function Module in SAP

Step 4: Go to source code, add below code.

Creating RFC Function Module in SAP

SELECT SINGLE * FROM MARA
    INTO  EX_MARA WHERE MATNR = IM_MATNR.

Step 5: Save and activate the function module.


Learner Questions

No Questions by learners, be first one to ask ..!!

    Please Sign in to ask a question


    Was this lesson helpful to you? Yes No 44 People out of 49 think this lesson helpful

    Lesson Navigation

    ←Previous Chapter
    Next Chapter →