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

at screen output

Former Member
0 Likes
570

i have at screen-selection output

i have 3 select-options:s1,s2,s3

i have 3 redio buttons :r1,r2,r3.

when i select r1 then s1 should be visible

when i select r2 then s1 and s2 should be visible.

when i select r3 then s1 s2 s3 shoudl be visible

and also

i should perform required field validations for s1 s2 and s3

i have written code for all but problem is

when i click radio button then required field validation is getting activated so

i need to know where to put which block of code.

MOderator Message: These forums are not an alternative for proper classroom training.

Edited by: kishan P on Dec 5, 2010 3:52 PM

i have at screen-selection output

i have 3 select-options:s1,s2,s3

i have 3 redio buttons :r1,r2,r3.

when i select r1 then s1 should be visible

when i select r2 then s1 and s2 should be visible.

when i select r3 then s1 s2 s3 shoudl be visible

and also

i should perform required field validations for s1 s2 and s3

i have written code for all but problem is

when i click radio button then required field validation is getting activated so

i need to know where to put which block of code.

MOderator Message: These forums are not an alternative for proper classroom training.

Edited by: kishan P on Dec 5, 2010 3:52 PM

4 REPLIES 4
Read only

Former Member
0 Likes
531

Hi

The validations have to be placed in AT SELECTION-SCREEN event, the screen modifications AT SELECTION-SCREEN OUTPUT

AT SELECTION-SCREEN is triggered before than AT SELECTION-SCREEN OUTPUT so your validations have to be called only if the corrisponding radiobutton is checked

Max

Read only

awin_prabhu
Active Contributor
0 Likes
531

Hi Syed,

Do validation in event AT SELECTION-SCREEN ON


PARAMETERS: p_city RADIOBUTTON GROUP gr1 USER-COMMAND u1,
            p_city1 TYPE string MODIF ID g1,
            p_state RADIOBUTTON GROUP gr1 DEFAULT 'X',
            p_state1 TYPE string MODIF ID g2.

AT SELECTION-SCREEN ON p_city1.
  IF p_city ='X'.
    MESSAGE 'CITY is clicked' TYPE 'I'.
  ENDIF.

AT SELECTION-SCREEN ON p_state1.
  IF p_state = 'X'.
    MESSAGE 'STATE is clicked' TYPE 'I'.
  ENDIF.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF p_city = ''.
      IF screen-group1 = 'G1'. 
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
    IF p_state = ''.
      IF screen-group1 = 'G2'. 
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
  ENDLOOP.

Read only

Former Member
0 Likes
531

Hi Syed,

Do the following things

1) Remove "OBLIGATORY" from selection screen decleration.

2) In "AT SELECTION-SCREEN" event put your Validations as :


*&---------------------------------------------------------------------*
*&                   AT SELECTION SCREEN                               *
*&---------------------------------------------------------------------*

AT SELECTION-SCREEN.

  CASE SY-UCOMM.

    WHEN 'ONLI'.
"Put your Mandatory/Obligatory validations here,like :

IF S_MATNR[] IS INITIAL.

MESSAGE E000(z123)  WITH 'Please fill Material No'.

ENDIF.

ENDCASE.

3) To make Input/Display mode, use "LOOP AT SCREEN" in "AT SELECTION-SCREEN OUTPUT" event in write the code. The following is the example code :



    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'SC1' OR SCREEN-GROUP1 = 'SC4'.
        SCREEN-INPUT = 1.
        MODIFY SCREEN.
        CONTINUE.
      ELSEIF SCREEN-GROUP1 = 'SC2'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
        CONTINUE.
      ENDIF.
    ENDLOOP.

Thanks & Regards,

Faheem.

Read only

Former Member
0 Likes
531

Use the following code :-

SELECTION-SCREEN: BEGIN OF BLOCK B1.

SELECT-OPTIONS: S1 FOR VBAK-VBELN,

S2 FOR VBAK-ERDAT,

S3 FOR VBAK-AUART.

PARAMETERS: P1 RADIOBUTTON GROUP RAD DEFAULT 'X' USER-COMMAND U1,

P2 RADIOBUTTON GROUP RAD,

P3 RADIOBUTTON GROUP RAD.

SELECTION-SCREEN: END OF BLOCK B1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF P1 = 'X'.

IF SCREEN-NAME = 'S1-LOW' OR SCREEN-NAME = 'S1-HIGH'.

SCREEN-ACTIVE = 1.

MODIFY SCREEN.

ELSEIF SCREEN-NAME = 'S2-LOW' OR SCREEN-NAME = 'S2-HIGH'

OR SCREEN-NAME = 'S3-LOW' OR SCREEN-NAME = 'S3-HIGH'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ELSEIF P2 = 'X'.

IF SCREEN-NAME = 'S1-LOW' OR SCREEN-NAME = 'S1-HIGH'

OR SCREEN-NAME = 'S2-LOW' OR SCREEN-NAME = 'S2-HIGH'.

SCREEN-ACTIVE = 1.

MODIFY SCREEN.

ELSEIF SCREEN-NAME = 'S3-LOW' OR SCREEN-NAME = 'S3-HIGH'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ELSEIF P3 = 'X'.

IF SCREEN-NAME = 'S1-LOW' OR SCREEN-NAME = 'S1-HIGH'

OR SCREEN-NAME = 'S2-LOW' OR SCREEN-NAME = 'S2-HIGH'

OR SCREEN-NAME = 'S3-LOW' OR SCREEN-NAME = 'S3-HIGH'.

SCREEN-ACTIVE = 1.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.