on 09-08-2008 12:44 PM
Hi Experts,
I am developing an application and asked ABAP guy to write the BAPI's for my application. In the BAPI , he has used some structures. When I execute them in R/3 System they are working fine.
but ! when I use them in my application I am getting the following error. I don't why it is happening .
java.lang.ArrayIndexOutOfBoundsException: -1
at com.sap.mw.jco.JCO$MetaData.getType(JCO.java:10161)
at com.sap.aii.proxy.framework.core.JcoBaseTypeData.getElementValue(JcoBaseTypeData.java:503)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.getRelatedModelObject(DynamicRFCModelClass.java:738)
at suresh1.Zhr_Empdata_Get_Output.getZp0002(Zhr_Empdata_Get_Output.java:194)
at suresh.wdp.IPublicTestAppli$IZp0002Node.doSupplyElements(IPublicTestAppli.java:535)
can anyone help me ?
thanks
Suresh
hi Suresh,
This issue is might be with binding to the model. Did you reimport or rebound ? Try to check the binding from the controller to Model. The Output node (Zhr_Empdata_Get_Output) of the controller must be bound to Output node(Zhr_Empdata_Get_Output) inside of the input node (Zhr_Empdata_Get_input) in the model.
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Binding is done properly, There is no problem in that. But ! getting error. See the below steps i did.
First I added the Existing model in Data Modles
Next Apply template on component controler
-
> service controler
---> selecting model(bapi )
---> drag the right side ( Zhr_Empdata_Get_input ) into Component Controler.
Next
---> apply template on View controler
-
> select action button
--> right click on the link and Edit
---> map the "Zhr_Empdata_Get_input" from controler to View by dragging.
after that binding the elements to UI.
still getting problem,
Am i wrong here ?
thanks
Suresh
Hi Suresh,
You are not getting the data from BAPI in WD application. So first check , are you passing all the necessary parameters to BAPI before executing it?
You told that that you can execute the BAPI successfully in R/3.
Are you passing any parameters' values there?
If you are passing the mandatory parameters before calling the BAPI, try to print their values in execute BAPI method.
And comment the statements that are using any output data for testing purpose.
Regards,
Siva
Hi Siva Rama Krushna,
Congratulations for your contribution top score.
As you said that , there is an input parameter which I have to send to that BAPI and I am also passing the input parameter to BAPI by setter method before executing model.
But ! still when I bind some of model attributes to UI element. only one attribute is working . If I bind the other attributes I am getting "IndexOutofBoundException" .
I don't understand what is the problem.
can u help me Siva.
thanks
Suresh
Hi Pankaj Prasoon,
As you said, I tested the BAPI in R/3 System and got the result for certain output variables as without any null values. Only those output parameters I am binding in UI elements in WebDynpro, even thought I am getting the following error.
The initial exception that caused the request to fail, was:
java.lang.ArrayIndexOutOfBoundsException: -1
at com.sap.mw.jco.JCO$Record.getString(JCO.java:12780)
at com.sap.aii.proxy.framework.core.JcoBaseTypeData.getElementValueAsString(JcoBaseTypeData.java:669)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.getAttributeValueAsString(DynamicRFCModelClass.java:427)
at sap1.Zhr_Empdata_Get_1_Output.getVorna(Zhr_Empdata_Get_1_Output.java:404)
at sap.wdp.IPublicApp1$IOutput1Element.wdGetObject(IPublicApp1.java:833)
... 52 more
Even I tried to access the same attributes Component controler by component. I get the same error. Which means it is not accepting to access those attributes. I don't know why .
Could u help me ??
thanks
Suresh
Edited by: Suresh Mandalapu on Sep 13, 2008 9:13 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.