2008 Jan 22 6:57 AM
Hi,
I have got a select option which i have given the type sy-datum. Now in the code i have to check whether user has selected current date. for ex
p_Date for sy-datum.
now in the code i compare if (p_date = sy-datum)
I am facing a problem here, the format of p_date and sy-datum is different.
Suppose i selected todays date from select screen p_date value is shown as IE2000801220000000
and sy-datum value is 20080122. Due tro this the check condition fails. Please advice how to overcome this?
Rakesh
2008 Jan 22 7:02 AM
Hi,
If you use select options, the input field values will be like:
so_field-low and so_field-high
so use like,
if p_date-low eq sy-datum.
Pls reward points if solved.
Regards,
Renjith Michael.
Edited by: Renjith Michael on Jan 22, 2008 12:33 PM
Hi,
I have got a select option which i have given the type sy-datum. Now in the code i have to check whether user has selected current date. for ex
p_Date for sy-datum.
now in the code i compare if (p_date = sy-datum)
I am facing a problem here, the format of p_date and sy-datum is different.
Suppose i selected todays date from select screen p_date value is shown as IE2000801220000000
and sy-datum value is 20080122. Due tro this the check condition fails. Please advice how to overcome this?
Rakesh
2008 Jan 22 7:00 AM
Use the FM CONVERT_DATE_TO_INTERNAL to convert the date entered to internal format and then compare.
2008 Jan 22 7:01 AM
2008 Jan 22 7:02 AM
Hi,
If you use select options, the input field values will be like:
so_field-low and so_field-high
so use like,
if p_date-low eq sy-datum.
Pls reward points if solved.
Regards,
Renjith Michael.
Edited by: Renjith Michael on Jan 22, 2008 12:33 PM
2008 Jan 22 7:02 AM
declare like dis.....
p_date type sy-datum. adn not p_Date for sy-datum
p_date ll noew be like 20080122
2008 Jan 22 7:03 AM
Hi,
Use this logic.
read table p_date index 1.
if p_date-low <> Sy-datum.
message .......
endif.
regards,
Santosh Thorat
2008 Jan 22 7:10 AM
Hi Rakhesh,
Instead of using select option use
p_date type sy-datum.
at selection-screen on p_date.
if p_date <> sy-datum.
give error msg...........
endif.
If it is helpfull pls reward pts.
Regards
Srimanta
2008 Jan 22 7:12 AM
hi rakesh,
since you are using select-options,
get the 'low' value of your p_date.
so instead of just p_date, use p_date-low.
regards,
laure.
>>>reward points if useful.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |