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: 

DISABLING INPUT FIELD

Former Member
0 Kudos

HI Experts,

I hav used select-options date. I need to disable the high date range (S_DATE-HIGH). so that user can only change the lower limit. pLZ HELP.

tHANKS.

KHAN

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try like below....

DATA date TYPE dats.
SELECT-OPTIONS s_date FOR date.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF screen-name = 'S_DATE-HIGH'.
      screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

Cheers,

jose.

10 REPLIES 10

Former Member
0 Kudos

You can use 'No Interval' addition with the select option defenation.



SELECTION-SCREEN INCLUDE SELECT-OPTIONS selcrit 
                                        [OBLIGATORY [OFF]] 
                                        [NO INTERVALS [OFF]] 
                                        [NO-EXTENSIONS [OFF]] 
                                        [MODIF ID modid] 
                                        [ID id].

Or you can use the FM' SELECT_OPTIONS_RESTRICT for that purpose.

0 Kudos

HI ABHI,

I supposed to display the high range with current date but in disabled mode.

Thanks.

Khan.

0 Kudos

In that case,

Use the following logic:

Even you can achieve it by the following approach:

Loop the screen table in ‘AT SELECTION-SCREEN OUTPUT’ event and modify the screen table like following:


LOOP AT SCREEN.
    IF SCREEN-NAME = ‘S_MATNR-HIGH’.
           SCREEN-INPUT = 0. ( or SCREEN-INVISIBLE = 1)
          MODIFY SCREEN.
    ENDIF.
ENDLOOP.

Former Member
0 Kudos

Hi,

Use NO INTERVALS extension in ur select-options. This will help. Reward points if helpful.

Regards,

Ramya

Former Member
0 Kudos

Hi,

Try like below....

DATA date TYPE dats.
SELECT-OPTIONS s_date FOR date.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF screen-name = 'S_DATE-HIGH'.
      screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

Cheers,

jose.

Former Member
0 Kudos

hi

Use NO INTERVALS Keyword....

 tables : mara.
  Select-options S_matnr for Mara-matnr No intervals 

This will hide ur HIGH value so as ur Select options look alike Parameters

Former Member
0 Kudos

Hi,

SELECT-OPTIONS

Declares selection criteria for a selection screen.

Syntax

SELECT-OPTIONS <sel> FOR <f>

[DEFAULT <g> [to <h>] [OPTION <op>] SIGN <s>]

[MEMORY ID <pid>]

[LOWER CASE]

[OBLIGATORY]

[NO-DISPLAY]

[MODIF ID <key>]

[NO-EXTENSION]

[NO INTERVALS]

[NO DATABASE SELECTION].

Declares a selection table <sel> for the field <f>. For <sel>, places input fields on the corresponding selection screen. The additions allow you to set a default value, accept input in lowercase, define a required field, suppress or modify the display on the selection screen, restrict the selection table to a line or a selection to a single field, or prevent input from being passed to a logical database

Regards,

Priya.

Former Member
0 Kudos

Hi Khan,

Try this:

DATA date TYPE dats.

SELECT-OPTIONS s_date FOR date.

AT SELECTION-SCREEN OUTPUT.

s_date-high = sy-datum.

APPEND s_date.

LOOP AT SCREEN.

IF screen-name = 'S_DATE-HIGH'.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Reward Points if Useful.

Former Member
0 Kudos

Hi,

You can just decalre like,

SELECT-OPTIONS:

<date >FOR <sflight-fldate> NO-EXTENSION NO INTERVALS.

Former Member
0 Kudos

Hi,

I think it will better to hide the unwanted selection. May be in the future, you would be needed to add the same again.

So, why don't you use NO-DISPLAY option with the input field.

Select-option: name for kna1-name1 NO DISPLAY.

OR

If you can use the Parameter selection if you don't want to use the high range value, then in this case, an unique input criteria will work for the user.

Thanks,

ShAMIM