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: 

at selection-screen for checkbox

moniabap_moni
Explorer
0 Kudos

HI Experts,

I want to have 4 checkboxes in a selection-screen like cb1,cb2cb3,cb4, and if iam selecting any checkbox like cb2 or cb3 or cb4 or even all 3 checkboxes the first checkbox cb1 has to check automatically? how to do it? rewarded if helpful..

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

Try this type of code:


parameters: p_ch1 as checkbox,
            p_ch2 as checkbox user-command usr1,
            p_ch3 as checkbox user-command usr1,
            p_ch4 as checkbox user-command usr1.

at selection-screen.
  if p_ch2 = 'X' or p_ch3 = 'X' or p_ch4 = 'X'.
    p_ch1 = 'X'.
  endif.

Regards,

Naimesh Patel

3 REPLIES 3

naimesh_patel
Active Contributor
0 Kudos

Try this type of code:


parameters: p_ch1 as checkbox,
            p_ch2 as checkbox user-command usr1,
            p_ch3 as checkbox user-command usr1,
            p_ch4 as checkbox user-command usr1.

at selection-screen.
  if p_ch2 = 'X' or p_ch3 = 'X' or p_ch4 = 'X'.
    p_ch1 = 'X'.
  endif.

Regards,

Naimesh Patel

Former Member
0 Kudos

hi,


 at selection-screen output.
 if c2 = 'X' or c3 = 'X' or c4 = 'X'. 
  loop at screen.
    if screen-name = 'C1'.
        screen-input = '1'.
        modify screen. 
    endif.
  endloop.
endif. 

Regards,

Santosh

Former Member
0 Kudos

Hi,

To check cb1, use the FM:

REFRESH DYNPFIELDS.

CLEAR DYNPFIELDS.

MOVE 'field name' TO DYNPFIELDS-FIELDNAME.

MOVE 'X' TO DYNPFIELDS-FIELDVALUE.

APPEND DYNPFIELDS.

CALL FUNCTION 'DYNP_VALUES_UPDATE'

EXPORTING

DYNAME = 'Name program'

DYNUMB = 'Screen'

TABLES

DYNPFIELDS = DYNPFIELDS

EXCEPTIONS

OTHERS = 0.

Regards,

Fernando