01-13-2014 5:09 PM
Hi,
How can I avoid the message bellow:
The problem is:
The check shoud consider the date.
If I could just remove this check, it will help.
The code is:
DATA: WA_PERDATA LIKE SY-DATUM,
WA_PERHORA LIKE SY-UZEIT.
SELECTION-SCREEN BEGIN OF BLOCK B1_SEL WITH FRAME TITLE text-001.
SELECT-OPTIONS:
SPERDATA FOR WA_PERDATA OBLIGATORY,
SPERHORA FOR WA_PERHORA OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1_SEL.
Thank you!
01-13-2014 6:21 PM
This is a standard check for the select-options. It is telling you that the variable LOW is higher than the variable HIGH.
Could you please clarify why you need to remove this check? If you invert the dates it will stop bothering you.
04-17-2014 7:50 PM
Hi thanks for helpping!
Answering the question:
It is because I do not have a field like DateTime. The user will input something like that:
Date: 01.04.2014 to 02.04.2014
Time: 23:59:59 to 08:00:00 ---> Here is the problem, the initial hour is greater then the final
I will have to use all of it in a SELECT like:
SELECT * FROM table WHERE iniDate >= '01.04.2014' and finalDate <= '02.04.2014' and iniHour >= '23:59:59' and finalHour <= '08:00:00'.
Actually I have already fixed using independent fields in order to avoid the standard check.
But, do you know a better solution?
Is is possible to have in ABAP a field DateTime (Date and time in the same field)... Something in the format: "DD/MM/AAAA HH:MM:SS.SSS" like some databases do like MySQL?
Thanks in advance!
04-17-2014 9:05 PM
Hi Lindomar,
I was going to suggest exactly the same solution you have made.
There's no problem to do this way. I believe that even in standard tables/transactions you'll find an independent treatment for hour fields.
Rewardful points if useful.
João
04-17-2014 9:16 PM
Hi Lino,
You just have to revert your time as we can see it is enteterd in the wrong column.
Regarding your second query as your looking to optimize your select where condition using 2 values(high and low date time stamp) instead of 4 fields separately i can suggest you one thing.
Concatenate low-date low-time to a variable and do similarly for high.Finally use those variable in select.
But frankly i will go for 4 fields as it is one of the standard provided by SAP.Please let me know your findings.
Regards,
Kannan
04-18-2014 9:19 AM
hi,
U can resolve this issue by taking 2 different parameter for time.
i mean p_from _time and p_to_time.
So , system wil not validate from time and to time.
and U can use the comment syntax for getting same layout with different variable. From_time and To_time.
Regards,
Satyen