Application Development and Automation 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: 
Read only

Empty selection options after report run

Former Member
0 Likes
1,951

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

7 REPLIES 7
Read only

Former Member
0 Likes
1,233

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 .

Read only

0 Likes
1,233

tried this, didn't work. I think it is because of the sap gui that retains the material number.

Read only

Former Member
0 Likes
1,233

Hi

At the END-OF-SELECTION, clear all parameters and clear and refresh all select-options.

Read only

prasanth_kasturi
Active Contributor
0 Likes
1,233

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

Read only

former_member435013
Active Participant
0 Likes
1,233

Hi,

start the report again with SUBMIT.

regards

Walter Habich

Read only

Former Member
0 Likes
1,233

Erik,

You can reset the values after on your last line after the report is done displaying.

Read only

Former Member
0 Likes
1,233

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.