on 08-05-2008 6:11 AM
Hi Gurus,
I am facing problem calling an RFC. The RFC expects the system date as an import param.
I am not able to pass the param (setDate() method expects an sql date).
I know, the webdynpro will take care of the formatting internally.
Can somebody help me ????
Thanks in advance
Biroj..
Hi,
Get the system date, convert it to milliseconds yourdate.toxxxx(). then convert it to sql date. then assign to your RFC.
I think you understood this with nikil's code.
PradeeP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
very helpful answers...
thanks everybody....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use the following code
java.sql.Date date = new java.sql.Date(Calendar.getInstance().getTimeInMillis());
//Change the following to suite your context structure.
wdContext.currentContextElement().setDate(date);
//For Formatting use the following code
DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy");
dateFormat.format(date);
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Biroj,
you can pass the current date as :-
(new java.sql.Date(new java.util.Date().getTime()))
Thanks
Namrata
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
with this setDate(new java.sql.Date(Calendar.getInstance().getTimeInMillis()));
you can pass the current date to rfc.
Regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
java.sql.Date today = new java.sql.Date(System.currentTimeInMilliseconds());
and you can pretty well go for setDate( today);
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.