2018 May 09 1:02 PM
Hi Guys
I am doing something in ABAP like:
OPEN CURSOR WITH HOLD c1
FOR SELECT (COL_STR)
FROM (JOIN_STR)
UP TO ROWCOUNT ROWS
FOR ALL ENTRIES IN ZEDITPOSTMP
WHERE (WHERESTR).
Here in WHERESTR i am passing link: client eq ZEDITPOSTMP-TABKEY+000000(3) date eq ZEDITPOSTMP-TABKEY+000003(8).
TABKEY: 80000010101.
But here in ZEDITPOSTMP-TABKEY+000003(8) is returning value like 00010101 which is without single quote ' so if we compare it with date it expect that value enclosed between this ' quote. If i manually append this quote like 'ZEDITPOSTMP-TABKEY+000003(8)' then now this is just like a string so won't be processed like a function. I want this ZEDITPOSTMP-TABKEY+000003(8) function should process first and whatever o/p it return that should be enclosed b/w ' ' this quotes.
Any reply will be a great help on this.
Thank's
ompal
2018 May 09 2:28 PM
You have to generate exactly the same syntax in WHERESTR as you would type it in the ABAP Editor.
2018 May 09 2:28 PM
You have to generate exactly the same syntax in WHERESTR as you would type it in the ABAP Editor.
2018 May 10 7:05 AM
Thank's Keller for your reply.
But my question is the syntax zeditpostmp-tabkey+000013(000008) is giving some number like 00010101 but i want it should come like '00010101' so that i can compare this with date like: date_from EQ '00010101'. Do you've any other solution??
Thank's
Ompal
2018 May 10 8:28 AM
Horst has told you. You must use exactly the same syntax in your where clause as you would type in. Write a test program that isn't using dynamic where clause etc. Does your select work as you expect? If not - then it won't work dynamically either.
2018 May 10 10:45 AM
Well yes, you have to use the means of string processing to create exactly the token you need.