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: 

dynamic text changes in selection screen

Former Member
0 Kudos

i want to change the title of block into a selection screen after clicking radio button .the changes will be done dynamically.

2 REPLIES 2

Former Member
0 Kudos

Hi Pravik,

try this code:

selection-screen : begin of block b1 with frame title text-034.

selection-screen begin of line.
parameter : r_mas_dl radiobutton group r user-command btn default 'X'.
selection-screen comment 3(50) text-060.
selection-screen end of line.

selection-screen begin of line.
parameter:  r_new_dl radiobutton group r.
selection-screen comment 3(50) text-058.
selection-screen end of line.

selection-screen begin of line.
parameter: r_chn_d1 radiobutton group r.
selection-screen comment 3(50) text-059.
selection-screen end of line.

selection-screen skip 3.
parameter p_file  type rlgrap-filename modif id a.
select-options: s_sernr for risa0-sernr modif id b no-extension no intervals.
selection-screen : end of block b1 .


at selection-screen output.

  if r_mas_dl = c_x.                                      " For the first Radio button 
    set titlebar 'MAS' with text-041. " Header Text1.
    loop at screen.
      if screen-group1 = c_a.
*        CLEAR p_file.
        if screen-name = text-052. "'P_FILE'.
          screen-invisible = 0.
          screen-input = 1.
        endif.
      endif.

      if screen-group1 = c_b.
        screen-invisible = 1.
        screen-input = 0.
      endif.

      if screen-group1 = c_c.
        screen-invisible = 1.
        screen-input = 0.
      endif.

      modify screen.
    endloop.

  elseif r_new_dl = c_x.                             " For the second radio button
    clear p_file.
    set titlebar 'SIN' with text-058. " Header Text2
    loop at screen.
      if screen-group1 = c_a.
        clear s_sernr.
        screen-input = 0.
        screen-invisible = 1.
      endif.
      if screen-group1 = c_b.
        screen-input = 1.
        screen-invisible = 0.
      endif.

      if screen-group1 = c_c.
        screen-invisible = 1.
        screen-input = 0.
      endif.

      modify screen.
    endloop.

  elseif r_chn_d1 = c_x.                               " For the third radion button.
    clear p_file.
    set titlebar 'CHG' with text-059. " Header Text3.
    loop at screen.
      if screen-group1 = c_a.
        clear s_sernr.
        screen-input = 0.
        screen-invisible = 1.
      endif.
      if screen-group1 = c_b.
        screen-input = 0.
        screen-invisible = 1.
      endif.

      if screen-group1 = c_c.
        screen-invisible = 0.
        screen-input = 1.
      endif.

      modify screen.
    endloop.
  endif.

hope it helps.

Former Member
0 Kudos

hi pravik ....u just copy this code and get relaxed....

selection-screen begin of block b0 with frame-title abcd .

parameters:r1 radiobutton group rd1 default 'x' user-command abc,

r2 radiobutton group rd1.

selection-screen end of block b0.

at selection-screen output.

if r1 = 'x' .

move 'sales' to abcd.

elseif r2 = 'x' .

move 'delivery' to abcd.

endif.