‎2010 Oct 16 10:55 AM
Hello
I have this problem:
MAKT-MAKTX contains the value 'abc+def"
How can I find this pattern?
I tryed with:
data lr_maktx type range of maktx.
select * from makt into table lt_makt
where maktx in lr_maktx.
but it doesn't work
Thanks for any help
Daniel
‎2010 Oct 16 12:21 PM
HI
data lr_maktx type range of maktx.
select * from makt into table lt_makt
where maktx in lr_maktx.USE :
Ranges in order to Pass parameter to query
RANGES : Lr_matkl FOR makt-maktx .
Create Material Parameter
MOVE 'I' TO Lr_maktx-sign.
MOVE 'CP' TO Lr_maktx-option.
MOVE 'abc+def' TO Lr_maktx-low.
APPEND Lr_maktx.
ENDIF.
SELECT * FROM MAKT INTO CORRESPONDING FIELDS OF TABLE IT_MAKT
WHERE MAKTX IN LR_mAKTX .
regards
Deepak.
‎2010 Oct 16 4:27 PM
HI Deepak
At first:
RANGES is the old version, don't use iit!
Second:
Have you tried your proposal in a SAP ECC6? - It works in your system?
In my system it doesn't work!
Daniel
‎2010 Oct 16 11:57 PM
Hi Daniel,
Please, show an example of the data in your MAKTX field (like "abckdef", etc.).
And confirm that your pattern is "abcdef" where "" means any character in that place.
Best regards,
Leandro Mengue
‎2010 Oct 17 6:01 AM
Hi Leandro
Please read my question carefully - if you have a solution, I am very glad
IF NOT - LET IT - I give you only points for a solution how works, please try at first in your system
Daniel
‎2010 Oct 17 12:43 PM
Don't be so impatient with the people trying to help you, rather tell what has not worked, do not offer points publicly, and answer the following questions:
- is "+" meant to be a wildcard placeholder for one character or the actual plus sign?
- can your search string appear at any place in the material description with other characters before or after?
Thomas
‎2010 Oct 17 3:55 PM
Hi all together
Sorry if I'm not nice - but my question was clear!!!
And here is the solution:
select * from tab where feld like '%+%'.
All points for my self
Daniel
‎2010 Oct 17 4:12 PM
You don't have to be nice, just polite towards people that you are asking for help, and your question was not clear. It was unclear whether "+" was supposed be a wildcard or normal character, and it was unclear that "abc" and "def" was your personal terminology for "any characters".
Enjoy your points.
Thomas
‎2010 Oct 18 1:20 PM
Sorry Daniel, you DO NOT solve your own question!!!
Remember that you use "range of" in your question?!
So, this is the correct answer: ( using the escape operator: # )
DATA: it_makt like makt occurs 0.
DATA: w_maktl like range of makt-maktx with header line.
w_maktl-sign = 'I'.
w_maktl-option = 'CP'.
w_maktl-low = '*#+*'.
APPEND w_maktl.
SELECT * from makt into table it_makt
where maktx in w_maktx.Best regards,
Leandro Mengue
‎2010 Oct 18 4:48 PM
Hi Leandro
Sorry again - please accept my appology
Your solution works, thanks
Daniel
‎2010 Oct 18 6:06 PM
Hi Daniel,
That´s ok. Glad to help.
Best regards,
Leandro Mengue
‎2010 Oct 17 12:16 AM
Hi,
Please, try this:
DATA: it_makt like makt occurs 0.
DATA: w_maktl like range of makt-maktx with header line.
w_maktl-sign = 'I'.
w_maktl-option = 'CP'.
w_maktl-low = 'abc+def'.
APPEND w_maktl.
SELECT * from makt into table it_makt
where maktx in w_maktx.Best regards,
Leandro Mengue
‎2010 Oct 17 3:55 PM