<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sdata field cannot be used where condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497637#M2002929</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;SELECT *&lt;BR /&gt;  FROM edid4&lt;BR /&gt;  INTO CORRESPONDING FIELDS OF TABLE lt_edid4&lt;BR /&gt;  FOR ALL ENTRIES IN lt_docnum&lt;BR /&gt;  WHERE docnum EQ lt_docnum-docnum&lt;BR /&gt;    AND segnum EQ '000001'&lt;BR /&gt;    AND segnam IN lr_segnam&lt;BR /&gt;    AND hlevel EQ '01'.&lt;BR /&gt;*              AND sdata  IN lr_objkey2.&lt;BR /&gt;  LOOP AT lt_edid4 INTO DATA(ls_edid).&lt;BR /&gt;    DELETE lt_edid4 FROM lr_objkey2.&lt;BR /&gt;  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;According to what you said, will this work for me?&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jan 2022 08:13:52 GMT</pubDate>
    <dc:creator>former_member760452</dc:creator>
    <dc:date>2022-01-03T08:13:52Z</dc:date>
    <item>
      <title>Sdata field cannot be used where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497634#M2002926</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;SELECT *&lt;BR /&gt;    FROM edid4&lt;BR /&gt;    INTO CORRESPONDING FIELDS OF TABLE lt_edid4&lt;BR /&gt;    FOR ALL ENTRIES IN lt_docnum&lt;BR /&gt;    WHERE docnum EQ lt_docnum-docnum&lt;BR /&gt;       AND segnum EQ '000001'&lt;BR /&gt;       AND segnam IN lr_segnam&lt;BR /&gt;       AND hlevel EQ '01'&lt;BR /&gt;       AND sdata  IN lr_objkey2.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Hi guys i am getting this error can you help me?&lt;/P&gt;
  &lt;P&gt;The field "SDATA" is a long string or a text and cannot be used in the WHERE condition.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 06:24:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497634#M2002926</guid>
      <dc:creator>former_member760452</dc:creator>
      <dc:date>2022-01-03T06:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sdata field cannot be used where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497635#M2002927</link>
      <description>&lt;P&gt;You'll need to select without the &lt;STRONG&gt;sdata&lt;/STRONG&gt; clause, then loop through &lt;STRONG&gt;lt_edid4&lt;/STRONG&gt; and eliminate records not in &lt;STRONG&gt;lr_objkey2&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 07:06:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497635#M2002927</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-01-03T07:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sdata field cannot be used where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497636#M2002928</link>
      <description>&lt;P&gt;In Open SQL, it's not possible directly (see Matthew answer).&lt;/P&gt;&lt;P&gt;Note that the transaction code WE09 permits to find IDocs based on SDATA.&lt;/P&gt;&lt;P&gt;You may also try with native SQL. Below code that you shouldn't use productively, it's just to quickly test if native SQL supports it, if yes you may use AMDP, ADBC or HANA SQL Script (don't know for HANA CDS).&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA edid4 TYPE edid4.
EXEC SQL PERFORMING select_row_from_edid4.
  SELECT DOCNUM, SDATA FROM EDID4 WHERE SUBSTRING( SDATA, 1, 1 ) = 'A' INTO :EDID4-DOCNUM,:EDID4-SDATA
ENDEXEC.
FORM select_row_from_edid4.
  WRITE: / edid4-docnum, edid4-sdata.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Jan 2022 07:50:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497636#M2002928</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-01-03T07:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sdata field cannot be used where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497637#M2002929</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;SELECT *&lt;BR /&gt;  FROM edid4&lt;BR /&gt;  INTO CORRESPONDING FIELDS OF TABLE lt_edid4&lt;BR /&gt;  FOR ALL ENTRIES IN lt_docnum&lt;BR /&gt;  WHERE docnum EQ lt_docnum-docnum&lt;BR /&gt;    AND segnum EQ '000001'&lt;BR /&gt;    AND segnam IN lr_segnam&lt;BR /&gt;    AND hlevel EQ '01'.&lt;BR /&gt;*              AND sdata  IN lr_objkey2.&lt;BR /&gt;  LOOP AT lt_edid4 INTO DATA(ls_edid).&lt;BR /&gt;    DELETE lt_edid4 FROM lr_objkey2.&lt;BR /&gt;  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;According to what you said, will this work for me?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 08:13:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497637#M2002929</guid>
      <dc:creator>former_member760452</dc:creator>
      <dc:date>2022-01-03T08:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sdata field cannot be used where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497638#M2002930</link>
      <description>&lt;P&gt;Something like that yes.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 09:29:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sdata-field-cannot-be-used-where-condition/m-p/12497638#M2002930</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-01-03T09:29:27Z</dc:date>
    </item>
  </channel>
</rss>

