Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select-option

Former Member
0 Likes
1,134

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

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
1,036

Hi,

try this..


concatenate s_cr-high+0(8) '235900' into  s_cr-high.

Regards,

Suresh Datti

8 REPLIES 8
Read only

suresh_datti
Active Contributor
0 Likes
1,037

Hi,

try this..


concatenate s_cr-high+0(8) '235900' into  s_cr-high.

Regards,

Suresh Datti

Read only

former_member186741
Active Contributor
0 Likes
1,036

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?

Read only

Former Member
0 Likes
1,036

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

Read only

0 Likes
1,036

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

Read only

0 Likes
1,036

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.

Read only

0 Likes
1,036

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.

Read only

Former Member
0 Likes
1,036

Hi,Neil:

The CREATE_AT type DEC,length 15. U understand nice.

Can you give me further adivce.Thanks!

zagory

Read only

Former Member
0 Likes
1,036

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!