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

Disable text Box On Selection screen

Former Member
0 Likes
1,282

hello guys,

I am making a selection screen report in which i want to disable the text box , when i am selecting a particular radio button.

Kindly, let me know how to do the same.

Thanks & regards.

Kirtish

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
674

Hello,

Check this sample.


SELECTION-SCREEN BEGIN OF BLOCK BLCK1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN MODIF ID RD1,
                S_ANFNR FOR EKPO-ANFNR MODIF ID RD2,
                S_EKORG FOR EKKO-EKORG.
SELECTION-SCREEN SKIP.
PARAMETERS: P_PO  RADIOBUTTON GROUP RAD1 USER-COMMAND USR DEFAULT 'X',
            P_KON  RADIOBUTTON GROUP RAD1,
            P_RFQ RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK BLCK1.

AT SELECTION-SCREEN OUTPUT.

  IF P_PO = 'X' OR P_KON = 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'RD2'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'RD1'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

Cheers,

Vasanth

2 REPLIES 2
Read only

Former Member
0 Likes
675

Hello,

Check this sample.


SELECTION-SCREEN BEGIN OF BLOCK BLCK1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN MODIF ID RD1,
                S_ANFNR FOR EKPO-ANFNR MODIF ID RD2,
                S_EKORG FOR EKKO-EKORG.
SELECTION-SCREEN SKIP.
PARAMETERS: P_PO  RADIOBUTTON GROUP RAD1 USER-COMMAND USR DEFAULT 'X',
            P_KON  RADIOBUTTON GROUP RAD1,
            P_RFQ RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK BLCK1.

AT SELECTION-SCREEN OUTPUT.

  IF P_PO = 'X' OR P_KON = 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'RD2'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'RD1'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

Cheers,

Vasanth

Read only

Former Member
0 Likes
674

hi kirtish

if u want to disable the text box on the screen, u need to use the screen table.

see. All fields of the current screen are stored in the system table SCREEN with their attributes.

so when u click on the any element of the screen the sceen table is looped through.

use the following code in at selection screen output .

put the name of the text box in the

ex:

LOOP AT SCREEN.

IF SCREEN-NAME = <FIRST RADIO BUTTON>

(IF p_r1 = 'X'. say p_r1 is your radio button name)

LOOP AT SCREEN.

IF SCREEN-NAME = <text box>

SCREEN-INPUT = OFF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

in case of query please reply.

award if useful

Varun