Skip to Content

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

getting error for input string 0000 #

Hi ,

I am getting error on the portal that has an exception as error occured for For input string: "0000 #" .I think its because of some problem with the RFC that m getting this error but please suggest.The code done with dynamic coding is given below:

for(int j=0; j<intList; j++)

{

IDynamicNodeElement dynObj = wdContext.createDynamicNodeElement();

strLine = wdContext.nodeWeb_Table_Disp1_Out().getWeb_Table_Disp1_OutElementAt(j).getTline();

intLine = strLine.length();

strLine = strLine.substring(1,intLine-1);

String[] strArr = strLine.split("#");

for(int k=0;k<intCat;k++)

{

String strVal = strArr[k];

if(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getDatatype().equalsIgnoreCase("DATE"))

{

try

{

String strdate ="";

SimpleDateFormat ch1 = new SimpleDateFormat("yyyyMMdd");

//wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(wdContext.currentUser_ProfileElement().getDatefmt()+strVal);

String strFmt = "";

if("YYYY/MM/DD".equalsIgnoreCase(wdContext.currentUser_ProfileElement().getDatefmt()))

{

strFmt = "yyyy/MM/dd";

}

else

{

strFmt = "MM/dd/yyyy";

}

SimpleDateFormat ch2 = new SimpleDateFormat(strFmt);

strVal = strVal.trim();

if(!"".equals(strVal))

{

strdate = ch2.format(ch1.parse(strVal));

} dynObj.setAttributeValue(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getFieldname(),strdate);

}

catch(Exception e)

{

}

}

else if(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getDatatype().equalsIgnoreCase("QUAN"))

{

Double dblVal = null;

DecimalFormat sdf = new DecimalFormat("#,###.####");

dblVal = new Double(strVal);

if(!strVal.matches("(?i).-."))

{

dblVal = new Double(strVal);

dynObj.setAttributeValue(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getFieldname(),new BigDecimal(strVal.trim()));

}

else

{

dynObj.setAttributeValue(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getFieldname(),null);

}

}

else

{

dynObj.setAttributeValue(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getFieldname(),strVal);

}

col.add(dynObj);

}

}

}

wdContext.nodeDynamicNode().bind(col);

Please help.

Thanks & Regards,

Reinuka.

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