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

can any one help

take 2 fields plant and material

if plant is give 1000 then only material field must be visible else no material field must present on the screen it must be hide

1 ACCEPTED SOLUTION

JozsefSzikszai
Active Contributor
0 Kudos

do you mean that you want to hide a field, depending on its own value? what will be the way back, i.e. unhide it again?

9 REPLIES 9

Former Member
0 Kudos

Hi,

Note: After entering the plant value press <b>"ENTER"</b>

then only material number field is visible.

Use the below code.

parameters: p_plant(10) type c,

p_matnr like mara-matnr modif id ABC.

at selection-screen output.

loop at screen.

if screen-group1 = 'ABC'.

if not p_plant is initial.

screen-active = 1.

else.

screen-active = 0.

endif.

endif.

modify screen.

endloop.

0 Kudos

hi thanks for the reply

but i need if plant value is 1000 then only material field must be visible and need to accept the material value else material field must not be visible

0 Kudos

Hi,

Now check with the below code.

<b>Note : when you clear the plant number once again press enter it will be dissapered.</b>

at selection-screen output.

loop at screen.

if screen-group1 = 'ABC'.

if not p_plant is initial <b>and</b>

<b>p_plant = 1000</b>.

screen-active = 1.

else.

screen-active = 0.

endif.

endif.

modify screen.

endloop.

JozsefSzikszai
Active Contributor
0 Kudos

do you mean that you want to hide a field, depending on its own value? what will be the way back, i.e. unhide it again?

0 Kudos

Hi Eric,

Once you clear the Plant and press enter then the material number field will be disappered.

0 Kudos

hi eric

thanks for responding

intially the 2 fields must be present on the screen

if u enter plant value as 1000and click enter then only material field is visible to enter the material field

unless plant value is other than 1000 then material field must not be visible

0 Kudos

Hi,

<b>Note: for that case you would have mentioned enable or disable of the field not visible or invisible.</b>

If that is the case

use this way

parameters: p_plant(4) type c,

p_matnr like mara-matnr modif id ABC.

at selection-screen output.

loop at screen.

if screen-group1 = 'ABC'.

if not p_plant is initial and

p_plant = '1000'.

screen-input = 1.

else.

screen-input = 0.

endif.

endif.

modify screen.

endloop.

Former Member
0 Kudos

check below code...

----


  • S E L E C T I O N S C R E E N

----


SELECTION-SCREEN BEGIN OF BLOCK FILE WITH FRAME TITLE TEXT-000.

SELECTION-SCREEN : BEGIN OF LINE.

PARAMETERS: RB_APPN RADIOBUTTON GROUP RAD1 DEFAULT 'X' USER-COMMAND RAD.

SELECTION-SCREEN COMMENT 3(25) TEXT-030.

PARAMETERS: RB_PRTN RADIOBUTTON GROUP RAD1.

SELECTION-SCREEN COMMENT 32(20) TEXT-031.

SELECTION-SCREEN : END OF LINE.

PARAMETERS : P_LPATH TYPE FILEPATH-PATHINTERN MODIF ID Z1,

P_FILE TYPE RLGRAP-FILENAME OBLIGATORY.

PARAMETERS : P_SUBGRP TYPE RLGRAP-FILENAME,

P_INVEN TYPE RLGRAP-FILENAME,

P_SALES TYPE RLGRAP-FILENAME.

SELECTION-SCREEN END OF BLOCK FILE.

SELECTION-SCREEN BEGIN OF BLOCK FILE1 WITH FRAME TITLE TEXT-032.

SELECT-OPTIONS:

S_WERKS FOR T001W-WERKS OBLIGATORY DEFAULT 5210,

S_SPART FOR MARA-SPART,

S_MATNR FOR MARA-MATNR.

SELECTION-SCREEN END OF BLOCK FILE1.

----


  • A T S E L E C T I O N - S C R E E N O U T P U T

----


AT SELECTION-SCREEN OUTPUT.

PERFORM F_MODIFY_SCREEN.

----


  • A T S E L E C T I O N S C R E E N

----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

PERFORM VALIDATE_FILE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SUBGRP.

IF RB_PRTN = 'X'.

PERFORM GET_LOCAL_FILE_NAME USING P_SUBGRP .

ELSEIF RB_APPN = 'X'.

MESSAGE I000 WITH

'No F4 help for files on Application Server.'(033).

ENDIF.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INVEN.

IF RB_PRTN = 'X'.

PERFORM GET_LOCAL_FILE_NAME USING P_INVEN .

ELSEIF RB_APPN = 'X'.

MESSAGE I000 WITH

'No F4 help for files on Application Server.'(033).

ENDIF.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SALES.

IF RB_PRTN = 'X'.

PERFORM GET_LOCAL_FILE_NAME USING P_SALES .

ELSEIF RB_APPN = 'X'.

MESSAGE I000 WITH

'No F4 help for files on Application Server.'(033).

ENDIF.

&----


*& Form F_MODIFY_SCREEN

&----


  • text

----


FORM F_MODIFY_SCREEN .

*-- For Output Options

IF RB_PRTN = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'Z1' .

SCREEN-INVISIBLE = 1.

SCREEN-ACTIVE = 0.

ELSE.

SCREEN-INVISIBLE = 0.

SCREEN-ACTIVE = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

ENDFORM. " F_MODIFY_SCREEN

Former Member
0 Kudos

Hi

hi

use this

DATA : BEGIN OF IT_PLANT OCCURS 0,

MATNR LIKE MARA-MATNR,

WERKS LIKE MARC-WERKS,

PSTAT LIKE MARC-PSTAT,

EKGRP LIKE MARC-EKGRP,

END OF IT_PLANT.

DATA : BEGIN OF IT_PONO OCCURS 0,

EBELN LIKE EKKO-EBELN,

EBELP LIKE EKPO-EBELP,

MATNR LIKE EKPO-MATNR,

WERKS LIKE EKPO-WERKS,

LGORT LIKE EKPO-LGORT,

END OF IT_PONO.

TABLES EKKO.

********END OF DATA DECLARATIONS*********

********SELECTION SCREEN DESIGN ***********

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

PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.

SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.

SELECTION-SCREEN END OF BLOCK B1.

******END OF SELECTION SCREEN DESIGN****************

***********SCREEN MODIFICATIONS*******************

AT SELECTION-SCREEN OUTPUT .

LOOP AT SCREEN .

IFSCREEN-GROUP1 EQ 'S2'.

SCREEN-INPUT = 0.

SCREEN-REQUIRED = 1.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 EQ 'S1'.

SCREEN-INPUT = 0.

SCREEN-REQUIRED = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

the changes will be applicable if you do any actioc on the screen like pressing enter

<b>Reward if usefull</b>