Calling RFC from BODS
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”.
- Enter the name of the RFC to import & click on “Import“.
Here I am using the “ZBAPI_GET_EMPLOYEE_DETAILS” as the RFC.
- RFC will be imported & can be seen in the Local Objet Library.
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.
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”).
7) Assign RFC call from Query
- Double click on Query.
- Right click on “Query_fcn_call” & click “New Function Call”.
- “Select Function” window will open. Choose appropriate function & click “Next”.
- Select the file format that we have created earlier in “Input Parameter” window & press OK.
- Select Column name from the input file format & press “OK”.
Here the file format has one column only with name as “Id”.
- Click “Next” & select Output Parameters.
- Select the required output parameters & click “Finish”.
Here i am selecting all the fields.
Now the Query editor for query platform “Query_fcn_call” can be seen as follows.
8) Add another query platform into dataflow for mapping & name it (here “Query_Mapping”).
9) Add a template table also.
- Double click on query “Query_Mapping” & do the necessary mappings.
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.
Rahul S. More
IGATE Global Solutions Pvt Ltd.