cancel
Showing results for 
Search instead for 
Did you mean: 

Bex filter with lat 3 characters

Former Member
0 Kudos

Hi

I need to include only last 3 characters of cost centeres example which ends with " 999"...If I select all individual cost centers in Dev and transport the query to Quality we have more cost centers ends with 999 in quality. So I'm trying to write the exit as below , but its not working..It is giving me the result for all cost centers...

IF i_step = 1. "before popup

l_s_range-low+7(3) = '999'.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

ENDIF..

Accepted Solutions (1)

Accepted Solutions (1)

former_member209032
Active Contributor
0 Kudos

Hi,

Select all the cost cente from'P' table of cost center r ending with 999 in an internal table. Then add thes costcenter to e_t_range by looping the cost center internal table.

Regards,

Raghavendra.

Edited by: Raghavendra Padmanaban on Nov 10, 2010 4:17 PM

Edited by: Raghavendra Padmanaban on Nov 10, 2010 4:17 PM

Former Member
0 Kudos

Thanks for the input. But why do we need to put a loop and read when we are doing this in Bex, Can we do without reading P table? Like I said, l_s_range-low7(3) = '999' should give the cost centeres ends with 999...Or if there is any other way like using wild card '++++++999' etc...Please advice

Sam

former_member209032
Active Contributor
0 Kudos

Hi,

Is it a 3.x query or 7.0 query. In 3.x query wild card search is possible in selection screen.

Regards,

Raghavendra.

Former Member
0 Kudos

I'm on 3.x query designer,but I do not know how to access this wild card search and give as filter restriction...Can you please advice

Thanks

former_member209032
Active Contributor
0 Kudos

See the below link. I have not tried this.

Former Member
0 Kudos

Thanks much. I created new variable with user entry/default with CP...and included +++++++999 as the selection. and It worked

Former Member
0 Kudos

HI,

You can create a infoobject of type char 3 and add it as a navigational attribute to 0costcenter.

Reload 0costcenter and populate your attribute with the last 3 simbols.

Then use it to restrict it in query filter with value 999

Former Member
0 Kudos

Thanks , I'm using CP and default value as mentioned above...

But now my problem is I want to use 4 default values : 999,998,997,996....

If I create 4 variables it is not allowing me to put it in the filter area as it is selection option. Is there any way I can select more default values ? Pelase advice...

Thanks

Answers (3)

Answers (3)

Former Member
0 Kudos

Used 4 selections and one formula.

Former Member
0 Kudos

I need to selec 4 different default values but it is allowing only 1 if I use CP...pelase advice...Do we have an option to select 4 default values when we create variable ?

Please advice

Former Member
0 Kudos

This logic is imbedded in a BEx query?

I'm not sure that

l_s_range-low+7(3) = '999'.

Does what you think it does.

I'm pretty sure all it does is enters a record into the table e_t_range with the value

low option sign

999 EQ I

Later on do you filter on 0COSTCENTER IN e_t_range?

Former Member
0 Kudos

Thanks Andrew,I slected the customer exit variable as multiple single values and writing the above code, but I'm not sure how to select all the cost centers ends with '999'...Do we have any other option to do this ? example wild card option in Bex varaibles / selection?

thanks