<?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: how to make SPLIT command work dynamically using OOP's in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345995#M1231171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;also can u tell me what type should be the internal table t_value?&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; thanks&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the F1 help on split.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Mar 2009 16:20:46 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2009-03-12T16:20:46Z</dc:date>
    <item>
      <title>how to make SPLIT command work dynamically using OOP's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345990#M1231166</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;i am working on uploading .CSV data. After uploading the data we use the command SPLIT to split the data based on delimiter and put into corresponding fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i want to make it work dynamically i.e. once i upload the data i ll write logic to split the data and put into respective fields(making it dynamic).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am able to split the data and find out the structure of internal table but UNABLE TO ASSIGN data to corresponding fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;to findout structure of internal table.&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_data( it_itab ).
it_details[] = ref_descr-&amp;gt;components[].
loop at it_details into wa_comp.
  cnt = cnt + 1.
  wa_fcat-col_pos = cnt.
  wa_fcat-fieldname = wa_comp-name.
  append wa_fcat to t_fcat.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code to split the file based on delimiter.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*LOOP AT wtg_bomb INTO wsg_string.*
*find all occurrences of c_semicolon in wsg_string results result_tab.*
loop at result_tab into wa_reslt.*
  if sy-tabix = 1.*
    str1 = wsg_string+0(wa_reslt-offset).*
    wa_prev_offset  = wa_reslt-offset.*
    wa_prev_offset = wa_prev_offset + 1.*
    clear str1.*
  else.*
    count = wa_reslt-offset - wa_prev_offset.*
    count = count.*
    str2 = wsg_string+wa_prev_offset(count).*
    wa_prev_offset  = wa_reslt-offset.*
    wa_prev_offset = wa_prev_offset + 1.*
  endif.
endloop.*&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this can someone tell me how to workout ot provide the logic u have if u have already worked on this requirement. thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Mar 9, 2009 1:51 PM - modified formatting&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 09:53:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345990#M1231166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T09:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to make SPLIT command work dynamically using OOP's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345991#M1231167</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;can anyone give me some solution ...still watng.i am able to create dynamic internal table but not able to populate dynamically....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 10:09:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345991#M1231167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T10:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to make SPLIT command work dynamically using OOP's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345992#M1231168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at the possibilities of ASSIGN COMPONENT?  Check the F1 help.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;SPLIT AT ... INTO TABLE t_values&lt;/STRONG&gt; to get the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT t_values INTO l_value.
  ASSIGN COMPONENT sy-tabix OF STRUCTURE &amp;lt;ls_dynamic_structure&amp;gt; INTO &amp;lt;l_field&amp;gt;.
  &amp;lt;l_field&amp;gt; = l_value.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where &amp;lt;ls_dynamic_structure&amp;gt; is a work area defined using RTTS, with the required number and type of fields, and &amp;lt;l_field&amp;gt; is a field symbol of type ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 12:55:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345992#M1231168</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-03-09T12:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to make SPLIT command work dynamically using OOP's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345993#M1231169</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;&lt;/P&gt;&lt;P&gt;i tried it but didnt get result. also can u tell me what type should be the internal table t_value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 10:14:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345993#M1231169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T10:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to make SPLIT command work dynamically using OOP's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345994#M1231170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A table with a single column should be appropriate...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA t_values TYPE STANDARD TABLE OF string.
DATA lv_value TYPE string.

LOOP AT t_values INTO lv_value.
....  
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Jose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 11:50:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345994#M1231170</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T11:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to make SPLIT command work dynamically using OOP's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345995#M1231171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;also can u tell me what type should be the internal table t_value?&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; thanks&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the F1 help on split.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 16:20:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-make-split-command-work-dynamically-using-oop-s/m-p/5345995#M1231171</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-03-12T16:20:46Z</dc:date>
    </item>
  </channel>
</rss>

