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: 

Problem with For all entries in

Former Member
0 Kudos

i am trying to execute FOR ALL ENTRIES IN with my select statement.

SELECT object_id description FROM crmd_orderadm_h

INTOTABLE lt_values FOR ALL ENTRIES IN lt_backend_sys WHERE guid = lt_backend_sys-guid.

The problem is although the field name is same the data element is different for 'guid' in source and target field.

and as a result, the records are not selected. However they do appear when i filter out the result in SE11 on the same basis.

Let me know where i need to rectify.

10 REPLIES 10

guillaume-hrc
Active Contributor
0 Kudos

Hi,

You either have to drop the idea of using a FOR ALL ENTRIES select, or use a dedicated internal table that has the same type for the field used in the WHERE clause as in the table.

Best regards,

Guillaume

Former Member
0 Kudos

Hi Alok,

The "FOR ALL ENTRIES" neglects the duplicate values, so u've to add some more fields in the select clause, try to specify all the key fields of the table in the select clause.

Former Member
0 Kudos

SELECT object_id description FROM crmd_orderadm_h

<b>INTO CORRESPONDING FIELDS OF TABLE</b> lt_values FOR ALL ENTRIES IN lt_backend_sys WHERE guid = lt_backend_sys-guid.

every thing is ok...

but check gap b/w into and table .

and c

former_member186741
Active Contributor
0 Kudos

What is te difference between the two guids? I'm guessing there is a conversion exit or something... couldn't you convert the lt_backend table to suit the crmd_orderadm_h definition before you do the select?

Former Member
0 Kudos

hi,how about checking to see if there is something to do with conversion exit of one of the data elements?

rgds,

ET

former_member188685
Active Contributor
0 Kudos

Hi,

SELECT object_id description
 FROM crmd_orderadm_h 
INTO corresponding fields of TABLE lt_values
 FOR ALL ENTRIES IN lt_backend_sys 
WHERE guid = lt_backend_sys-guid.

Regards

vijay

Former Member
0 Kudos

Hi Alok,

pls show ur declaration of internal table , if it contains other than the fields that u had mentioned in the select , then u have to use INTO CORRESPONDING FIELDS

SELECT object_id description FROM crmd_orderadm_h

INTO <b>CORRESPONDING FIELDS OF</b> TABLE lt_values FOR ALL ENTRIES IN lt_backend_sys WHERE guid = lt_backend_sys-guid.

Message was edited by: Chandrasekhar Jagarlamudi

Former Member
0 Kudos

Hai

use the following

if not lt_backend_sys[] is initial.

SELECT object_id description

FROM crmd_orderadm_h

INTO corresponding fields of TABLE lt_values

FOR ALL ENTRIES IN lt_backend_sys

WHERE guid = lt_backend_sys-guid.

endif.

Thanks & regards

Sreeni

Former Member
0 Kudos

Hi alok,

1. The problem is although the field name is same the data element is different for 'guid' in source and target field.

Just make sure the

<b>FIELD LENGTH and data type

of both the fields are same.</b>

regards,

amit m.

0 Kudos

Hi,

Just move all the GUIDs of your internal table used in FOR ALL ENTRIES clause to another internal table. Make sure that the new internal table has the data element for GUID same as that in the table CRMD_ORDERADM_H.

You will have to use a loop here and move the the GUIDs.

<b>Reward points if it helps.</b>

Regards,

Amit Mishra