cancel
Showing results for 
Search instead for 
Did you mean: 

access BAPI problem

Former Member
0 Kudos

setDel_date(long l)

outboundpr.setDel_date(Long.parseLong(codes.getString("DELIV_DATE").trim()));

java.lang.NumberFormatException: For input string: "2006-12-15"

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I had also faced the same problem ,

pl use this code ..

Date thedate;

thedate = new Date(System.currentTimeMillis());

outboundpr.setDel_date(thedate);

also set <b>type</b> of context vairable setDel_date to "date"

may this help you

Regards

Manoj Sahoo

Message was edited by:

Manoj Sahoo

Answers (1)

Answers (1)

Former Member
0 Kudos

the problem is in

codes.getString("DELIV_DATE").trim()

it returns "2006-12-15"

)) how do u thik java will convert "2006-12-15" to some long value?

Solution:

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

java.util.Date asDate = sdf .parse(codes.getString("DELIV_DATE").trim());

outboundpr.setDel_date(asDate.getTime());