cancel
Showing results for 
Search instead for 
Did you mean: 

Error while calling an RFC from R/3

Former Member
0 Kudos

Hi all,

I am new to webdynpro. I am calling a RFC from R/3/.the code is like this.

Zhr_Fm_Loan_Input input = new Zhr_Fm_Loan_Input();

wdContext.nodeZhr_Fm_Loan_Input().bind(input);

input.setUsrid(wdContext.currentContextElement().getEmpnoa());

try

{

wdContext.nodeZhr_Fm_Loan_Input().currentZhr_Fm_Loan_InputElement().modelObject().execute();

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportException("Exception "+e,true);

}.

In the output i am getting an eror Exception com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException.

Can anybody explain the error.

Regards,

Rajesh

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

Thax for the inputs.Got the solution.There is a case sensitive problem while passing the user from portal to backend.

Regards,

Rajesh

former_member720137
Active Participant
0 Kudos

Hi Rajesh

Kindly check ur BAPI once from Backend, i hope there is no other mandatory field required apart from Usrid.

I hope BAPI doesnot have any mandatory Structure in it. in case it has , u have to pass that also..

Try printing this context also ..wdContext.currentContextElement().getEmpnoa().. i hope it is not returning a null.

wdContext.nodeZfm_Input().nodeOutput().invalidate(); // Add this line after execute statement

Regards

Puneet

Former Member
0 Kudos

sorry rajesh

stmt is

wdcontext.nodeOutput().invalidate();

Former Member
0 Kudos

Hi

As part of try block u can write the following stmt also.

wdcontext.nodeInvalidate()

sid_sunny
Contributor
0 Kudos

Hi Rajesh,

Are you able to execute the RFC from backend with same inputs, if yes then try to debug the application from frontend, and change the catch code to below you may get some more imformation about the error:

wdComponentAPI.getMessageManager().reportException("Exception "e" and "+e.getMessage(), true);

Regards

Sid