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

reg selection screen

Former Member
0 Likes
583

SELECTION-SCREEN BEGIN OF BLOCK blk3 WITH FRAME TITLE text-t03.

SELECTION-SCREEN COMMENT /1(50) comm1 MODIF ID mg1.

PARAMETERS:p_carr TYPE c AS CHECKBOX USER-COMMAND UC1.

SELECT-OPTIONS:s_doc FOR bkpf-blart.

SELECTION-SCREEN END OF BLOCK blk3.

this is my selection screen. in this i have to make s_doc parameter in disable mode . it should be enabled only if the checkbox p_carr is clicked.otherwise it should be in disable mode

so can u plz help me out in getting this?

thanx in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
549

Hi,

It can be done like below........

TABLES bkpf.

SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
PARAMETERS:p_chk TYPE c AS CHECKBOX USER-COMMAND chk.
SELECT-OPTIONS:s_doc FOR bkpf-blart.
SELECTION-SCREEN END OF BLOCK blk.

AT SELECTION-SCREEN OUTPUT..

  CASE p_chk.
    WHEN 'X'.
      LOOP AT SCREEN.
        CHECK screen-name = 'S_DOC-LOW' OR
              screen-name = 'S_DOC-HIGH'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDLOOP.
    WHEN OTHERS.
      LOOP AT SCREEN.
        CHECK screen-name = 'S_DOC-LOW' OR
              screen-name = 'S_DOC-HIGH'.
        screen-input = 1.
        MODIFY SCREEN.
      ENDLOOP.
  ENDCASE.

Cheers,

Jose.

4 REPLIES 4
Read only

Former Member
0 Likes
549

Hi,

Write:

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_carr = 'X'.

IF screen-group1 = 'MG1'.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Read only

prasanth_kasturi
Active Contributor
0 Likes
549

hi,

You must do it in AT SELECTION-SCREEN OUTPUT event

check this code

SELECTION-SCREEN BEGIN OF BLOCK blk3 WITH FRAME TITLE text-t03.

SELECTION-SCREEN COMMENT /1(50) comm1.

PARAMETERS:p_carr TYPE c AS CHECKBOX USER-COMMAND UC1.

SELECT-OPTIONS:s_doc FOR bkpf-blart modif id mod.

SELECTION-SCREEN END OF BLOCK blk3.

AT SELECTION-SCREEN OUTPUT.

loop at screen .

if p_carr = 'X' and screen-group1 = 'MOD'.

screen-input = 1.

modify screen.

elseif screen-group1 = 'MOD'.

screen-input = 0.

modify screen.

endif.

endloop.

regards

prasanth

Read only

Former Member
0 Likes
550

Hi,

It can be done like below........

TABLES bkpf.

SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
PARAMETERS:p_chk TYPE c AS CHECKBOX USER-COMMAND chk.
SELECT-OPTIONS:s_doc FOR bkpf-blart.
SELECTION-SCREEN END OF BLOCK blk.

AT SELECTION-SCREEN OUTPUT..

  CASE p_chk.
    WHEN 'X'.
      LOOP AT SCREEN.
        CHECK screen-name = 'S_DOC-LOW' OR
              screen-name = 'S_DOC-HIGH'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDLOOP.
    WHEN OTHERS.
      LOOP AT SCREEN.
        CHECK screen-name = 'S_DOC-LOW' OR
              screen-name = 'S_DOC-HIGH'.
        screen-input = 1.
        MODIFY SCREEN.
      ENDLOOP.
  ENDCASE.

Cheers,

Jose.

Read only

Former Member
0 Likes
549

Hi ,

Do the sight modification to your sel screen.

modif id:

The addition MODIF ID assigns all the screen elements for the selection criterion to the modification group modid that is assigned to column group1 in the system table screen. This means they can be modified with a MODIFY SCREEN statement before the selection screen is displayed. You must specify the name of the modification group modid directly and it can only contain a maximum of three characters.

refer the code:

REPORT ZTEST47.

tables : bkpf.

SELECTION-SCREEN BEGIN OF BLOCK blk3 WITH FRAME TITLE text-t03.

SELECTION-SCREEN COMMENT /1(50) TEXT-001.

PARAMETERS:p_carr TYPE c AS CHECKBOX USER-COMMAND UC1.

SELECT-OPTIONS:s_doc FOR bkpf-blart MODIF ID mg1.

SELECTION-SCREEN END OF BLOCK blk3.

at SELECTION-SCREEN OUTPUT.

  • If check box is enabled ,then you can not enter values in in S_doc(graded out).

LOOP AT SCREEN.

if p_carr eq 'X' AND screen-group1 = 'MG1' .

screen-INPUT = 0.

modify screen.

endif.

ENDLOOP.

Reward if help ful

rgds

Umakanth