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 screen validation...!

Former Member
0 Likes
1,082

Hi I have one Check box on the selection screen and two parameters

Like PC_File is checkbox

File1 parameter

File2 parameter

When I select PC_file check box file1 should enable file 2 should disable, when PC_File not selected file2 should enable and file1 should disable.

Kindly let me know hw to write the code.

Akshitha.

11 REPLIES 11
Read only

Former Member
0 Likes
1,057

Hi,

<b>Declare PC_file in the program</b> so that value will be available to u .

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'File1' AND PC_file <> 'X'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

IF SCREEN-GROUP1 = 'File2' AND PC_file = 'X'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

Regards,

Ranjit Thakur.

<b>Please Mark The Helpful Answer.</b>

Read only

0 Likes
1,057

Hi,

give a user-command to the checkbox and LOOP AT SCREEN in event AT SELECTION-SCREEN OUTPUT to manipulate active/input/output fields with values 0/1 to make then active or inactive.

something like ..

IF p_checkbx IS INITIAL.

LOOP AT SCREEN.

IF screen-name EQ 'FIELD1' OR

screen-name EQ 'FIELD2' OR

screen-name EQ 'FIELD3' OR

screen-name EQ 'FIELD14'.

screen-active = 1.

screen-input = 0.

screen-output = 1.

MODIFY screen.

ENDIF.

ENDLOOP.

ENDIF.

Hope this helps.

Regards,

Prabhu

Read only

Former Member
0 Likes
1,057

Hi,

Please follow the following steps

in At selection screen of the check box

Use loop at scree

Make the file parameter to invisible.

Based on the check box selection

Reward if helpful.

Regards,

Umasankar.

Read only

Former Member
0 Likes
1,057

Hello,

USe this code.



SELECTION-SCREEN BEGIN OF BLOCK BLCK1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN MODIF ID RD1,
                S_ANFNR FOR EKPO-ANFNR MODIF ID RD2,
                S_EKORG FOR EKKO-EKORG.
SELECTION-SCREEN SKIP.
PARAMETERS: P_PO  RADIOBUTTON GROUP RAD1 USER-COMMAND USR DEFAULT 'X',
            P_RFQ RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK BLCK1.

AT SELECTION-SCREEN OUTPUT.

  IF P_PO = 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'RD2'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'RD1'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

REgards,

Vasanth

Read only

0 Likes
1,057

No Its not working.

Initially when i execute the program file1 should be disable, when i select the check box then file1 shoud enable and file2 should disable, let me know the code pls....!

Hi I have one Check box on the selection screen and two parameters

Like PC_File is checkbox

File1 parameter

File2 parameter

When I select PC_file check box file1 should enable file 2 should disable, when PC_File not selected file2 should enable and file1 should disable.

Kindly let me know hw to write the code.

Akshitha.

Read only

Former Member
0 Likes
1,057

AT selection-screen output.

loop at screen.

if screen-group1 = 'FL1'.

if pc_file = 'X'.

screen-input = '1'.

else.

screen-input = '0'.

endif.

elseif screen-group1 = 'FL2'.

if pc_file ne 'X'.

screen-input = '1'.

else.

screen-input = '0'.

endif.

endif.

modify screen.

endloop.

FL1 & FL2 are modif id of paramters file1, file2.

Read only

0 Likes
1,057

No Its not working.

Initially when i execute the program file1 should be disable, when i select the check box then file1 shoud enable and file2 should disable, let me know the code pls....!

Hi I have one Check box on the selection screen and two parameters

Like PC_File is checkbox

File1 parameter

File2 parameter

When I select PC_file check box file1 should enable file 2 should disable, when PC_File not selected file2 should enable and file1 should disable.

Kindly let me know hw to write the code.

Akshitha.

Read only

Former Member
0 Likes
1,057

Hi ,

Try this n develop ur logic

parameters: p_check4 radiobutton group GR user-command ucom ,

p_check1 radiobutton group GR default 'X' modif id ABC,

p_check2 radiobutton group GR modif id BCD,

p_check3 radiobutton group GR modif id CDE.

parameters: p_value like mara-matnr.

at selection-screen output. (this event got fired before selection screen is displayed

if not p_check1 is initial.

loop at screen.

if screen-group1 <> 'ABC' and screen-group1 <> ' '.

screen-input = '0'.

modify screen.

endif.

endloop.

endif.

at selection-screen. (this is like PAI, after selection screen and chosing some values)

if p_check1 is initial.

loop at screen.

if screen-group1 <> 'ABC'.

screen-input = '1'.

modify screen.

endif.

endloop.

endif.

reward if helpful

ravi

Read only

Former Member
0 Likes
1,057

Hi,

Use like similar

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

CHECK SCREEN-GROUP1 = 'XYZ'.

SCREEN-VISIBLE = '1'.

MODIFY SCREEN.

ENDLOOP.

Regards,

Nandha

Reward if it solves u r problem

Read only

Former Member
0 Likes
1,057

*TABLES: EKKO,EKPO.

*

*

*PARAMETERS CHECK AS CHECKBOX USER-COMMAND CHECK." DEFAULT 'X'.

*SELECT-OPTIONS: p_file type rasomething MODIF ID RD1,

  • q_file type rs_something MODIF ID RD2,

  • *

*AT SELECTION-SCREEN OUTPUT.

  • IF CHECK = 'X'.

  • IF SCREEN-GROUP1 = 'RD1'.

  • SCREEN-ACTIVE = 0.

  • MODIFY SCREEN.

  • ENDIF.

*endloop

  • ELSE.

  • LOOP AT SCREEN.

  • IF SCREEN-GROUP1 = 'RD2'.

  • SCREEN-ACTIVE = 1.

  • MODIFY SCREEN.

  • ENDIF.

  • ENDLOOP.

*

  • ENDIF.

the above code shud help u

Regards.

Aparna

Read only

Former Member
0 Likes
1,057

hi,

try this:

PARAMETERS: P1 DEFAULT 'X' RADIOBUTTON GROUP PR1 USER-COMMAND SELECT.

PARAMETERS: P2 RADIOBUTTON GROUP PR1.

PARAMETERS: VAL1(10) MODIF ID DI1.

PARAMETERS: VAL2(10) MODIF ID DI2.

*

AT SELECTION-SCREEN OUTPUT.

*

IF P1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 EQ 'DI1'.

SCREEN-INPUT = '1'.

MODIFY SCREEN.

CLEAR: VAL2.

ENDIF.

IF SCREEN-GROUP1 EQ 'DI2'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

*

IF P2 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 EQ 'DI1'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

CLEAR: VAL1.

ENDIF.

IF SCREEN-GROUP1 EQ 'DI2'.

SCREEN-INPUT = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

*

Regards, Dieter