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

Time field in selection screen

Former Member
0 Likes
3,421

Hi All,

I have one requirement like we need to create the selection screen with date and time fields to hold the values of shift times. Please find below example.

In selection screen I am using select-option for creating selection screen withr date and time fields.

Select-option : Date :- From Date to To-Date (Ex : 07-08-2009 to 07-09-2009

Shift 1:u2013 From-Time to To-Time (Ex : Values 6:00:00 to 14:00:00)

Shift 2 :u2013 From-Time to To-Time (Ex : Values 14:00:00 to 22:00:00)

Shift 3 :u2013 From-Time to To-Time (Ex : Values 22:00:00 to 6:00:00)

When I try to press enter is giving message like u201CLower Limit is Greater than higher limitu201D for shift 3 selection field.

Please let me know how can we design the selection screen for this type of scenario.

Thanks in Advanceu2026u2026

Amjad.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,930

Hi,

In this case you cannot use select options. If you use parameters, it will be displayed in next line only. So, go for module pool programming. Have seperate fields for lower limit and upper limit and change the selection query.

Thanks and regards,

Venkat

Edited by: VENKAT RAMAN on Jul 8, 2009 1:42 PM

Hi All,

I have one requirement like we need to create the selection screen with date and time fields to hold the values of shift times. Please find below example.

In selection screen I am using select-option for creating selection screen withr date and time fields.

Select-option : Date :- From Date to To-Date (Ex : 07-08-2009 to 07-09-2009

Shift 1:u2013 From-Time to To-Time (Ex : Values 6:00:00 to 14:00:00)

Shift 2 :u2013 From-Time to To-Time (Ex : Values 14:00:00 to 22:00:00)

Shift 3 :u2013 From-Time to To-Time (Ex : Values 22:00:00 to 6:00:00)

When I try to press enter is giving message like u201CLower Limit is Greater than higher limitu201D for shift 3 selection field.

Please let me know how can we design the selection screen for this type of scenario.

Thanks in Advanceu2026u2026

Amjad.

7 REPLIES 7
Read only

Former Member
0 Likes
1,931

Hi,

In this case you cannot use select options. If you use parameters, it will be displayed in next line only. So, go for module pool programming. Have seperate fields for lower limit and upper limit and change the selection query.

Thanks and regards,

Venkat

Edited by: VENKAT RAMAN on Jul 8, 2009 1:42 PM

Read only

Former Member
0 Likes
1,930

Hi,

Instead of using Select-options, try using parameters. This will help you get whatever input you need, irrespective of whether the second input is less than the first or not.

Regards,

Ibrar

Read only

huseyindereli
Active Contributor
0 Likes
1,930

User can do it with variant.

You need to select 2 intervals ;

22:00 - 23:59

00:00 - 06:00

Or just exclude interval ;

06:01-21:59

Read only

Former Member
0 Likes
1,930

You can use parameters for this purpose and if you want both the parameters in same line then use below statement.

Begin of line.

parameters: p_par1(6),

p_par2(6).

end of line

Read only

0 Likes
1,930

Hello,

Use the Data type TIMS for that .

As in my case i am having in one table and using in program

Feild Data Element Data type Length Deci Text

STAT_TIME AP_STAT_TIME TIMS 6 0 IUser History: Status

And on selection screen its appearing as F4 help for selecting time. As follows

History Time 00:00:00 (with F4 help)

Thanks

manish

Read only

Former Member
0 Likes
1,930

Hi,

I have added two time fields in a line using PARAMETERS. Hope this code might be helpful to add any number of time fields as you need:

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(10) TEXT-R01 FOR FIELD p_par1.

PARAMETERS p_par1 like sy-uzeit.

SELECTION-SCREEN POSITION 30.

SELECTION-SCREEN COMMENT 45(10) TEXT-R02 FOR FIELD p_par2.

PARAMETERS p_par2 like sy-uzeit.

SELECTION-SCREEN END OF LINE.

Thanks,

Sathya.

Read only

Former Member
0 Likes
1,930

thx