Skip to Content

Calling RFC from BODS

Introduction:

In this scenario I am demonstrating about how to call Remote enabled Function Module from BODS.

1) Create SAP Application Datastore.

     In this example I am using the “SAP_BI” as the SAP Application datastore.

     As i have created the Fm in BI system, i have crated datastor for that system.

2) Import RFC from SAP system.

  • In Local Object Library expand SAP datastore.
  • Right click on Functions & click “Import By Name”.

Image1_1.jpg

  • Enter the name of the RFC to import & click on “Import“.

        Here I am using the “ZBAPI_GET_EMPLOYEE_DETAILS” as the RFC.

Image2.jpg

  • RFC will be imported & can be seen in the Local Objet Library.

Image3.jpg

Note :– This RFC takes Employee ID as the input & displays Employee details.

            I have stored Employee id in the text file, so to read text file I am using File format as the source.

3) Create File Format for flat (text) file.

   This file format(here “Emp_Id_Format”) has the list of employee ids.

Image4.jpg

4) Create Job, Workflow, Dataflow as usual.

5) Drag File Format into dataflow & mark it as a Source.

6) Drag a query platform also in to data flow & name it (here “Query_fcn_call”).

Image5.jpg

7) Assign RFC call from Query

  • Double click on Query.

Image6.jpg

  • Right click on “Query_fcn_call” & click “New Function Call”.

Image7.jpg

  • “Select Function” window will open. Choose appropriate function & click “Next”.

Image8.jpg

·         In below window click on /wp-content/uploads/2014/08/button_526050.jpgbutton & define an input parameter.

Image9.jpg

  • Select the file format that we have created earlier in “Input Parameter” window & press OK.

Image10.jpg

  • Select Column name from the input file format & press “OK”.

        Here the file format has one column only with name as “Id”.

Image11.jpg

  • Click “Next” & select Output Parameters.

Image12.jpg

  • Select the required output parameters & click “Finish”.

        Here i am selecting all the fields.

Image13.jpg

Image14.jpg

Now the Query editor for query platform “Query_fcn_call” can be seen as follows.

Image15.jpg

8) Add another query platform into dataflow for mapping & name it (here “Query_Mapping”).

Image16.jpg

9) Add a template table also.

Image17.jpg

10) Mapping.

  • Double click on query “Query_Mapping” & do the necessary mappings.

Image18.jpg

11) Save the Job, validate & execute.

12) During execution employee id is taken as a input to the RFC & output of the rfc is stored in the table.

        Output can be seen as follow after execution.

        Here employee ids are taken from the File Format & given to RFC as an input.

        Output of the RFC is given as an input to the query “Query_Mapping” where it is mapped to the target table fields.

Image19.jpg

Thanks,

Rahul S. More

(Technical Lead)

IGATE Global Solutions Pvt Ltd.

igateLogo.jpg

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply