cancel
Showing results for 
Search instead for 
Did you mean: 

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

susmita_panigrahi
Active Participant
0 Kudos

HiAll,

I have one Search view.In this view Reset and serach button is there.On click of Search, input parameter will go to RFC and display the data inside the table present inside the search page.On click of reset te will clear the input value and table will not visible on the search page.

On click of serach when the data will appear in the table , then selecting a row from table we can go to Update page.In Update page i have one Back Button.On click of Back Button it will navigate to once again serach page.Now in the Search page after giving the input when i am clicking Search, i am getting exception com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException

Model is not executed this time.I found that before going to Update page when i am selecting the reset button and after that i am clicking search button with input value model is executed successfully .I am getting data in the table.Where as when i went to Update page and back to Search page , that time Model is not executed on click of Search button.I am getting exception

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

Can anybody help me to solve this exception?

Accepted Solutions (0)

Answers (10)

Answers (10)

susmita_panigrahi
Active Participant
0 Kudos

Hi

The problem is solved by changing the code in RFC call by refering the documnet RFC trouble shooting guide.

susmita_panigrahi
Active Participant
0 Kudos

Hi All,

I am still getting the same exception.The BAPI is working for one input say "albert".If i will run the same BAPI with the input "C" i am getting this exception.For data"C" BAPI is returning 0 records.So in my code BAPI out put size should show as 0,where as in my case the BAPI is throwing Exception.IThat is some time nput from webdynpro is not going to BAPI. Please refer the stack trace mentioned below:

Get Stackcom.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClassExecutable.execute(DynamicRFCModelClassExecutable.java:98) at com.wartsila.enginerunninghoursearch.EngineRunningHourSearchCust.GetInstallationFirstLevelOutput(EngineRunningHourSearchCust.java:206) at com.wartsila.enginerunninghoursearch.wdp.InternalEngineRunningHourSearchCust.GetInstallationFirstLevelOutput(InternalEngineRunningHourSearchCust.java:378) at com.wartsila.enginerunninghoursearch.EngineRunningHourSearchView.onActionGetRunningHour(EngineRunningHourSearchView.java:266) at com.wartsila.enginerunninghoursearch.wdp.InternalEngineRunningHourSearchView.wdInvokeEventHandler(InternalEngineRunningHourSearchView.java:279) at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87) at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67) at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:101) at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:304) at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649) at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59) at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFC_Fault_Exception: at sun.reflect.GeneratedConstructorAccessor693.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:308) at java.lang.Class.newInstance(Class.java:261) at com.sap.aii.proxy.framework.core.JcoMarshaler.unmarshalException(JcoMarshaler.java:429) at com.sap.aii.proxy.framework.core.JcoProxy.send(JcoProxy.java:82) at com.sap.aii.proxy.framework.core.AbstractProxy$JcoProxyHelper.send(AbstractProxy.java:173) at com.sap.aii.proxy.framework.core.AbstractProxy.send$(AbstractProxy.java:141) at com.wartsila.enginerunninghoursearch.model.get.GetRunningHour.z_Cs_Get_Running_Hours(GetRunningHour.java:145) at com.wartsila.enginerunninghoursearch.model.get.Z_Cs_Get_Running_Hours_Input.doExecute(Z_Cs_Get_Running_Hours_Input.java:137) at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClassExecutable.execute(DynamicRFCModelClassExecutable.java:92) ... 30 more

Can any body tell how to solve this?

Thanks

Susmita

susmita_panigrahi
Active Participant
0 Kudos

Hi

The BAPI has some import parameter.So after giving input to BAPI only we can call execute method.

I have analyzed that after selecting back when the page goes to Search page and then on click of Reset buttton the table is not refreshed that is its showing some data related to previous search.

Can any body tell why input parameter is not going to BAPI for which i am getting exception com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException and how can i refresh the table so that table will so no value ?

Thanks

Susmita

Former Member
0 Kudos

Hi,

to clear modal node use the following code,

IPrivate<name>View.I<rfc node name>Node iNode = wdContext.node>rfc node name>Search();

for (int i = iNode .size(); i > 0; i--) {

iNode .removeElement( iNode .getElementAt(i - 1));

}

Regards,

ramesh

susmita_panigrahi
Active Participant
0 Kudos

Hi

