cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove variable ?

Former Member
0 Kudos

Experts !

i need to remove the variable from the query. when i tries to delete it, it gives me an error msg. saying that its being used. now, there are couple others queries which uses this variable too.

In order to remove that variable , do i need to remove from each queries before i can delete ?

please help

thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member181953
Participant
0 Kudos

You have to delete it from within the same query, like if its referenceing to other variable, or if its used in formula variable within the query.,

IF oyu are trying to delete from the system you have to make sure its not used in other queries too.,

Hope its clear.

Shashi

Former Member
0 Kudos

Thanks shashi,

my gole is to define the same variable with customer exit, that why i have to delete the current one and create the same techinacal name again with customer exit.

And yes , its been used by other queries too, so for that i wll have to remove from all the queries and then delete the variable. once i create the new one , i wil have to add those every where the old one was used..

if thats the case then its too much work..

do you see any other option ?

i have to set default value for that variable, and the default value is system date. for this i need to write customer exit.

do you have any other way to work around?

thanks

former_member181953
Participant
0 Kudos

you can create a new varaible with customer exit and start useing it and try to replace older variable with new when ever and where ever its needed.

Shashi

Former Member
0 Kudos

Ya , but the problem is..

that variable is being used in lots of customer exit. so if i create a new variable ( Diff. techinacal name ) then i will have to put new technical name in all the customer exit. which is fine.. but there are other queries ( having old variable ) uses the same customer exit. so in that case old queries' customer exit will fail or wont find the right variable.

did you get my point ?

So, the only option is, i need to create new variable with SAME Techinacal name. but then the problem is how to remove old variable from all queries its hack a lot of work and scary too.

Edited by: honar on Jan 21, 2011 11:54 PM

former_member181953
Participant
0 Kudos

Yeah I got it, try changeing the existing varable type in table RSZGLOBV, if it allows you are good else you have to go through manuall process of deleting and recreating.

Good luck!!

Shashi

Former Member
0 Kudos

can you please guide me ? i dont no how to do that !

Thanks

former_member181953
Participant
0 Kudos

if you want to use new variable only for this query and dont want to change for all other queries,

!) create new variable with customer exit.

2) in CMOD code when you are reading OLD variable put "OR NEWVARABLE" so you code will work for both OLD and NEW variable .,

former_member181953
Participant
0 Kudos

Go to Tcode SE12 - table name RSZGLOBV enter you VNAME and then execute

Select your variable and go to edit mode and try changes the values VPRPCTP from 4 to 3., save it.

Shashi

Former Member
0 Kudos

I tried it. but its giving me an error..

this is my code...

READ TABLE i_t_var_range

WITH KEY vnam = 'old variable'

INTO l_var_range.

now, if i modify like this.. its giving me an error

READ TABLE i_t_var_range

WITH KEY vnam = 'old variable' OR vnam = 'new variable '

INTO l_var_range.

do you see any problem here ?

Former Member
0 Kudos

Thanks .

i could change the type. it should work now.

thnaks a lot

Answers (0)