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

Selection Screens

Former Member
0 Likes
605

I have a requirement like this I have two fields in selection screen if i enter the value in one field the other field should automatically be disabled. Please let me know how to do this.

1 ACCEPTED SOLUTION
Read only

RoySayak
Active Participant
0 Likes
586

Hi Manu,

Here is your complete concept with code...Enjoy...

>>

REPORT ZTEST.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: P1(10) TYPE N MODIF ID SC1,

P2(10) TYPE N.

SELECTION-SCREEN END OF BLOCK B1.

DATA: FLG(1) TYPE C.

INITIALIZATION.

P1 = '10'.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P1'.

IF FLG <> 'X'.

SCREEN-INPUT = 0.

ELSE.

SCREEN-INPUT = 1.

ENDIF.

ENDIF.

IF SCREEN-NAME = 'P2'.

IF FLG = 'X'.

SCREEN-INPUT = 0.

ELSE.

SCREEN-INPUT = 1.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

AT SELECTION-SCREEN ON P2.

IF P2 > 10.

FLG = 'X'.

ENDIF.

***************************************************************************reward me full points*********************

THANKS,

SAYAK..

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
586

Search the forum for something like "LOOP AT SCREEN" or "SCREEN-ACTIVE".

Regards,

Rich Heilman

Read only

former_member156446
Active Contributor
0 Likes
586

Hi Manu

check this ...... you need to add modif id to the parameters which you want to play.. search in forum.. u will get more info..

IF pa_equip <> 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'I1'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

IF pa_logic <> 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'I2'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Read only

Former Member
0 Likes
586

Hi Manu,

If you use a Report program, Perform validations in

AT SELECTION-SCREEN event.

Assign a Modification group to the parameters using this syntax.

parameters: p_ccode type t001-bukrs modif id 'CCO'.

now in the At Selection-Screen,

Do loop at screen and search for the Modif Id.

Here is the pseudo code.

Loop at SCREEN.

if SCREEN-GROUP1 = 'CCO'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

else.

SCREEN-ACTIVE = 1.

endif.

EndLoop.

Try this and Reward if useful

Read only

RoySayak
Active Participant
0 Likes
587

Hi Manu,

Here is your complete concept with code...Enjoy...

>>

REPORT ZTEST.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: P1(10) TYPE N MODIF ID SC1,

P2(10) TYPE N.

SELECTION-SCREEN END OF BLOCK B1.

DATA: FLG(1) TYPE C.

INITIALIZATION.

P1 = '10'.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P1'.

IF FLG <> 'X'.

SCREEN-INPUT = 0.

ELSE.

SCREEN-INPUT = 1.

ENDIF.

ENDIF.

IF SCREEN-NAME = 'P2'.

IF FLG = 'X'.

SCREEN-INPUT = 0.

ELSE.

SCREEN-INPUT = 1.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

AT SELECTION-SCREEN ON P2.

IF P2 > 10.

FLG = 'X'.

ENDIF.

***************************************************************************reward me full points*********************

THANKS,

SAYAK..

Read only

Former Member
0 Likes
586

Hi

Hope this will help you.

reward if help.

REPORT zextest595 .

*--- Radiobuttons

PARAMETERS: p_up RADIOBUTTON GROUP a DEFAULT 'X' USER-COMMAND rb,

p_list RADIOBUTTON GROUP a.

PARAMETERS: p_pcfile LIKE rlgrap-filename OBLIGATORY DEFAULT 'C:\'

MODIF ID ccc,

p_pctype LIKE rlgrap-filetype OBLIGATORY DEFAULT 'ASC'

MODIF ID ccc,

p_unix LIKE rlgrap-filename OBLIGATORY DEFAULT '.\'

MODIF ID ccc.

PARAMETERS: p_dir LIKE rlgrap-filename OBLIGATORY DEFAULT '.'

MODIF ID ddd,

p_fp LIKE rlgrap-filename

MODIF ID ddd.

*----


  • AT SELECTION-SCREEN

*----


AT SELECTION-SCREEN OUTPUT.

IF p_up = 'X' .

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'CCC'.

screen-input = 1. "Enable

screen-invisible = 0. "Disable

MODIFY SCREEN.

WHEN 'DDD'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.

IF p_list = 'X'.

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'CCC'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

WHEN 'DDD'.

screen-input = 1.

screen-invisible = 0.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.