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-options

Former Member
0 Likes
623

At the following code i want to make the "s_status_ to be grey in some cases as you see.It is working when it is Parameter .

But i can't make it work when the "s_status" is SELECT-OPTIONS.

How can i do this ? Simply to activate or deactivate the select-optiopns .

----


  • SELECTION SCREEN DECLARATION *

----


SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS : S_CERTNR FOR YQM_CERT-CERTNR,

S_DOCNR FOR YQM_CERT-DOCNR,

S_VBELN FOR YQM_CERT-VBELN,

S_RDOCLN FOR YQM_CERT-RDOCLN.

PARAMETERS : S_STATUS LIKE YQM_CERT-STATUS.

PARAMETERS: XRHSTHS TYPE SY-UNAME.

SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.

DATA: P_VARI LIKE DISVARIANT-VARIANT .

*PARAMETERS: XRHSTHS TYPE SY-UCOMM.

SELECTION-SCREEN END OF BLOCK B2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF XRHSTHS = 'XXXX'

OR XRHSTHS = 'YYYYY'

OR XRHSTHS = 'BBBBB'

OR XRHSTHS = 'DDDDD'.

IF SCREEN-NAME = 'S_STATUS'.

SCREEN-INPUT = 1.

SCREEN-INTENSIFIED = 1.

MODIFY SCREEN.

EXIT.

ENDIF.

ELSE.

IF SCREEN-NAME = 'S_STATUS'.

SCREEN-INPUT = 0.

SCREEN-INTENSIFIED = 0.

MOVE 'A' TO S_STATUS.

MODIFY SCREEN.

EXIT.

ENDIF.

ENDIF.

ENDLOOP.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
601

Hello Dimath

You could use a modification id for your select-option or directly inactivate it:

SELECT-OPTIONS:
  s_status    FOR cert-status  MODIF ID 'INA'.



AT SELECTION-SCREEN OUTPUT.
  LOOP AT screen.
    IF ( screen-group1 = 'INA' ).
       screen-input = 0.
       modify screen.
    ENDIF.
  ENDLOOP.


" or:

  LOOP AT screen.
    IF ( screen-name CS ' S_STATUS' ).   " -low  AND -high !!!
     screen-input = 0.
     modify screen.
   ENDIF.
  ENDLOOP.

Regards

Uwe

6 REPLIES 6
Read only

Former Member
0 Likes
601

Make the highlighted changes:

LOOP AT SCREEN.

IF XRHSTHS = 'XXXX'

OR XRHSTHS = 'YYYYY'

OR XRHSTHS = 'BBBBB'

OR XRHSTHS = 'DDDDD'.

IF SCREEN-NAME <b>cs</b> 'S_STATUS'.

SCREEN-INPUT = 1.

SCREEN-INTENSIFIED = 1.

MODIFY SCREEN.

EXIT.

ENDIF.

ELSE.

IF SCREEN-NAME <b>cs</b> 'S_STATUS'.

SCREEN-INPUT = 0.

SCREEN-INTENSIFIED = 0.

MOVE 'A' TO S_STATUS.

MODIFY SCREEN.

EXIT.

ENDIF.

ENDIF.

ENDLOOP.

or

LOOP AT SCREEN.

IF XRHSTHS = 'XXXX'

OR XRHSTHS = 'YYYYY'

OR XRHSTHS = 'BBBBB'

OR XRHSTHS = 'DDDDD'.

IF SCREEN-NAME = 'S_STATUS<b>-LOW'</b>.

SCREEN-INPUT = 1.

SCREEN-INTENSIFIED = 1.

MODIFY SCREEN.

EXIT.

ENDIF.

ELSE.

IF SCREEN-NAME = 'S_STATUS<b>-LOW</b>'.

SCREEN-INPUT = 0.

SCREEN-INTENSIFIED = 0.

MOVE 'A' TO S_STATUS.

MODIFY SCREEN.

EXIT.

ENDIF.

ENDIF.

ENDLOOP.

Regards,

Ravi

Read only

dani_mn
Active Contributor
0 Likes
601
select-options: S_STATUS FOR YQM_CERT-STATUS MODIF ID SEL.


at selection-screen output.

    loop at screen.
       IF XRHSTHS = 'XXXX'
          OR XRHSTHS = 'YYYYY'
          OR XRHSTHS = 'BBBBB'
          OR XRHSTHS = 'DDDDD'.

      if screen-group1 = 'SEL'.
        SCREEN-active = 1.
        SCREEN-INTENSIFIED = 1.
        modify screen.
        exit.
      endif.
      ELSE.
      if screen-group1 = 'SEL'.
        SCREEN-active = 0.
        SCREEN-INTENSIFIED = 0.
        MOVE 'A' TO S_STATUS.
        modify screen.
        exit.
      endif.
     ENDIF.

    endloop.
Read only

Former Member
0 Likes
601

IF SCREEN-NAME = 'S_STATUS-LOW' OR

SCREEN-NAME = 'S_STATUS-HIGH' .

SCREEN-INPUT = 0.

SCREEN-INTENSIFIED = 0.

MOVE 'A' TO S_STATUS.

MODIFY SCREEN.

EXIT.

ENDIF.

REGARDS

SHIBA DUTTA

Read only

uwe_schieferstein
Active Contributor
0 Likes
602

Hello Dimath

You could use a modification id for your select-option or directly inactivate it:

SELECT-OPTIONS:
  s_status    FOR cert-status  MODIF ID 'INA'.



AT SELECTION-SCREEN OUTPUT.
  LOOP AT screen.
    IF ( screen-group1 = 'INA' ).
       screen-input = 0.
       modify screen.
    ENDIF.
  ENDLOOP.


" or:

  LOOP AT screen.
    IF ( screen-name CS ' S_STATUS' ).   " -low  AND -high !!!
     screen-input = 0.
     modify screen.
   ENDIF.
  ENDLOOP.

Regards

Uwe

Read only

Former Member
0 Likes
601

Try changing the statement

IF SCREEN-NAME = 'S_STATUS' to

IF SCREEN-NAME CS 'S_STATUS' or IF SCREEN-NAME CP 'S_STATUS'. One of them should work. Also put the code in a form and call it in each of the

AT SELECTION-SCREEN .............

statements.

Read only

Former Member
0 Likes
601

cHECK THSI DEMO CODE AND Reward if helpfull

tables pa0002.

Select-options : S_STATUS for pa0002-pernr modif Id ABC.

PARAMETERS : P_CHECK AS CHECKBOX USER-COMMAND CH.

CHECK SY-UCOMM = 'CH'.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF P_CHECK = 'X'.

IF SCREEN-GROUP1 = 'ABC'.

SCREEN-INPUT = 1.

*SCREEN-INTENSIFIED = 1.

MODIFY SCREEN.

ENDIF.

ELSE.

IF SCREEN-GROUP1 = 'ABC'.

SCREEN-INPUT = 0.

*SCREEN-INTENSIFIED = 0.

*MOVE 'A' TO S_STATUS.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.