‎2008 May 07 12:43 PM
Hi friends
iam working on events in reports.
with at selection-screen output iam doing screen validations(loop at screen).
my requirement is : i have checkboxes ,. if c_or = 'x' i want to dispaly 2 select-options for input .
after that start-of-selection and fieldcats are there.
but my problem was iam not getting output its only diaplaying empty list.
i had done debugging also ( on at selection-screen output) but the cursor comes out and dipslyaing empty list.
can anybody chosee the way ....
thanks in advance...
.
‎2008 May 07 1:13 PM
Your question is a little confusing... your code should be structured something like:
parameters:
p_parm1 as checkbox.
select-options:
s_bukrs for t001-bukrs.
at selection-screen output.
" this occurs before the screen display and is where you adjust the layout eg hide or lock fields
perform at_selection_screen_output.
at selection-screen.
" this occurs after the user hits enter or executes the report - put validations here
perform at_selection_screen.
start-of-selection.
" Now we can use the parameters to get info from database into internal tables etc
perform get_data.
end-of-selection.
" Data have been collected so show it to the user...
perform output_data.
Jonathan
‎2008 May 07 1:20 PM
Check for input u r providing.
If u want 2 select-options to display u must group them using MODIF ID.
‎2008 May 07 1:58 PM
Hi, Satya,
Suposse you have two fields on SELECTION-SCREEN:
SELECT-OPTIONS :
s_field1 FOR mara-matnr MODIF ID sg1,
s_field2 FOR mara-matnr MODIF ID sg2,
s_field3 FOR vbak-vbeln.
PARAMETER : p_test AS CHECKBOX DEFAULT 'X' USER-COMMAND uc1.
Note: it's VERY important to have USER COMMAND on the checkbox, because it triggers the whole event.
To hide or diplay a field with a checkbox, you must do LOOP AT SCREEN, on AT SELECTION-SCREEN OUTPUT event:
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
*** If checkbox is marked, shows fields:
IF p_test IS NOT INITIAL.
IF screen-group1 = 'SG1' OR
screen-group1 = 'SG2'.
screen-active = 1.
ENDIF.
ELSE.
*** If checkbox is NOT marked, hides fields:
IF screen-group1 = 'SG1' OR
screen-group1 = 'SG2'.
screen-active = 0.
ENDIF.
ENDIF.
*** Important!!! Makes screen changes visible:
MODIFY SCREEN.
ENDLOOP.
Regards,
Brian Gonsales
‎2008 May 07 6:59 PM
Hi satya ,
in the block .
At selection-screen
make screen active = '1' in the while u loop the screen for ur given condition .
Also u cannot debug the selection screen .
Regards
Santosh .
‎2008 May 08 5:50 AM
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : p_dl AS CHECKBOX USER-COMMAND check ,
p_file LIKE rlgrap-filename,
p_file1 like rlgrap-filename .
SELECTION-SCREEN : END OF BLOCK b2.
************************************************************************
Validating the selection screen Parameters
************************************************************************
************************************************************************
at selection-screen output
************************************************************************
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_FILE' or Screen-name = 'P_FILE1'.
IF p_dl = 'X'.
screen-input = '1'.
MODIFY SCREEN.
ELSE.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Write : p_file,p_file1.
hope this will solve your problem.
Regardss,
Madhavi
‎2010 Dec 24 10:16 AM