Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ArrayIndexOutOfBoundsException in JCO

Hi forum

I have a problem where i setting a input parameter of a BAPI. The RFC call only works with one parameter.

I have this tree input parameters in the BAPI:

EMPLOYEE_ID LIKE BAPIEMPLB-PERNO is a CHAR of 10. Only works with this.

BEGDA TYPE ZDATUM2 is a CHAR of 8

ENDDA TYPE ZDATUM2 is a CHAR of 8

1) INITIALIZATION in Custom Class

 	Zbapi_Employee_Getdata_Input input = new Zbapi_Employee_Getdata_Input();
	wdContext.nodeZbapi_employee_getdata_input().bind(input);
      

2) SETTING the inputs parameters before the execute code

wdContext.currentZbapi_employee_getdata_inputElement().setEmployee_Id( "28765");
//IN THIS NEXT LINE IS THROWING THE EXCEPTION
wdContext.currentZbapi_employee_getdata_inputElement().setEndda(dato);

3) EXCEPTION

java.lang.ArrayIndexOutOfBoundsException

at com.sap.mw.jco.JCO$MetaData.getType(JCO.java:10179)

at com.sap.aii.proxy.framework.core.JcoBaseTypeData.setElementValue(JcoBaseTypeData.java:731)

at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.setAttributeValueAsString(DynamicRFCModelClass.java:669)

at com.everis.model.Zbapi_Employee_Getdata_Input.setEndda(Zbapi_Employee_Getdata_Input.java:522)

at com.everis.wd.horariotrabajo.Consulta_HorarioTrabajoView.onActionEjecutaConsulta(Consulta_HorarioTrabajoView.java:177)

at com.everis.wd.horariotrabajo.wdp.InternalConsulta_HorarioTrabajoView.wdInvokeEventHandler(InternalConsulta_HorarioTrabajoView.java:545)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)

Thnks

Josué Cruz

Former Member
Not what you were looking for? View more on this topic or Ask a question