on 12-02-2009 10:16 AM
Dear All,
My requirement is to pass a dummy date ie 01-01-1970 when i create a dealer. Now this date has to be set to a r/3 date field. Is it possible to set a particular date via hard coding and set it to date field in r/3 which wud be of type sql date.
Thankyou.
Regards,
Jaspreet Kaur
Hi,
Use the Calendar class.
Calendar cal = Calendar.getInstance();
cal.set(Calendar.YEAR, 1970);
cal.set(Calendar.MONTH, 0);
cal.set(Calendar.DAY_OF_MONTH, 1);
java.sql.Date d=new Date(cal.getTimeInMillis());
pass the d to RFC which will take 01-01-1970 as the date.
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the current date for passing the sql date to R/3 input parameter using following code
java.sql.Date date = new java.sql.Date(System.currentTimeInMilliSeconds());
For user defined date use :
DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yy");
java.util.Date enteredDate = dateFormat.parse("15-Nov-09");
java.sql.Date sDt = new java.sql.Date(enteredDate.getTime());
And then pass this sDt to R/3.
Regards,
Tushar Sinha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you pass a date to r/3 you pass a date object which means that the date format is irrelevant.
The date object sent to r/3 is based on java.sql.Date.
If you need a represantion on the screen you can use a custom data dictionary date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.