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: 

selection screen

Former Member
0 Kudos

Hi all,

in my selection screen i have like below.

Parameters:P_EBELN type EBELN,

P_EBELP type EBELP.

now my requirement is, when i selected first select option(P_EBELN) the second select option(P_EBELP) should be invisible and vise versa. i don't have selection screen block. i can i do it. tell me with example.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You could try something like this. By blanking out the visible parameter, the invisible one will reappear.


REPORT  ztestjrg.

PARAMETERS: p_ebeln TYPE ebeln MODIF ID p1,
            p_ebelp TYPE ebelp MODIF ID p2.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    CASE screen-group1.
      WHEN 'P1'.
        IF p_ebelp IS NOT INITIAL AND p_ebeln IS INITIAL.
          screen-active = 0.
        ELSE.
          screen-active = 1.
        ENDIF.
        MODIFY SCREEN.
      WHEN 'P2'.
        IF p_ebeln IS NOT INITIAL AND p_ebelp IS INITIAL.
          screen-active = 0.
        ELSE.
          screen-active = 1.
        ENDIF.
        MODIFY SCREEN.
    ENDCASE.
  ENDLOOP.

Best Regards,

Jamie

Edited by: James Gaddis on Oct 8, 2008 10:41 AM -- added code to prevent BOTH parameters from being invisible in case both have values entered.

2 REPLIES 2

Former Member
0 Kudos

Hi,

You could try something like this. By blanking out the visible parameter, the invisible one will reappear.


REPORT  ztestjrg.

PARAMETERS: p_ebeln TYPE ebeln MODIF ID p1,
            p_ebelp TYPE ebelp MODIF ID p2.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    CASE screen-group1.
      WHEN 'P1'.
        IF p_ebelp IS NOT INITIAL AND p_ebeln IS INITIAL.
          screen-active = 0.
        ELSE.
          screen-active = 1.
        ENDIF.
        MODIFY SCREEN.
      WHEN 'P2'.
        IF p_ebeln IS NOT INITIAL AND p_ebelp IS INITIAL.
          screen-active = 0.
        ELSE.
          screen-active = 1.
        ENDIF.
        MODIFY SCREEN.
    ENDCASE.
  ENDLOOP.

Best Regards,

Jamie

Edited by: James Gaddis on Oct 8, 2008 10:41 AM -- added code to prevent BOTH parameters from being invisible in case both have values entered.

Former Member
0 Kudos

This is similar to James' but demonstrates how you can control via radio button (or checkbox)


REPORT  ZTEST                                                    .

parameters: p_chk_aa radiobutton group g1 default 'X' user-command dum,
            p_ebeln type ebeln modif id aa,
            p_chk_bb radiobutton group g1,
            p_ebelp type ebelp modif id bb.

****************
at selection-screen output.

  perform screen_adjust.

****************
form screen_adjust.

  loop at screen.
    case screen-group1.
    when 'AA'.
      if p_chk_aa is initial.
        screen-active = 0.
      else.
        screen-active = 1.
      endif.
      modify screen.

    when 'BB'.
      if p_chk_bb is initial.
        screen-active = 0.
      else.
        screen-active = 1.
      endif.
      modify screen.
    endcase.
  endloop.

endform.