on 03-10-2009 3:06 AM
Hi All,
When I execute an adaptive RFC Model using WD Java application I receive the following error -
failed to create or init instance of model 'com.sap.tc.webdynpro.progmodel.model.core.Model' in scope TASK_SCOPE with instanceId 'null'
What can be the problem?
Any help is highly appreciated.
Thanks,
Divya
Hi Divya,
I feel the error is in 1st line itself. It seems the factory class is not able to create a model instance of scope type TASK_SCOPE.
Try to create an instance with the default APPLICATION_SCOPE. (You can refer ppt slide 39 for different possible model instance scope https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/705f2b2e-e77d-2b10-de8a-95f37f4c...
Or alternatively create model instance directly - Model model = new Model();
Kind Regards,
Nitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hii,
I think you should debug the application by setting a break-point at the ABAP code.Then only you will be able to trace where the flow is exactly going wrong.Sit with your ABAPer and debug....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hii,
Did u create a instane of the model in wdDoInit() method of custom controller like :
wdContext.nodeZsm_Calc_Csi_Report_Input().bind(new Zsm_Calc_Csi_Report_Input());
Please check with that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes I did This is what I have
Model model = (Model)WDModelFactory.getModelInstance(Model.class,WDModelScopeType.TASK_SCOPE);
Zmhcr_Bapi_Contexto_Webdynpro_Input modelObject = (Zmhcr_Bapi_Contexto_Webdynpro_Input)model.createModelObject(Zmhcr_Bapi_Contexto_Webdynpro_Input.class);
wdContext.nodeZmhcr_Bapi_Contexto_Webdynpro_Input().bind(modelObject);
modelObject.setTP(bpContext.getBp());
modelObject.setTT(tType);
modelObject.setI_Claveobc(coType);
wdContext.currentZmhcr_Bapi_Contexto_Webdynpro_InputElement().modelObject().execute();
What can be wrong? This working fine. But, I am having all weird errors after the input parameters in the backend BAPI changed and I reimported the model.
Any help is highly appreciated.
Thanks,
Divya
Hi Divya,
Try like this:
Model model = (Model)WDModelFactory.getModelInstance(Model.class,WDModelScopeType.TASK_SCOPE);
Zmhcr_Bapi_Contexto_Webdynpro_Input modelObject = new Zmhcr_Bapi_Contexto_Webdynpro_Input();
wdContext.nodeZmhcr_Bapi_Contexto_Webdynpro_Input().bind(modelObject);
modelObject.setTP(bpContext.getBp());
modelObject.setTT(tType);
modelObject.setI_Claveobc(coType);
wdContext.currentZmhcr_Bapi_Contexto_Webdynpro_InputElement().modelObject().execute();
Please mention where exactly you are getting error (line ), if it doesn't solve your issue.
Regards,
Siva
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.