<?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 Problem with data type 'STRING' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170218#M1623130</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a table named as zproject_mat and there is a field 'LONG_D' for long description and its size is not limited, so i used 'STRING' data type for this field. But the problem is: when i use this field in where condition with 'SELECT QUERY'  in my abap program , it throws me an error..'The field long_d is a long string , so it cannot be used in WHERE, ON, or having conditions'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me regarding this. I dont know which data type will be suitable in both conditions, LONG DESC AND SELECT QUERY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Aug 2011 07:16:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-30T07:16:03Z</dc:date>
    <item>
      <title>Problem with data type 'STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170218#M1623130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a table named as zproject_mat and there is a field 'LONG_D' for long description and its size is not limited, so i used 'STRING' data type for this field. But the problem is: when i use this field in where condition with 'SELECT QUERY'  in my abap program , it throws me an error..'The field long_d is a long string , so it cannot be used in WHERE, ON, or having conditions'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me regarding this. I dont know which data type will be suitable in both conditions, LONG DESC AND SELECT QUERY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 07:16:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170218#M1623130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T07:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type 'STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170219#M1623131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a variable with 220 characters can suffice your requirement, then, you can use the Data Element 'BAPI_MSG'. A select query can be made against such a variable using WHERE condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conversely, if you still need to have a select query, you will have to define the length of your variable by creating a ZDATA_ELEMENT with length as 1024 and then use the same in your table and Select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pranav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 08:32:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170219#M1623131</guid>
      <dc:creator>former_member222709</dc:creator>
      <dc:date>2011-08-30T08:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type 'STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170220#M1623132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ztest_94test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :it_itab TYPE STANDARD TABLE OF Ztable,&lt;/P&gt;&lt;P&gt;            wa TYPE   Ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Ztable will have a string field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM Ztable INTO TABLE it_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_itab into wa WHERE z_long  = 'string'.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aravind.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 08:50:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170220#M1623132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T08:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type 'STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170221#M1623133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aravind,   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this query with 'LIKE'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CONCATENATE '%' MATERIAL_CODE '%' INTO LV_3.&lt;/P&gt;&lt;P&gt; CONCATENATE '%' SHORT_DES '%' INTO LV_4.&lt;/P&gt;&lt;P&gt; CONCATENATE '%' LONG_DES '%' INTO LV_5.&lt;/P&gt;&lt;P&gt; CONCATENATE '%' PLANT '%' INTO LV_6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT *&lt;/P&gt;&lt;P&gt;              FROM ZPROJ_MATERIAL&lt;/P&gt;&lt;P&gt;              INTO TABLE IT_MATERIAL&lt;/P&gt;&lt;P&gt;              WHERE  MATNR LIKE LV_3&lt;/P&gt;&lt;P&gt;              AND SHORT_D LIKE LV_4&lt;/P&gt;&lt;P&gt;              AND LONG_D LIKE LV_5       'Problem in this field.'  &lt;/P&gt;&lt;P&gt;              AND PLANT LIKE LV_6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how do i write 'where' condition in Loop with 'LIKE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 10:06:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170221#M1623133</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T10:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type 'STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170222#M1623134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pranav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not getting. Can yo please explain it. Which data type should i use if i want to give its length around 1500.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please answer me with helpful answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 10:31:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170222#M1623134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T10:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type 'STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170223#M1623135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As mentioned your Table name is 'zproject_mat' and there is a field 'LONG_D'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field 'LONG_D' will have a Data Element associated with it. Create a new input Data Element &amp;amp; Domain 'ZLONG' of Type CHAR with Length = 1100. This will used in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the Table 'zproject_mat', you need to need to break up your field as 'LONG_D1', 'LONG_D2', ........, 'LONG_D5' with Data Element as 'BAPI_MSG'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To INSERT data in table:&lt;/P&gt;&lt;P&gt;In your code, you need to write your logic where the field 'LONG_D' is SPLIT into 5 words and saved in your table against the 5 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To SELECT data from table: &lt;/P&gt;&lt;P&gt;In your code, again you need to write your logic where the field 'LONG_D' is SPLIT into 5 words as abaove and pass them to your SELECT query...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE *
FROM zproject_mat
INTO wa_zproject_mat
WHERE long_d1 = v_split1
      AND long_d2 = v_split2........
     AND long_d3 = v_split3.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The limitation of a table length is 4096 whereas of a field is 255 to make it RFC compatible. Table/Structure fields that are passed via RFC for integration have this limitation and to maintain database standards, these limitations exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pranav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 12:19:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-string/m-p/8170223#M1623135</guid>
      <dc:creator>former_member222709</dc:creator>
      <dc:date>2011-08-30T12:19:42Z</dc:date>
    </item>
  </channel>
</rss>

