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
452

Hi,

parameters: p_r1 radiobutton group grp1 user-command us default 'X',

p_r1 radiobutton group grp1.

selection-screen begin of block b1 with frame.

parameters: p_mat type mara-matnr MODIF ID id1,

p_ven type lfa1-lifnr MODIF ID id2

.

selection-screen end of block b1.

at selection ouput.

loop at screen.

if p_r1 = 'X'.

IF screen-group1 = 'ID1'.

screen-active = 1.

endif.

elseif p_r2 = 'X'.

IF screen-group1 = 'ID2'.

screen-active = 0.

endif.

endif.

endloop.

if p_mat is not initial.

message e000 with 'mat is required'.

endif.

In the above code after selecting of radiobutton p_r1 i need to display the one selection-screen should be active and after entering of that selection-screen and i need to the validation on that parameter. how do it.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 27, 2008 3:31 PM

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
431

Try something like

TABLES sscrfields.

PARAMETERS: p_r1 RADIOBUTTON GROUP grp1 USER-COMMAND us DEFAULT 'X',
            p_r2 RADIOBUTTON GROUP grp1.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

PARAMETERS: p_mat TYPE mara-matnr MODIF ID id1,
            p_ven TYPE lfa1-lifnr MODIF ID id2
.
SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    CASE screen-group1.
      WHEN 'ID1'.
        IF p_r1 = 'X'.
          screen-active = 1.
        ELSE.
          screen-active = 0.
        ENDIF.
      WHEN 'ID2'.
        IF p_r2 = 'X'.
          screen-active = 1.
        ELSE.
          screen-active = 0.
        ENDIF.
    ENDCASE.
    MODIFY SCREEN.
  ENDLOOP.

AT SELECTION-SCREEN ON p_mat.

  CHECK sscrfields-ucomm NE 'US'.
  IF p_mat IS INITIAL.
    MESSAGE e000 WITH 'mat is required'.
  ENDIF.

START-OF-SELECTION.

Regards

1 REPLY 1
Read only

RaymondGiuseppi
Active Contributor
0 Likes
432

Try something like

TABLES sscrfields.

PARAMETERS: p_r1 RADIOBUTTON GROUP grp1 USER-COMMAND us DEFAULT 'X',
            p_r2 RADIOBUTTON GROUP grp1.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

PARAMETERS: p_mat TYPE mara-matnr MODIF ID id1,
            p_ven TYPE lfa1-lifnr MODIF ID id2
.
SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    CASE screen-group1.
      WHEN 'ID1'.
        IF p_r1 = 'X'.
          screen-active = 1.
        ELSE.
          screen-active = 0.
        ENDIF.
      WHEN 'ID2'.
        IF p_r2 = 'X'.
          screen-active = 1.
        ELSE.
          screen-active = 0.
        ENDIF.
    ENDCASE.
    MODIFY SCREEN.
  ENDLOOP.

AT SELECTION-SCREEN ON p_mat.

  CHECK sscrfields-ucomm NE 'US'.
  IF p_mat IS INITIAL.
    MESSAGE e000 WITH 'mat is required'.
  ENDIF.

START-OF-SELECTION.

Regards