Yes you are right that input is not going to BAPI.I have printed two message before and after the execute menthod of BAPI.The message written after execute menthod is not executing.

Even i try to print the value which is going to bapi from View.its showing the correct value.However bapi is not executed successfully.Below is the code to call the BAPI:

public void GetInstallationFirstLevelOutput( )

{

//@@begin GetInstallationFirstLevelOutput()

//wdContext.nodeZ_Cs_Get_Running_Hours_Input().nodeOutput().nodeOt_Engines().invalidate();

Z_Cs_Get_Running_Hours_Input getObj = new Z_Cs_Get_Running_Hours_Input();

wdContext.nodeZ_Cs_Get_Running_Hours_Input().bind(getObj);

try

{

//Get the input parameters from the custom controller

//context variables, and pass it onto the BAPI model.

wdComponentAPI.getMessageManager().reportSuccess(wdContext.currentContextElement().getCtx_EngineNumber().toUpperCase());

getObj.setIv_Zzengn(wdContext.currentContextElement().getCtx_EngineNumber().toUpperCase());

getObj.setIv_Customer(wdContext.currentContextElement().getCtx_CustomerName());

getObj.setIv_Pltxt(wdContext.currentContextElement().getCtx_InstName());

getObj.setIv_Zzinst_Yardn(wdContext.currentContextElement().getCtx_ProjectNumber());

getObj.setIv_Zznc(wdContext.currentContextElement().getCtx_selRespNetworkCompany());

getObj.setIv_Tplnr(wdContext.currentContextElement().getCtx_selInstallationNumber());

wdComponentAPI.getMessageManager().reportSuccess("Controller "+getObj.getIv_Zzengn());

wdContext.currentZ_Cs_Get_Running_Hours_InputElement().modelObject().execute();

int installSize = wdContext.nodeOt_Engines().size();

wdComponentAPI.getMessageManager().reportSuccess("Controller Size"+installSize);

wdContext.nodeZ_Cs_Get_Running_Hours_Input().nodeOutput().nodeOt_Engines().invalidate();

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportException("Unable to get the Engine Information.Please check the server logs. " + e,true);

e.printStackTrace();

}

//wdContext.nodeOt_Engines().invalidate();

// wdContext.nodeZ_Cs_Get_Running_Hours_Input().nodeOutput().invalidate();

//@@end

}

Thanks

Susmita

Former Member
0 Kudos

Hi,

write the execute line of code

wdContext.currentZ_Cs_Get_Running_Hours_InputElement().modelObject().execute();before getting or setting values.

make it as the first statement after the try.

try{

wdContext.currentZ_Cs_Get_Running_Hours_InputElement().modelObject().execute();

.

.

.}

Regards,

Satya.

susmita_panigrahi
Active Participant
0 Kudos

Hi

OnAction Back i am navigating to the Search page where i am displaying the table after calling the RFC.Requirement is that when user click on back the page will navigate to search page .Again when user will click on serach it should display data.however in my case i am getting exception.

Thanks

Susmita

Former Member
0 Kudos

Hi,

try calling the execute method for BAPI in the wdDoinit of the view instead of in some action in the view controller

jus try doing this.

Regards,

Satya.

Former Member
0 Kudos

i think the error is because of the call to RFC is happening somehow when you click on the back button.But the input parameter to the RFC is not getting.

So you check that code detailly?

with regards

shanto aloor

Former Member
0 Kudos

in the action of that back button you have to call the rfc once more with input parameter which u gave before.And the context for the input parameter should be in the controller or the search data should be stored in a global manner.

and pls make sure that you are invalidating the RFC node after execution.

with regards

shanto aloor

susmita_panigrahi
Active Participant
0 Kudos

Hi Satya,

I am calling the bapi from the custom controller.I have defined a method inside the custom controller and calling this method from the Search page.

Thanks

Susmita

Former Member
0 Kudos

hi,

looks like, you are trying to implement the functionality similar to an object value selector .

where are you executing the BAPI?

in the viewcontroller or in the comp/custom controller?

Regards,

Satya.

susmita_panigrahi
Active Participant
0 Kudos

Hi Ramesh,

I am getting this exception from Try catch block where i have called the RFC BAPI.Its showing only one line exception.

Thanks

Susmita

Former Member
0 Kudos

Hi,

post the complete error strace ?

Regards,

ramesh