Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Alternative for / Problems with: "For all entries in data_package"

0 Kudos

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

1 ACCEPTED SOLUTION

horst_keller
Product and Topic Expert
Product and Topic Expert

You have to generate exactly the same syntax in WHERESTR as you would type it in the ABAP Editor.

4 REPLIES 4

horst_keller
Product and Topic Expert
Product and Topic Expert

You have to generate exactly the same syntax in WHERESTR as you would type it in the ABAP Editor.

0 Kudos

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

matt
Active Contributor

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.

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

Well yes, you have to use the means of string processing to create exactly the token you need.