Application Development 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: 

Select-option

Former Member
0 Kudos

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

suresh_datti
Active Contributor
0 Kudos

Hi,

try this..


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

Regards,

Suresh Datti

8 REPLIES 8

suresh_datti
Active Contributor
0 Kudos

Hi,

try this..


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

Regards,

Suresh Datti

former_member186741
Active Contributor
0 Kudos

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?

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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.

0 Kudos

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.

Former Member
0 Kudos

Hi,Neil:

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

Can you give me further adivce.Thanks!

zagory

Former Member
0 Kudos

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!