on 04-28-2004 9:48 AM
Hi all
I need to format a date. I have a date like YYYYMMDD and I would like to format it like DD/MM/YYYY .... Has anybody a solution ?
J
Hi Jerome-
Could you please forward me your JavaScript function for converting to and from SAP date?
I would like to use it at one of my projects where I currently need it.
Thanks,
- Vik.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We usually do the internal to external (and back) conversions at the server. If you use for example a model class, or a page attribute that is flagged as autofill, the conversion routines should handle it.
Otherwise look at class CL_BSP_UTILITY. You are interested in methods MAKE_STRING and INSTANTIATE_SIMPLE_DATA. This shows how 'D' in converted back and forth. You can use these two methods to just convert your data yourself.
Hi Brian,
the INSTANTIATE_SIMPLE_DATA-method seems to be a solution for my problem as well: it has nothing to do with BSPs, it's "only" an ABAP report for uploading data from the PC client.
But if I use this method for character fields with conversion exit it does not work correct because the conversion exit is not executed. Thus, I have to execute the conversion exit separately in my program for CHAR fields. I.e.: field GDATU of database TCURR.
It seems to be a gap in functionality ... What do you think?
Hallo Frank,
> It seems to be a gap in functionality ... What do you think?
I asked my colleague about this, and the answer was "work as designed" :). In principle the code was written long time ago, and for the place where we use it, there was no need for exit routines.
However, you are right that there is a general need for this. The MVC stuff, the model code does call the conversion exists correctly. So we do have it, when the going gets tough.
You could consider to use such a model class without BSP. I suspect you might even make it work relatively easy. I have achieved something close to that once. (Or just borrow the code.)
+bcm
Dont worry It's ok. But your method isn't client systems dependent but SAP dependent. So I use a javascript to convert a SAP DATE into a Web format date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
great <% page->write( mydate ) %> Nice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look at ABAP key word WRITE and its Formatting options .
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.