cancel
Showing results for 
Search instead for 
Did you mean: 

Values in Input Parameter screen is not clearing in Query Monitor RSRT SAP BW

Former Member
0 Kudos

Hi,

Good day!

I am having an issue in RSRT and I need your expertise on this guys.

Example, i will access RSRT and view the query in HTML having this variable_screen=X. Then i will be directed to the input variables.

Sample variables:

Project ID

Project Title

Project Status

Initially all the fields don't have any values, then i will place PROJECT 1 in Project ID and execute. The report output will be showing the details of PROJECT 1.

When i return to the Query monitor screen and execute the query once again, the value for Project ID field was not cleared or deleted, it is still PROJECT 1.

Requirement is that, PROJECT 1 should be cleared whenever we are back to the Query Monitor Screen and execute again. This requirement goes with other fields.

Is this an issue in CMOD or we just need to change something in configurations?

Thank you!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member

Hi;

Try this:

CASE I_STEP.
WHEN 1.
CLEAR: E_T_RANGE[], I_T_VAR_RANGE[].

READ TABLE i_t_var_range

WITH KEY vnam = 'YOUR VARIABLE'

*sign = 'I'

*opt= 'EQ'

INTO loc_var_range.

IF sy-subrc = 0.

IF loc_var_range IS NOT INITIAL.

*.Clear Previous Entry

REFRESH e_t_range.

ENDIF.

ENDIF.
ENDCASE.

Let me know if it works...

Regards

Former Member
0 Kudos

The codes didn't work 😞

The image above is the input parameters after i execute the query. notice that the input fields are empty.

When i place 1 in the project id and execute, the report will show only the details of project id = 1

Now if i am going to return to the query monitor screen and execute again, "1" should be erased in the input field.

But what happened is that, "1" is still there just like in the 1st photo.

When i debugged in CMOD, I_T_VAR_RANGE table is empty in STEP 1 so the codes didn't work. 😞

Former Member
0 Kudos

Hi;

Can you please try this:

DATA: l_s_rangeTYPE rsr_s_rangesid,

i_t_var_range TYPE rrrangeexit.

CASE I_STEP.
WHEN 1.
CLEAR: loc_var_range, l_s_range.

READ TABLE i_t_var_range

WITH KEY vnam = 'YOUR VARIABLE'

*sign = 'I'

*opt= 'EQ'

INTO loc_var_range.

IF sy-subrc = 0.

l_s_range-sign= 'I'.

l_s_range-opt= 'EQ'.

l_s_range-low= ‘‘.

APPEND l_s_range TO e_t_range.

ENDIF.
ENDCASE.

Regards;

Former Member
0 Kudos

it is giving me sy-subrc = 4 since i_t_var_range is empty when in step = 1.
no vnam available. does it usually happen or there is something wrong on the configuration/cmod?

Former Member
0 Kudos

Hi;

I made a small error in the data declaration:

Should be :

DATA: l_s_rangeTYPE rsr_s_rangesid,

loc_var_range TYPE rrrangeexit.

Please one additional check:

you are using

CLEAR: loc_var_range, l_s_range.

and not

CLEAR: E_T_RANGE[], I_T_VAR_RANGE[].

Thanks & Regards

Former Member
0 Kudos

hi yes i am using loc_var_range.

but upon read table i_t_var_range, sy-subrc is not equal to 0.

should I_T_VAR_RANGE contain any data in step 1 already?

Former Member
0 Kudos

Hi;

Maybe not 🙂

If that is the case please try:

CASE I_STEP.
WHEN 1.
CLEAR: l_s_range.

IF i-vnam = 'YOUR VARIABLE'

l_s_range-sign= 'I'.

l_s_range-opt= 'EQ'.

l_s_range-low= ‘‘.

APPEND l_s_range TO e_t_range.

ENDIF.
ENDCASE.

Former Member
0 Kudos

it is giving a warning message and the Project ID input field is having '#'.

And when i place another filter example project status = completed, same issue is occurring. the value is not erased

Former Member

Hello;

I think that in CMOD you need to clean the variable values in I_STEP = 1.

Hope it helps;

Regards

Former Member
0 Kudos

Hi Ricardo,

Thank you for responding! 🙂

I have added this code in CMOD
CASE I_STEP.
WHEN 1.
CLEAR: E_T_RANGE[], I_T_VAR_RANGE[].
ENDCASE.

But I_T_VAR_RANGE is empty in step 1.
Do i miss something? How can get the variables in step 1?
Sorry i am new in CMOD and i only know a little on how this functions.

Former Member
0 Kudos

Hi;

Are you able to debug to see if it's in CMOD that the # is populated?

Also, please try this

CASE I_STEP.
WHEN 1.
CLEAR: l_s_range.

IF i-vnam = 'YOUR VARIABLE'

*.Clear Previous Entry

REFRESH e_t_range.

ENDIF.
ENDCASE.

Hope it helps;