2008 Feb 20 7:42 AM
selection-screen : begin of block b1.
parameters : p_dl as checkbox ,
p_file type rlgrap-filename modif id FIL.
Hi all,
Requirement here is
Having two selection screen parameters
1. Check box for download 2. File .
if i didnt select the checkbox it should disable.
If i check the checkbox, the file parameter should enable
after execution the file field is disable ,but in the selection screen when i select the check box, it is not enable mode.
will anybody try the code in your sys and let me know.
selection-screen : end of block b1.
at selection-screen output.
if p_dl = 'X'.
loop at screen.
if screen-group1 = 'FIL'.
screen-input = '1'.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-group1 = 'FIL'.
screen-input = '0'.
modify screen.
endif.
endloop.
endif.
its urgent.
REgards..
2008 Feb 20 7:46 AM
Check below example:
PARAMETERS: p_dl AS CHECKBOX USER-COMMAND abc,
p_file TYPE localfile.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name CP '*P_FILE*'.
IF p_dl IS INITIAL.
screen-active = 0. " File Parameter Invisible
ELSE.
screen-active = 1. " File Parameter Visible
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
selection-screen : begin of block b1.
parameters : p_dl as checkbox ,
p_file type rlgrap-filename modif id FIL.
Hi all,
Requirement here is
Having two selection screen parameters
1. Check box for download 2. File .
if i didnt select the checkbox it should disable.
If i check the checkbox, the file parameter should enable
after execution the file field is disable ,but in the selection screen when i select the check box, it is not enable mode.
will anybody try the code in your sys and let me know.
selection-screen : end of block b1.
at selection-screen output.
if p_dl = 'X'.
loop at screen.
if screen-group1 = 'FIL'.
screen-input = '1'.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-group1 = 'FIL'.
screen-input = '0'.
modify screen.
endif.
endloop.
endif.
its urgent.
REgards..
2008 Feb 20 7:45 AM
Hi ,
Basically, when you select/deselect the checkbox, the PBO of the selection screen (AT SELECTION-SCREEN OUTPUT event) needs to be called again, so that that modify screen command works , for this fo the following:
PARAMETERS: p_dl AS CHECKBOX USER-COMMAND one.
Cheers,
Aditya
Edited by: Aditya Laud on Feb 20, 2008 2:45 AM
2008 Feb 20 7:46 AM
Check below example:
PARAMETERS: p_dl AS CHECKBOX USER-COMMAND abc,
p_file TYPE localfile.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name CP '*P_FILE*'.
IF p_dl IS INITIAL.
screen-active = 0. " File Parameter Invisible
ELSE.
screen-active = 1. " File Parameter Visible
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
2008 Feb 20 7:53 AM
Hi eswar ,
I understood it should decalre with usercommand.
but where are you checking the user command.
is it like
PARAMETERS: p_dl AS CHECKBOX USER-COMMAND abc,
p_file TYPE localfile.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name CP 'P_FILE'.
IF p_dl = abc .
screen-active = 1. " File Parameter Invisible
ELSE.
screen-active = 0. " File Parameter Visible
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
2008 Feb 20 7:58 AM
Hi, The USER-COMMAND addition triggers the AT SELECTION-SCREEN OUTPUT event. If we dont use the addition, you have to use ENTER key each time you change the value of Check Box. Note that USER-COMMAND Addition can only be used for CHECK BOX or RADIOBUTTON. Also see below extract from help: ... USER-COMMAND ucom Effect This addition is only supported for parameters that are defined as checkboxes or radio buttons. In this case, clicking the parameter triggers the user command ucom, similarly to SELECTION-SCREEN PUSHBUTTON. Hope this helps.
2008 Feb 20 8:19 AM
Thank you eswar .
Problem resolved .
I need one more clarification with you.
in selection screen i am having MEAN-EAN11(Refernece number as parameter)
While validating this parameter EAN11, there is no master table for that field .
how to validate that field now.
Could you let me know
2008 Feb 20 8:26 AM
Remember i have answered this question in your other thread.
Anyhow, validating the EAN in the sense you need to check if any material exists with this external identification number.
So you can do that as below:
EAN's are not pre-defined, they can vary time to time for the same material. So only means to check is from material master unless maintained is other specifically designed tables.
SELECT SINGLE ean11 INTO p_ean11 FROM mara WHERE ean11 = p_ean11.
IF sy-subrc NE 0.
MESSAGE e001(00) WITH 'Invalid EAN!!!'. "Error Message
ENDIF.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |