Skip to Content
0

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

Apr 19, 2017 at 07:47 AM

170

avatar image

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!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Ricardo Inácio Apr 19, 2017 at 08:10 AM
1

Hello;

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

Hope it helps;

Regards

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

0
Ricardo Inácio Apr 19, 2017 at 09:04 AM
1

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

Show 7 Share
10 |10000 characters needed characters left characters exceeded

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. :(

1.jpg (14.3 kB)
2.jpg (14.5 kB)
3.jpg (34.8 kB)
4.jpg (16.5 kB)
0

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;

0

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?

0

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

0

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?

0

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.

0

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

5.jpg (22.8 kB)
6.jpg (12.0 kB)
0
Ricardo Inácio Apr 19, 2017 at 11:39 AM
0

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;

Share
10 |10000 characters needed characters left characters exceeded