‎2008 Mar 28 1:16 PM
Hi!
How can I ensure that a date format has
valid format ? A field is populated with
any date. The format is what the user has
been set in his profile. For me now it is
now interesting to ensure that this value
is a valid date format.
regards
ilhan
‎2008 Mar 28 1:20 PM
hi,
then use the below statement give the format as that of BDC format
Write v_date to w_date dd/mm/yy.
or
Write v_date to w_date dd.mm.yy.
‎2008 Mar 28 1:20 PM
hi,
then use the below statement give the format as that of BDC format
Write v_date to w_date dd/mm/yy.
or
Write v_date to w_date dd.mm.yy.
‎2008 Mar 28 1:21 PM
Hi,
if you are using select options or a parameter to get the data, then it will validate automaticaly, when you declared for/type sy-datum.
To do it with a char variable, try to declare another type date variable and try to move the value to it.
Regards.
‎2008 Mar 28 1:27 PM
HI
IS THERE REALLY NO FM AVAILABLE.
IMAGINE I MUST CHECK THIS IF IT IS
VALID IN ORDER TO CALL ANOTHER
FM. IT CAN HAPPEN THAT THIS VALUE
NOT ABLE TO BEEING USED IF IT HASN'T
A ALLOWED DATE FORMAT. GENERALLY
HOW DO YOU SOLVE SUCH PROBLEMS
REGARDS
ILHAN
‎2008 Mar 28 1:30 PM
hi ,
if you r declaring the field like this ..
data: date type sy-datum. or
data: data like pa0041-dat01.
then it automatically check the values ...no need to check...
but if is a char type then u need to test it ..
regards,
venkat.
‎2008 Mar 28 1:43 PM
HI ALL YES IT IS
CHAR TYPE AND MY QUESTION HOW CAN IT BE
CHECKED IT THAT CASE. WHICH CHECK
MECHANISM DO YOU KNOW ???
REGARDS
ILHAN
‎2008 Mar 28 1:47 PM
‎2008 Mar 28 2:19 PM
Ok, try to do this:
write char_data to d_data.
d_data = d_data - 1.
if d_data is INITIAL.
*Invalid date
endif.
If your char date was invalid, when you decrease by 1, it will be initial. Then you can check it!
Regards.