cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic RFC Execute exception

Former Member
0 Kudos

Hi all,

I have created a function module and while using the function module in my application i am getting the error like as follows

com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException

can anyone help me how to solve this issue

thanks,

Viswa

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

This error can occur due to many reasons.Few of them could be:

1.Bapi might not be imported properly

2.A new structure or parameter might have been added and the bapi might have been not reimported.

If it is not due to above reasons then try deleting the model and create a new rfc model

Regards,

Pradeep

Former Member
0 Kudos

Hi,

There could me many chances of getting this exception. Print the stacktrace, exception cause and exception message. And post the same here.

Regards,

Charan

Former Member
0 Kudos

hi,

exception:com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException

wdContext.currentZentity_Mstr_InputElement().modelObject().execute();

this line is not executing in my source code.

this exception i am getting while deploying the application......

and the data which i am giving in frontend is not getting effected in backend r3 table.

can anyone help me to solve this issue.

thanks,

viswa

srinivas_sistu
Active Contributor
0 Kudos

Hi,

Did you checked in backend for any erros through ST22 transaction???

Regards,

SrinivaS

Former Member
0 Kudos

Hi,

what is the exception cause?

Print the below:


exception.getCause();

Regards,

Jaya.

Former Member
0 Kudos

check that RFC is remote enabled or not.

amit

Former Member
0 Kudos

Hi,

Have you given all the madatory inputs to the request object and executing the model.

If you are giving all the mandatory inputs and executing the model then check there might be some problem with bapi execution.

And print the exception by keeping the statements in exception block

e.getMessage()

e.getCause()

Regards,

Saleem

Former Member
0 Kudos

hi,

I have checked in ST22 there is no errors,

where to place the exception.getcause();

already i have used try and exception block

thanks

Viswa

Former Member
0 Kudos

Hi,

In the catch block of model execution code.

try

{

wdContext.currentZentity_Mstr_InputElement().modelObject().execute();

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportException("Error Message "+e.getMessage,true);

wdComponentAPI.getMessageManager().reportException("Error Cause "+e.getCause,true);

}

Regards,

Charan

Former Member
0 Kudos

hi,

I didn't get the cause or message by keeping

e.getMessage()

e.getCause() in exception block,....

thanks,

viswa

Former Member
0 Kudos

Hi,

by trying the code which u r given i got this error

Error Message Mandatory parameter ZCOUNTRY of method ZENTITY_MSTR missing

Error Cause com.sap.aii.proxy.framework.core.DataAccessException: Mandatory parameter ZCOUNTRY of method ZENTITY_MSTR missing

thanks,

viswa

Former Member
0 Kudos

Hi viswa,

You are not passing the mandatory fields ZCOUNTRY and ZENTITY_MSTR to the bapi

please try to set some empty string or some default value in these fields and execute the model.

Hope this helps you in resolving the problem

Regards,

Saleem

Former Member
0 Kudos

Hi,

You need to create the object for the proxy class ZENTITY_MSTR and set the value for COUNTRY field

try
{

Zentity_Mstr_Input objZentity_Mstr_Input=new Zentity_Mstr_Input();

//Create the object for proxy class ZENTITY_MSTR
ZENTITY_MSTR objZENTITY_MSTR=new ZENTITY_MSTR();

//Set the country value
objZENTITY_MSTR.setZCountry("Country");

objZentity_Mstr_Input.set/addZENTITY_MSTR(objZENTITY_MSTR);

wdContext.nodeZentity_Mstr_Input().bind(objZentity_Mstr_Input);

wdContext.currentZentity_Mstr_InputElement().modelObject().execute();
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportException("Error Message "+e.getMessage,true);
wdComponentAPI.getMessageManager().reportException("Error Cause "+e.getCause,true);

}

Regards,

Charan

Former Member
0 Kudos

Hi,

I have not created the BAPI ,

I am using the function module directly....

there is no errors in function module....it's working perfectly....

But I am getting the error as

Error Message Mandatory parameter ZCOUNTRY of method ZENTITY_MSTR missing

Error Cause com.sap.aii.proxy.framework.core.DataAccessException: Mandatory parameter ZCOUNTRY of method ZENTITY_MSTR missing

Can anyone help me in this,....

thanks,

viswa

Former Member
0 Kudos

Hi,

While executing Fuction Module in WebDynpor for Java you are getting this right?

This is because you are not passing the input for ZCountry field while executing from WebDynpo.

So you need to pass that value.

Regards,

Charan

Former Member
0 Kudos

Hi Viswa,

Just follow the steps mentioned by charan. That will resolve the issue.

Regards,

Jaya.

Former Member
0 Kudos

Hi,

In the code which you given i am getting the error in the following line...

objZentity_Mstr_Input.set/addZENTITY_MSTR(objZENTITY_MSTR);

can anyone help me to resolve it...

thanks,

viswa

Former Member
0 Kudos

Hi,

Try

this

objZentity_Mstr_Input.setZENTITY_MSTR(objZENTITY_MSTR)

(or)

this

objZentity_Mstr_Input.addZENTITY_MSTR(objZENTITY_MSTR)

Regards,

Charan

Former Member
0 Kudos

Hi,

Thanks to all especially to charan how to trace the rfc errors....even though my problem is fully solved.

and thanks to one and all who ever given their idea's to solve my issue...and how to approach these type of errors

thanks,

Viswa

Former Member
0 Kudos

Hi,

In ABAP workbench check transaction ST22 for any errors for BAPI/RFC side.

If there are no errors from BAPI side, check from your code side by setting external breakpoint in BAPI

regards,

ganga

Former Member
0 Kudos

Hi gangadhar,

I have not created BAPI I have created the function module only..

thanks,

viswa

Former Member
0 Kudos

Hi viswa,

Print the exception and exception cause in catch block to know the exception detail.

Regards,

Jaya.