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

help in SELECTION-SCREEN

Former Member
0 Likes
1,080

hallow

i wont in my selection screen hours and days.

how i declare it

example

from hour to hour

same with day.

and in which field i catch the hour-low and high.

regards

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,051

Something like this?



report zrich_0003 .

data: d_hour type i,
      d_days type i.

select-options: s_hour for d_hour.
select-options: s_days for d_days.


start-of-selection.

Regards,

Rich HEilman

12 REPLIES 12
Read only

ferry_lianto
Active Contributor
0 Likes
1,051

Hi,

You can default the select-options values at INITIALIZATION event.

or


select-options: so_day for vtbbewe-atage default '1' to '2',
                so_time for sy-uzeit default sy-uzeit to sy-uzeit.  

Regards,

Ferry Lianto

Read only

0 Likes
1,051

hi ferry

if user wont to see report from 14:00 until 15:00.

where i find this fields becouse i use functin in my report and the function

wont date that the user put

regards

Read only

Former Member
0 Likes
1,051

Hi Antonio,

I haven't clearly understood your requirement. But I guess, you need to display the the current date and time in the selection screen, whenever your program is executed. If that is the case, you can go for SY-UZEIT and SY-DATUM.

If not, specify your requirement a little more clearly.

Regards

Anil Madhavan

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,052

Something like this?



report zrich_0003 .

data: d_hour type i,
      d_days type i.

select-options: s_hour for d_hour.
select-options: s_days for d_days.


start-of-selection.

Regards,

Rich HEilman

Read only

0 Likes
1,051

hi rich

yes somthing like that but

if user wont to see report from 14:00 until 15:00.

where i find this fields

regards

Read only

0 Likes
1,051

For that you should be using SY-UZEIT as your field describer, It is not a good idea to only try to use hours.

select-options: s_uzeit for sy-uzeit.

Then the user can enter, 14:00:00 to 15:00:00

Regards,

RIch Heilman

Read only

0 Likes
1,051

You can use the System field SY-UZEIT , This will have the current time.

use the INITIALIZATION event to set the required values to teh Select options based on Current time

Regards,

guarav

Read only

0 Likes
1,050

hi rich

this hours i have to move to function that i use in my report same is the day

like s_uzeit-low and high

where i find them

Regards

Read only

0 Likes
1,050

Within the Program an internal table will be created with the Name of the select option.

You can use the following

data : v_time1 type SYUZEIT,

v_time2 type SYUZEIT.

Loop at S_TIME.

move s_time-low to v_time1.

move s_time-HIGH to v_time2.

endloop.

Use the Variable V_TIME1 & V_TIME2 in the FM to pass these vaules.

Kindly be generous with points

Read only

0 Likes
1,050

You can read the select-option to get the values of low and high. Of course this will only work if the user enters a from and to range.

read table s_uzeit index 1.
if sy-subrc  = 0.
 write:/  s_uzeit-low, 'to', s_uzeit-high.
endif.

Regards,

RIch Heilman

Read only

suresh_datti
Active Contributor
0 Likes
1,050

You can try something like the following..

selection-screen begin of line.
selection-screen comment 2(20) 'From Date & Time'(t01).
selection-screen position 40.
parameters:
              p_frdat like sy-datum.
selection-screen position 55.
parameters:
             p_frtim like sy-uzeit.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 2(20) 'To Date & Time'(t02).
selection-screen position 40.
parameters:
              p_todat like sy-datum.
selection-screen position 55.
parameters:
             p_totim like sy-uzeit.
selection-screen end of line.

~Suresh

Read only

Former Member
0 Likes
1,050

HI,

create structure which contains days and hours,

than use it in selct-options

reward if helpful,

regards,

Imran