cancel
Showing results for 
Search instead for 
Did you mean: 

Call RFC in BODS Script

Former Member
0 Kudos

Hi Team,

I need to call RFC function in BODS script. Can I call it like sql('datastorename','functionname') as we can call oracle and sql function in this way. if not then please help me to resolve this.

Thank you.

View Entire Topic
Former Member
0 Kudos

Hi,

If you want to call a function using a query transform. Here are the steps:

Right click and select new function call. Here the source can be input parameters or just a row generator.

Function categories - Select the datastore where the function is present then select the function

Enter the input parameters if any and then select the output parameters.

Former Member
0 Kudos

Hi,

Thanks for solution. but if i call the RFC function as you mentioned, i am getting error in BODS as 'incorrect syntax. below is my RFC function appeared in script widow after selecting.

__RFC_FUNCTION ERP..Functionanem[OutputParam](NULL, NULL, NULL, Somevalue, somevalue, NULL, NULL)[inputparam1, inputparam2, inputparam3, inputparam4, inputparam5, inputparam6, inputparam7];

it is showing error near __RFC_FUNCTION, if i remove this statement then also i am getting error incorrect syntax.

please help.

Former Member
0 Kudos

Hi Sundaram,

Do one thing. Go to the datastore. Click on the function and drag it to the script.Check whether that is working or not.


Thanks

Annesha

Former Member
0 Kudos

Hi,

After doing this below is my script window and getting error.

ERP..FunctionName();

[Script:Script6906]

(Ln 19) : Syntax error : near <.> found <'.'> expecting <identifier, a quoted identifier>

My function expects 7 input parameters and one output parameter which return the sp_ret_code.

Former Member
0 Kudos

with addition of my above reply i have removed the '.' also but getting the same error.

Thanks.

Former Member
0 Kudos

Hi Sundaram,

In order to call a ERP function from script follow the following steps:

1) Go to script , using functions tab call the function.

2) provide the parameters which ever mandatory.

3) select the return parameter to be returned by the program

4)This return must be caught by some variable so define either a global variable or local variable depending on your requirement.

5) if you just call function without assigning it to a variable you will get the above error.

Note : The return parameter will only be scalar , so you cannot fetch two columns or tables in the return variable.

Hope this helps

Thanks

Phaneendra

Former Member
0 Kudos

Hi,

thank you so much. it is working fine. thanks for help.

Former Member
0 Kudos

Hi Sundaram ,

Could you please close the thread.