<?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: Create data type string with restriction in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038731#M1610573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a string with a length is a char(length).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Aug 2011 10:44:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-09T10:44:28Z</dc:date>
    <item>
      <title>Create data type string with restriction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038730#M1610572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a way to build string with restriction of length ,I know that basically string don't have &lt;/P&gt;&lt;P&gt;any restriction but i need to create data somehow type string with restriction of length like 10 , 20 ,100 etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i try to do create data lv_data  type ('string') length 8.&lt;/P&gt;&lt;P&gt;i get dump since you cannot limit the string length but there is some workaround ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 10:38:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038730#M1610572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-09T10:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create data type string with restriction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038731#M1610573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a string with a length is a char(length).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 10:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038731#M1610573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-09T10:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create data type string with restriction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038732#M1610574</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;try with below declaration...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data lv_data(100) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 10:48:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038732#M1610574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-09T10:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create data type string with restriction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038733#M1610575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try this &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA weird_string TYPE REF TO DATA.
FIELD-SYMBOLS &amp;lt;fs_string&amp;gt; TYPE STRING.
CREATE DATA weird_string TYPE c LENGTH 8.
ASSIGN weird_string-&amp;gt;* TO &amp;lt;fs_string&amp;gt;.
*Now &amp;lt;fs_string&amp;gt; is a limited (8 char) string ... weird !!
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 10:49:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038733#M1610575</guid>
      <dc:creator>SureshRa</dc:creator>
      <dc:date>2011-08-09T10:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create data type string with restriction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038734#M1610576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create an object class to emulate a limited length string, in SE24.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 10:56:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038734#M1610576</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2011-08-09T10:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create data type string with restriction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038735#M1610577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you try in this manner&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS : p_name TYPE string.
DATA : len TYPE i.
len = strlen( p_name ).
IF len gt 8.
 MESSAGE 'String length exceeds 8 characters' TYPE 'E'.
ELSE.
...
(Your business logic...)
....
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here in the above example, we are restricting the string length to 8 characters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 11:30:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-type-string-with-restriction/m-p/8038735#M1610577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-09T11:30:08Z</dc:date>
    </item>
  </channel>
</rss>

