‎2006 Mar 23 2:10 AM - last edited on ‎2024 Feb 04 6:03 AM by postmig_api_4
Hello:
The field "CREATE_AT" format YYYYMMDDHHMMSS length 14 and I define the SELECT-OPTION S_CR for CREATE_AT.If input "20060301" for it, CREATE_AT default "20060301000000".
I want make sure that input "20060301 to 20060320" for S_CR,and select data during 20060301000000 to 200060320235900(or 20060324000000).I try to coding
S_CR-HIGH = S_CR-HIGH + 00000001000000.
But select infomation also during 20060301000000 to 2006032000000.
Hope someone can give me some advice to solve the problem.
Hope its clear!
Regards&Thanks
‎2006 Mar 23 2:16 AM
Hi,
try this..
concatenate s_cr-high+0(8) '235900' into s_cr-high.
Regards,
Suresh Datti
‎2006 Mar 23 2:16 AM
Hi,
try this..
concatenate s_cr-high+0(8) '235900' into s_cr-high.
Regards,
Suresh Datti
‎2006 Mar 23 2:28 AM
is CREATE_AT char or decimal or int?
am I right in thinking you want to be able to enter an 8 char date on the selction screen but internally convert the 'low' to include time of 000000 and the 'high' to have a time of 235959?
‎2006 Mar 23 2:40 AM
HI,Suresh:
Ur code can not execute.
And I code like this:
DATA T_DATE(14) TYPE C.
T_DATE = S_CR_AT-HIGH.
CONCATENATE T_DATE '235959' INTO T_DATE.
S_CR_AT-HIGH = T_DATE.
But problem go on, can you give me the further help.
Regards&Thanks
Zagory
‎2006 Mar 23 2:43 AM
try this..
DATA T_DATE(14) TYPE C.
T_DATE = S_CR_AT-HIGH.
CONCATENATE T_DATE+0(8) '235959' INTO T_DATE.
S_CR_AT-HIGH = T_DATE.
Regards,
Suresh Datti
‎2006 Mar 23 3:02 AM
I would have a select-option of
s_date for sy-datum.
and have:
ranges: r_timestamp for ???-create_at.
after start-of-selection
loop at s_date.
move-corresponding s_date to r_timestamp.
r_timestamp-high+8(6) = '295959'.
append r_timestamp.
endloop.
then use r_timestamp instead of s_date in the rest of your program.
‎2006 Mar 23 3:06 AM
ah, DEC... slightly different:
s_date for sy-datum.
and have:
ranges: r_timestamp for ???-create_at.
data l_ts(14).
after start-of-selection
loop at s_date.
move-corresponding s_date to r_timestamp.
l_ts+8(6) = '295959'.
r_timestamp-high = l_ts.
append r_timestamp.
endloop.
‎2006 Mar 23 2:56 AM
Hi,Neil:
The CREATE_AT type DEC,length 15. U understand nice.
Can you give me further adivce.Thanks!
zagory
‎2006 Mar 23 3:37 AM
Hi,Neil:
Thanks for ur advice!
Now I solve the problem code like this:
T_DATE = S_CR_AT-HIGH.
<b>CONCATENATE T_DATE+0(8) '235959' INTO T_DATE.</b>
(advice from Suresh,Thank you very much)
F_DATE = S_CR_AT-LOW.
SELECT
*
FROM <table>
WHERE CREATED_AT <= T_DATE
AND CREATED_AT >= F_DATE.
Best Regardes!