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 Parameter Activation

Former Member
0 Likes
755

Hi Friends,

I have requirement where on selection screen.

Check box I1I

Parameter : A

Check box : I2I

Parameter : B

If check box I1I is clicked the parameter B should be disabled & when check box I2I is clicked parameter A should be disabled.

I promise to reward.

Anu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
735

Hi

Check this code...

"RADIO BUTTON for report display & DOWNload & FOR Both

selection-screen begin of block b1 with frame .

parameters: p_down radiobutton group rad2 user-command ab,

p_report radiobutton group rad2,

p_dw_rp radiobutton group rad2 .

selection-screen end of block b1.

"FILE PATH

selection-screen begin of block b2 with frame .

parameters: p_path(128) type c modif id pth default '.\gaurav'.

selection-screen end of block b2.

at selection-screen output.

if p_report = 'X'.

loop at screen.

if screen-group1 = 'PTH'.

screen-active = 0.

screen-input = 0.

screen-invisible = 1.

screen-required = 0.

modify screen.

clear screen.

endif.

endloop.

elseif p_down = 'X' or p_dw_rp = 'X'.

loop at screen.

if screen-group1 = 'PTH'.

screen-active = 1.

screen-input = 1.

screen-output = 1.

screen-invisible = 0.

*screen-required = 1.

modify screen.

clear screen.

endif.

endloop.

endif.

at selection-screen on value-request for p_path.

call function 'F4_FILENAME'

exporting

program_name = syst-cprog

dynpro_number = syst-dynnr

field_name = ' '

importing

file_name = p_path.

at selection-screen.

*val....1 Variant check

  • Once the user has entered variant, check about its existence

*val....2 Sd do not exists

*val.....3 Date of creation check

*VAL....4 If download is checked than file path should be there...

if p_down = 'X' and p_path is initial.

message e011 with text-011. "No file PATH

endif.

if p_dw_rp = 'X' and p_path is initial.

message e011 with text-011. ""No file PATH

endif.

REWARD IF HELPFUL...

Gaurav Juneja.

Edited by: Gaurav Juneja on Mar 3, 2008 1:44 PM

6 REPLIES 6
Read only

Former Member
0 Likes
735

hi,

The sample code is,

at selection-screen output.

loop at screen.

if c1 = 'X'.

if p_r1 is initial.

screen-active = 1.

else.

screen-active = 0.

endif.

endif

if c2 = 'X'.

if p_r1 is initial.

screen-active = 1.

else.

screen-active = 0.

endif.

endif.

modify screen.

endloop.

Where,

C1 and C2 are check box.

P_r1,p_r2 are the parameters

Hope this helps,

Regards,

Arunsri

Edited by: Arunsri on Mar 3, 2008 1:29 PM

Edited by: Arunsri on Mar 3, 2008 1:31 PM

Read only

JozsefSzikszai
Active Contributor
0 Likes
735

hi,

PARAMETERS : p_cb1 AS CHECKBOX USER-COMMAND uc01,

p_a TYPE i MODIF ID 001,

p_cb2 AS CHECKBOX USER-COMMAND uc01,

p_b TYPE i MODIF ID 002.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 EQ '002'.

IF p_cb1 IS INITIAL.

screen-active = '0'.

ELSE.

screen-active = '1'.

ENDIF.

ENDIF.

IF screen-group1 EQ '001'.

IF p_cb2 IS INITIAL.

screen-active = '0'.

ELSE.

screen-active = '1'.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

hope this helps

ec

Read only

Former Member
0 Likes
735

PARAMETERS : p_cb1 AS CHECKBOX USER-COMMAND uc01,

p_a TYPE i MODIF ID a1,

p_cb2 AS CHECKBOX USER-COMMAND uc01,

p_b TYPE i MODIF ID b1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 EQ 'B1'.

IF p_cb1 IS INITIAL.

  • screen-input = '0'. *

ELSE.

  • screen-input = '1'. *

ENDIF.

ENDIF.

IF screen-group1 EQ 'A1'.

IF p_cb2 IS INITIAL.

screen-input = '0'.

ELSE.

screen-input = '1'.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

awrd points if useful

Bhupal

Read only

dhruv_shah3
Active Contributor
0 Likes
735

Hi,

For achiving this you have to use

LOOP AT Screen.

if chkbx1 EQ = 'X'.

screen-name='param2'.

screen-visible = 1

elseif chkbx2 EQ = 'X'.

screen-name='param2'.

screen-visible = 1.

endif.

modify screen.

end loop.

HTH

Regards,

Dhruv Shah

Read only

Former Member
0 Likes
736

Hi

Check this code...

"RADIO BUTTON for report display & DOWNload & FOR Both

selection-screen begin of block b1 with frame .

parameters: p_down radiobutton group rad2 user-command ab,

p_report radiobutton group rad2,

p_dw_rp radiobutton group rad2 .

selection-screen end of block b1.

"FILE PATH

selection-screen begin of block b2 with frame .

parameters: p_path(128) type c modif id pth default '.\gaurav'.

selection-screen end of block b2.

at selection-screen output.

if p_report = 'X'.

loop at screen.

if screen-group1 = 'PTH'.

screen-active = 0.

screen-input = 0.

screen-invisible = 1.

screen-required = 0.

modify screen.

clear screen.

endif.

endloop.

elseif p_down = 'X' or p_dw_rp = 'X'.

loop at screen.

if screen-group1 = 'PTH'.

screen-active = 1.

screen-input = 1.

screen-output = 1.

screen-invisible = 0.

*screen-required = 1.

modify screen.

clear screen.

endif.

endloop.

endif.

at selection-screen on value-request for p_path.

call function 'F4_FILENAME'

exporting

program_name = syst-cprog

dynpro_number = syst-dynnr

field_name = ' '

importing

file_name = p_path.

at selection-screen.

*val....1 Variant check

  • Once the user has entered variant, check about its existence

*val....2 Sd do not exists

*val.....3 Date of creation check

*VAL....4 If download is checked than file path should be there...

if p_down = 'X' and p_path is initial.

message e011 with text-011. "No file PATH

endif.

if p_dw_rp = 'X' and p_path is initial.

message e011 with text-011. ""No file PATH

endif.

REWARD IF HELPFUL...

Gaurav Juneja.

Edited by: Gaurav Juneja on Mar 3, 2008 1:44 PM

Read only

Former Member
0 Likes
735

Hi,

You can use radio button instead of checkboxes.

Please refer the below code :


TABLES : bsis.


SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETER : sp_sel radiobutton group rad USER-COMMAND radio DEFAULT 'X',
            sp_all RADIOBUTTON GROUP rad.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS : so_bukrs FOR bsis-bukrs MODIF ID sp1.
SELECT-OPTIONS : so_hkont FOR bsis-hkont MODIF ID sp2.
SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.
  IF sp_sel = 'X'.


      IF screen-group1 = 'SP2'.
        screen-input = '0'.
        screen-invisible = '0'.
        screen-required = '0'.
        MODIFY SCREEN.
      ENDIF.
      else.
      IF screen-group1 = 'SP1'.
        screen-input = '0'.
        screen-invisible = '0'.
        screen-required = '0'.
        MODIFY SCREEN.
      ENDIF.
    endif.
    ENDLOOP.

Thanks,

Sriram Ponna.