‎2008 May 16 11:26 AM
Hi,
After the execution of my abap report sap returns to the selection options screen in which all the selected values from the run are still mentioned. How can i refresh the selection screen (so no values in the selection options after the report run) ?
this is the code (all parameters as you can see) :
parameters : p_matnr like mara-matnr default ''.
parameters : p_werks like mard-werks default 'XYZ',
p_lgort like mard-lgort default ''.
selection-screen skip 1.
parameters : p_qty like sy-tabix default 1.
selection-screen skip 1.
parameters : p_file like RLGRAP-FILENAME memory id GXD.
with regards
‎2008 May 16 11:34 AM
Hi ,
As you mentioned default values for parameters , it always displays the same values ,
If at all you want to change the values every time , make use of variants ,
remove default keyword in parameter declaration ,
run the report once and give p_werks = xyz
p_qty = 1 ,
and save this , it will create a variant .
Thanks ,
Reward if useful .
‎2008 May 16 11:57 AM
tried this, didn't work. I think it is because of the sap gui that retains the material number.
‎2008 May 16 11:44 AM
Hi
At the END-OF-SELECTION, clear all parameters and clear and refresh all select-options.
‎2008 May 16 12:05 PM
hi
i tried for select-options try for parameters
at selection-screen .
if sy-ucomm = 'ONLI'. " Only when execute is pressed
v_low = s_kunnr-low.
v_high = s_kunnr-high . " Hang on to this for select statement
clear s_kunnr[].
clear s_kunnr. " Clear the screen parameter
endif.
for your program
data : matnr like mara-matnr, " variables are taken so that we can have the values for further operations
werks like mard-werks,
lgort like mard-lgort,
qty like sy-tabix,
file like RLGRAP-FILENAME.
at selection-screen.
if sy-ucomm = 'ONLI'. " Only when execute is pressed
matnr = p_matnr.
clear p_matnr.
werks = p_werks.
clear p_werks.
lgort = p_lgort.
clear p_lgort.
qty = p_qty.
clear p_qty.
file = p_file.
clear p_file.
endif.
start-of-selection. " write what ever code you have for the start-of-selection
NOTE "Remove the memory id for p_file otherwise it will not be cleared
regards
prasanth
‎2008 May 16 12:10 PM
‎2008 May 16 12:33 PM
Erik,
You can reset the values after on your last line after the report is done displaying.
‎2008 May 16 12:44 PM
Hi Erik,
Try with the below code.
parameters : p_matnr like mara-matnr default ''.
parameters : p_werks like mard-werks default 'XYZ',
p_lgort like mard-lgort default ''.
selection-screen skip 1.
parameters : p_qty like sy-tabix default 1.
selection-screen skip 1.
parameters : p_file like RLGRAP-FILENAME memory id GXD.
at selection-screen output.
clear: p_matnr, p_werks, p_lgort, p_qty, p_file.
start-of-selection.
write:/ p_matnr, p_werks, p_lgort, p_qty, p_file.