<?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: converting data types dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171891#M1623307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you ......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since i am new ,i am asking this question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as i have huge data in internal tables ..and i have many internal tables also .........i cant hard code all the fields ....&lt;/P&gt;&lt;P&gt;can you suggest me any other way where i can do it dynamically..........&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;sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Sep 2011 13:44:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-05T13:44:52Z</dc:date>
    <item>
      <title>converting data types dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171886#M1623302</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;i am converting all data type to CHAR statically as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tasktype* (raw)*    to   comp1(char)&lt;/P&gt;&lt;P&gt;time&lt;STRONG&gt;(tims)&lt;/STRONG&gt;            to    comp2(char)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT vmc INTO wa_vmctmp.
    WRITE: wa_vmctmp-tasktype         TO wa_zvmctmp-comp1,
           wa_vmctmp-time             TO wa_zvmctmp-comp2,
           wa_vmctmp-entry_id         TO wa_zvmctmp-comp3,
           wa_vmctmp-counter          TO wa_zvmctmp-comp4,
           wa_vmctmp-mem_alloc_local  TO wa_zvmctmp-comp5,
    APPEND wa_zvmctmp  TO  zvmc1.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anybody suggest me,how do i do it dynamically if i have the table data in a field symbol..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Sep 2011 13:56:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171886#M1623302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-03T13:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: converting data types dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171887#M1623303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this on same way as you have coded, instead of use work area, you can use Field-Symbol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT vmc ASSIGNING &amp;lt;FS&amp;gt;.
    WRITE: &amp;lt;fs&amp;gt;-tasktype         TO wa_zvmctmp-comp1,
           &amp;lt;fs&amp;gt;-time             TO wa_zvmctmp-comp2,
           &amp;lt;fs&amp;gt;-entry_id         TO wa_zvmctmp-comp3,
           &amp;lt;fs&amp;gt;-counter          TO wa_zvmctmp-comp4,
           &amp;lt;fs&amp;gt;-mem_alloc_local  TO wa_zvmctmp-comp5,
    APPEND wa_zvmctmp  TO  zvmc1.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if you do not know exactly structure, you can use ASSIGN COMPONENT statement to refer unkown field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ASSIGN COMPONENT sy-index OF STRUCTURE &amp;lt;wa&amp;gt; TO &amp;lt;comp&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Carlos Machado&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Sep 2011 16:44:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171887#M1623303</guid>
      <dc:creator>former_member214857</dc:creator>
      <dc:date>2011-09-03T16:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: converting data types dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171888#M1623304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT itab1 ASSIGNING &amp;lt;record&amp;gt;.
  DO.
    ASSIGN COMPONENT sy-index OF STRUCTURE &amp;lt;record&amp;gt; TO &amp;lt;source&amp;gt;.
    IF sy-subrc NE 0. EXIT. ENDIF.
    ASSIGN COMPONENT sy-index OF STRUCTURE record2 TO &amp;lt;target&amp;gt;.
    IF sy-subrc NE 0. EXIT. ENDIF.
    WRITE &amp;lt;source&amp;gt; TO &amp;lt;target&amp;gt;.
  ENDDO.
  APPEND record2 TO itab2.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 07:30:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171888#M1623304</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2011-09-05T07:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: converting data types dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171889#M1623305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the [CASTING|http://help.sap.com/abapdocu_702/en/abapassign_casting.htm] addition of the ASSIGN statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 08:16:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171889#M1623305</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-09-05T08:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: converting data types dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171890#M1623306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raymond Giuseppi &lt;/P&gt;&lt;P&gt;thank you,the reply is some thing what i was expecting.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i have more number of internal tables,could you tell me what may be structure of &lt;STRONG&gt;itab2&lt;/STRONG&gt; in your code&lt;/P&gt;&lt;P&gt;and &lt;STRONG&gt;record2&lt;/STRONG&gt;...  is static or dynamic.. &lt;/P&gt;&lt;P&gt;As i was mentioning i have data in field symbol  then &lt;STRONG&gt;itab1&lt;/STRONG&gt;  is static i guess ..if it is so what may be structure of itab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 09:50:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171890#M1623306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-05T09:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: converting data types dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171891#M1623307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you ......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since i am new ,i am asking this question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as i have huge data in internal tables ..and i have many internal tables also .........i cant hard code all the fields ....&lt;/P&gt;&lt;P&gt;can you suggest me any other way where i can do it dynamically..........&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;sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 13:44:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-data-types-dynamically/m-p/8171891#M1623307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-05T13:44:52Z</dc:date>
    </item>
  </channel>
</rss>

