cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Model Execution Problem

Former Member
0 Kudos

Hi,

We have a RFC to update the backend. we have imported the model and all bindings have been done.

we are able to set the values to the model nodes but the execution of the model throws WDDynamicRFCExecuteException.

Here is the code that we are using.

try {

Z_Sp_File_Upload_Save_Input save = new Z_Sp_File_Upload_Save_Input();

//setting all the values to the model nodes.

wdContext.nodeZ_Sp_File_Upload_Save_Input().bind(save);

wdContext.currentZ_Sp_File_Upload_Save_InputElement().modelObject().execute();

//Disconnecting model if alive;

} catch (Exception e) {

//catching the exception.

}

The Exception that we are getting is

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

Thanks,

Nagarajan.

Accepted Solutions (1)

Accepted Solutions (1)

Dheerendra
Participant
0 Kudos

Hi Nagarajan Kumarappan ,

In My Openion....The Exception U get from ur code is of Type WDDynamicRFCExecuteException.So Just Use this Exception Object in Finding-out the Problem......

U can do this by applying the following code in catch block.....as...

-


IWDMessageManager manager = wdComponentAPI.getMessageManager();

try{

.............modelObject().execute();

wdContext.nodeOutput().invalidate();

}catch(WDDynamicRFCExecuteException ex){

manager.reportException(ex.getMessage(), false);

}

-


By Doing This U are able to find out the error. as thrugh getMessage a detailed exception message will be displayed 4 U......

Also u can judge that the error is either in ur code or R/3 back-end.....

regard's

Dheerendra

Former Member
0 Kudos

Hi all,

Thanks for ur responses. The problem got solved by restarting the server.

This is due to the metadata cache problem.

Thanks,

Nagarajan.

Message was edited by: Nagarajan Kumarappan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Nagarajan

There are many reasons for this exception:

1.BAPI has been changed in the R/3 after model import

2.Change in JCO destination settings

3.Improper context mapping

4.NOT releasing the model instance after using it.

Please check with the above points and post

Hope this helps

Regards

Ananda

former_member194668
Active Participant
0 Kudos

Hi nagarajan,

1) This is not the problem with your webdynpro code. You need to check the BAPI you are executing trying giving the input you gave at the webdynpro side at the ABAP side and execute the BAPI.If it works then Check if you are setting all the required import parameters for the RFC being executed.

2) Check the logical systems you are using WD_MODWLDATA_DEST etc...Whether its connection status is green in the content administrator.

3) make sure the BAPI doesn’t pop up any window on execution at the ABAP side. Then in that case execution of such type of BAPI from webdynpro side would definitely fails.

Regards

Aarthi mathivanan