2010 Feb 24 7:55 AM
Hi,
I have 2 selection screen as follows:
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-002.
PARAMETERS: pfile1 TYPE string OBLIGATORY DEFAULT text-003,
pfile2 TYPE string OBLIGATORY DEFAULT text-003,
pfile3 TYPE string OBLIGATORY DEFAULT text-003.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-019.
PARAMETERS:p_upld TYPE char1 AS CHECKBOX,
pfile TYPE string OBLIGATORY DEFAULT text-003.
SELECTION-SCREEN END OF BLOCK b4.
Now when p_upld is 'X' I want to disable entire BLOCK b3 ...how to do it...
I am trying as follows...not working:
IF p_upld IS NOT INITIAL.
LOOP AT SCREEN.
IF SCREEN-NAME = 'PFILE1'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
LOOP AT SCREEN.
IF SCREEN-NAME = 'PFILE2'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
LOOP AT SCREEN.
IF SCREEN-NAME = 'PFILE3'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
2010 Feb 24 11:17 AM
Hello Guys,
But i doubt this will not work because the OP has declared the elements of Block B3 as OBLIGATORY.
If you declare the elements as obligatory i think you cannot hide them. May be i am wrong, please correct me in that case.
BR,
Suhas
2010 Feb 24 7:59 AM
Hi,
at selection-screen output.
IF p_upld IS NOT INITIAL.
LOOP AT SCREEN.
IF SCREEN-NAME = 'PFILE1'
OR SCREEN-NAME = 'PFILE2'
OR SCREEN-NAME = 'PFILE3'
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards Marcel
Edited by: MarcelKucharek on Feb 24, 2010 8:59 AM
2010 Feb 24 8:23 AM
Hi,
Use this
"Note the use of MODIF ID
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.
PARAMETERS: P_EBELN TYPE EKKO-EBELN MODIF ID S1 AS LISTBOX VISIBLE
LENGTH 20,
P_OPNUM(5) TYPE C MODIF ID S1.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-T02.
PARAMETERS: p_upld TYPE char1 AS CHECKBOX MODIF ID S2.
PARAMETERS: P_MATNR TYPE MARA-MATNR MODIF ID S2,
P_WERKS TYPE EKPO-WERKS MODIF ID S2.
SELECTION-SCREEN END OF BLOCK B2.
AT SELECTION-SCREEN OUTPUT.
IF p_upld = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'S2'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
2010 Feb 24 8:26 AM
Hi,
AT SELECTION SCREEN.
IF p_upld = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'PFILE1'
OR SCREEN-NAME = 'PFILE2'
OR SCREEN-NAME = 'PFILE3'
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
2010 Feb 24 8:29 AM
2010 Feb 24 9:28 AM
2010 Feb 24 9:34 AM
try this change.
CS instead of EQ
at selection-screen output.
IF p_upld IS NOT INITIAL.
LOOP AT SCREEN.
IF SCREEN-NAME CS 'PFILE1'
OR SCREEN-NAME CS 'PFILE2'
OR SCREEN-NAME CS 'PFILE3' .
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Edited by: MarcelKucharek on Feb 24, 2010 10:45 AM
2010 Feb 24 10:03 AM
>
> Hi All,
>
> The above suggestions not working.
Hi, Ginger
Please Check the bellow code it is working fine for me.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-002.
PARAMETERS: pfile1 TYPE string DEFAULT text-003 MODIF ID aaa, " USE Modif ID
pfile2 TYPE string DEFAULT text-003 MODIF ID aaa,
pfile3 TYPE string DEFAULT text-003 MODIF ID aaa.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-019.
PARAMETERS: p_upld TYPE char1 AS CHECKBOX USER-COMMAND uc, " USE This USER-COMAND
pfile TYPE string DEFAULT text-003.
SELECTION-SCREEN END OF BLOCK b4.
AT SELECTION-SCREEN OUTPUT.
IF p_upld = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'AAA'.
screen-active = 0.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
ENDIF.Best Regards,
Faisal
2010 Feb 24 11:24 AM
Dear Ginger,
Faisal code is working correctlyvexcept displaying message when any of the field in first block empty.
PF below code. It generates a message when checkbox is not selected and all fields are empty in 1st block And secondly when checkbox is selected it makes them invisible .
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-002.
PARAMETERS: param1 TYPE string DEFAULT text-003 MODIF ID aaa, " USE Modif ID
param2 TYPE string DEFAULT text-003 MODIF ID aaa,
param3 TYPE string DEFAULT text-003 MODIF ID aaa.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-019.
PARAMETERS: p_upld TYPE char1 AS CHECKBOX,
param4 TYPE string DEFAULT text-003.
SELECTION-SCREEN END OF BLOCK b4.
AT SELECTION-SCREEN OUTPUT.
if p_upld ne 'X'.
if param1 is INITIAL or param2 is INITIAL or param3 is INITIAL. "For Displaying Message
* MESSAGE E000(zmsg).
MESSAGE 'Enter all Parameters in first block' type 'S'.
endif.
endif.
IF p_upld = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'AAA'.
screen-input = 0.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
ENDIF.
START-OF-SELECTION. "Use for displaying output
write 'hi'.Regards,
Apoorv
.
2010 May 10 4:06 PM
I have a question about the code in this specific posting. Can code be used to make it automatic? I used the code in this post and it does work if you press the enter key but is there a way for parameters to appear and disappear based on pressing the radio button only and not in conjunction with pressing enter?
Thanks
2010 May 10 4:24 PM
Hi ,
Please search before posting
check link:[http://www.sdn.sap.com/irj/scn/advancedsearch?query=atselectionscreenoutputradio+button]
2010 Feb 24 11:12 AM
PARAMETERS:p_upld TYPE char1 AS CHECKBOX USER-COMMAND ABC. "try adding this.
at selection-screen output.
IF p_upld = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'PFILE1'.
screen-input = 0.
MODIFY SCREEN.
elseif SCREEN-NAME = 'PFILE2'.
screen-input = 0.
MODIFY SCREEN.
elseif SCREEN-NAME = 'PFILE3'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
2010 Feb 24 11:17 AM
Hello Guys,
But i doubt this will not work because the OP has declared the elements of Block B3 as OBLIGATORY.
If you declare the elements as obligatory i think you cannot hide them. May be i am wrong, please correct me in that case.
BR,
Suhas
2010 Feb 24 11:19 AM
2010 Feb 24 11:19 AM
2010 Feb 24 11:23 AM
Hello,
I think if you make the elements as non-obligatory & add the MODIF-ID to the BEGIN OF BLOCK you have hide the block directly.
@Ginger: You have to make the 3 params inside the block B3 non-mandatory & do the validations in your START-OF-SELECTION or AT SELECTION-SCREEN event.
BR,
Suhas
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |