on 2005 Aug 09 12:28 PM
So I've got this internal table i_tab. One of the values for field1 of i_tab could be 'VP*'.
Afterwards, they do a select:
select cretime
into table i_table
from apqi
for all entries in i_tab
where groupid eq i_tab-field1.
Of course, nothing shows up, because the * is supposed to be a wildcard, and there is no groupid 'VP'. How can I make a selection so that the wildcard works? (Every groupid that starts with VP?) I can't change the * to a %.
Hi,
1) select cretime
into table i_table
from apqi
for all entries in i_tab
where groupid like 'VP*'.
2)
ranges r_id for apqi-groupid.
r_id-low = 'VP*'.
r_id-sign = 'I'.
r_id-option = 'CP'.
append r_id.
select cretime
into table i_table
from apqi
for all entries in i_tab
where groupid in r_id.
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First of all, thanks for the quick and great replies.
The answers given by Christophe Blineau and Anjali Devi and the first answer by Andreas Mann wouldn't work for me. The 'VP*' is not a value I can place in the select literally, because it is a value from an internal table, and there are many more records with wildcards in that table.
I could try to work out the two other answers, to see if they would work. I don't fully understand what the 'aaaaaaaaaa' is for though.
Mind you, there are entries that have a * wildcard, and there are others that don't.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christophe,
i think, your problem is solved.
so pls reward points and close this thread.
thanks and regards
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just try this.
ranges r_field for apqi-groupid.
loop at i_tab into wa.
*Since you specified two letter and since groupid is of width 12, I am using 10 letters 'aaaaaaaaaa' here.
concatenate wa-field1 'aaaaaaaaaa' into r_field-low.
r_field-option = 'EQ'.
r_field-sign = 'I'.
append r_field.
endloop.
select cretime
into table i_table
from apqi
where groupid in r_field1.
Get back for clarifications.
Kindly reward points if it is useful by clciking the star on the left of the reply.
Message was edited by: Jayanthi Jayaraman
Message was edited by: Jayanthi Jayaraman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to do this, have a look at :
select * from TABLE where XXXX like 'YYYY%%'.
Mind the performance, it might be slow.
Sincerely
Christophe Blineau
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
105 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.