<?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: Dynamically Assign N Length in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592420#M266342</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is the code sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameters: size(10) .

data: elem type ref to CL_ABAP_ELEMDESCR .
data: len type i .
data:  dref type ref to data .
field-symbols: &amp;lt;field&amp;gt; type any.

start-of-selection .
len = size .
elem = cl_abap_elemdescr=&amp;gt;get_c( len ).

create data dref type handle elem.

assign dref-&amp;gt;* to &amp;lt;field&amp;gt;.

clear len .

describe field &amp;lt;field&amp;gt; length len in character mode .

write:/ len .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Sep 2006 05:23:54 GMT</pubDate>
    <dc:creator>athavanraja</dc:creator>
    <dc:date>2006-09-11T05:23:54Z</dc:date>
    <item>
      <title>Dynamically Assign N Length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592419#M266341</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 a requirement for the user to dictate the length of a field. A field in the selection screen would ask for a length (a number) for example 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program would then read this field and use the value 6 to be the length of an internal variable, CTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: CTR(4) TYPE N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTR's default length is 4, but since the user wants it to be 6, it should be changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is important since this field will be used to split a string into exact number of characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kenny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2006 03:47:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592419#M266341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-11T03:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Assign N Length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592420#M266342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is the code sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameters: size(10) .

data: elem type ref to CL_ABAP_ELEMDESCR .
data: len type i .
data:  dref type ref to data .
field-symbols: &amp;lt;field&amp;gt; type any.

start-of-selection .
len = size .
elem = cl_abap_elemdescr=&amp;gt;get_c( len ).

create data dref type handle elem.

assign dref-&amp;gt;* to &amp;lt;field&amp;gt;.

clear len .

describe field &amp;lt;field&amp;gt; length len in character mode .

write:/ len .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2006 05:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592420#M266342</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-09-11T05:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Assign N Length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592421#M266343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Durairaj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method doesn't exist though. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cl_abap_elemdescr=&amp;gt;get_c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kenny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2006 05:48:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592421#M266343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-11T05:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Assign N Length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592422#M266344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;which version of SAP you are using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2006 05:49:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592422#M266344</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-09-11T05:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Assign N Length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592423#M266345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;4.6B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2006 05:52:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592423#M266345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-11T05:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Assign N Length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592424#M266346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, the code sample i had given wont work in 4.6B, you need atleast WAS6.20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i dont know how this can be done in 4.6B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2006 05:56:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592424#M266346</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-09-11T05:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Assign N Length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592425#M266347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is the program going to be used by various users @ the same time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes then I guess it would be very difficult to do it otherwise if it's going to be used by only one user @ a time then I can give you a very crude way of doing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reply if needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2006 06:18:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-assign-n-length/m-p/1592425#M266347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-11T06:18:13Z</dc:date>
    </item>
  </channel>
</rss>

