cancel
Showing results for 
Search instead for 
Did you mean: 

Cust Exit Query Err

former_member205400
Active Participant
0 Kudos

I have a query that takes a dept_no=10 as the default value and then displays as follows:

dept_no, hrs, tot_hrs

I have another query from the same infocude that has a variable like my_var with the characteristic dept_no. In this query my_var is defined as a customer exit referencing dept_no with the details single value and optional.

For this query the customer exit the i_step=1 and I used the following code:

<snip>

l_s_range-low = '10'.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

Value "10" for user-exit variable MWHTEST1 is invalid

Variables contain invalid values.

System error in program CL_RSR_OLAP_VAR and form INIT-02- (see long text)

What I am trying to do is simulate the first query and trying to programitically populate the defualt value.

I am missing something!!!

Any help is appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please make sure that the format of value you are passing to dept_no is same as dept_no. Also, if you want to default to just one value, then you can use default value optoin in version 3.5, if you are on version 7, then you can have multiple default values.

-Saket

Answers (4)

Answers (4)

former_member205400
Active Participant
0 Kudos

That did it for me .... awesome. I had tried this

l_s_range-low = '10'.

l_s_range-low = 10.

This ultimately worked for me:

DATA: mydept(4) TYPE c.

mydept = '0010'.

l_s_range-low = mydept.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

and then i made the change to multiples as was suggested and did the following:

mydept = '0014'.

l_s_range-low = mydept.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

mydept = '0016'.

l_s_range-low = mydept.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

In the debugger I looked at e_t_range and saw all 3 value lines.

I'm going to try to call a table and get a range of values, and append them.

Thanks for your help.

former_member205400
Active Participant
0 Kudos

Arun,

I am just trying something simple to get it working and then can move on to more involved scenarios.

Let me check on the format before its passed.

Mike

Former Member
0 Kudos

You set a breakpoint after the when statement....& check in RSRT....there may be type mismatch in the assignment....

declare a var of data type same as dep_no & then pass the value.....

former_member184494
Active Contributor
0 Kudos

Michael,

For restricting to a constant - I am not able to understand why you need a customer exit.

As said earlier - check the formats - you can do a debug by setting a break point and then running the query via RSRT.

Also you could have restricted it directly in the query using the restrict option instead of an exit.

Arun