05-23-2006 8:36 AM
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.
05-23-2006 8:39 AM
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
05-23-2006 8:40 AM
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.
05-23-2006 8:40 AM
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
05-23-2006 8:41 AM
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?
05-23-2006 8:43 AM
hi,how about checking to see if there is something to do with conversion exit of one of the data elements?
rgds,
ET
05-23-2006 8:46 AM
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
05-23-2006 8:55 AM
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
05-23-2006 9:06 AM
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
05-23-2006 9:25 AM
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.
05-23-2006 9:33 AM
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