cancel
Showing results for 
Search instead for 
Did you mean: 

Date format while calling RFC??

srinivas_m2
Participant
0 Kudos

Hi all,

Do we need to format date in WDJ while calling a RFC function module??

I am trying to populate with the code.

import java.sql.Date;
Date payDate;
payDate = wdContext.currentContextElement().getSelectedPayDate();
 incInput1.setPay_Date(payDate);

and i am getting the following error

java.lang.arrayindexoutofboundsexceptio.

at com.sap.mw.jco.JCO$MetaData.getType(JCO.java10179)

at com.sap.aii.proxy.framework.core.jcobasetypedata.selelementvalue(jcobasetypedata.java :731)

i got this error when i added a new date paramter to my FM and reimported the model pls. gimme ur suggestions.

Thanks,

Srini..

Accepted Solutions (0)

Answers (2)

Answers (2)

srinivas_m2
Participant
0 Kudos

Hi Ganga,

I did every thing you said already, but still some thiing is going wrong.. and i am not facing any nullpointer exception it has a date value..

the following is the error trace.

[code]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.setAttributeValueAsDate(DynamicRFCModelClass.java:578)

at com.peabodyenergy.compensationcommunication.Zhr_Get_Incentive_Data_Input.setPay_Date(Zhr_Get_Incentive_Data_Input.java:237)

at com.sap.xss.hr.ecm.review.VEcmReviewView.printIncentiveLetter(VEcmReviewView.java:305)[/code]

Former Member
0 Kudos

Hi Srini,

Once reimport is done, you have to restart J2EE engine.

Fields created in R/3 using DATS type accepts SQL date as input. Since you are sending SQL date there should be any issues. But make sure that

payDate = wdContext.currentContextElement().getSelectedPayDate();

statement is not returning null value and FM is expecting this field as non null value.

Regards,

Ganga.