<?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: insert into this datastructure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-into-this-datastructure/m-p/12469326#M2000849</link>
    <description>&lt;P&gt;OMG, please try to edit your CODE to (at least) add the proper line feeds... It took me hours to figure what sc_data meant.&lt;BR /&gt;So, your data structure looks like&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;email1   number1  id1
                  id2
                  id3
         number2  id4
                  id5
email2   number3  id6
         number4  id7
                  id8
         number5  id9&lt;IMG alt="" /&gt;&lt;IMG alt="" style="color: inherit;" /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;now, try to explain how are you trying to put data into your table, please... it comes from a single table with those three fields and you want to group them? it comes from more than a table? from calculations?&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jul 2021 09:00:55 GMT</pubDate>
    <dc:creator>VXLozano</dc:creator>
    <dc:date>2021-07-15T09:00:55Z</dc:date>
    <item>
      <title>insert into this datastructure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-into-this-datastructure/m-p/12469324#M2000847</link>
      <description>&lt;P&gt;If you look on the structure below i would like to select and insert data from another table into the id field in the type t_scenario4.&lt;/P&gt;
  &lt;P&gt;if i do insert it into the number field in t_scenario3 it looks like this:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;LOOP AT lt_response ASSIGNING FIELD-SYMBOL(&amp;lt;lfs_rsp&amp;gt;). 
SELECT phone_no AS number FROM zxx_exampletable WHERE example = @&amp;lt;lfs_rsp&amp;gt;-example 
INTO CORRESPONDING FIELDS OF TABLE @&amp;lt;lfs_rsp&amp;gt;-cl_data.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;but i cant figure out the syntax to do the insert into sc-data.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF t_scenario4, 
id TYPE string, 
END OF t_scenario4. 
TYPES: tt_scenario4 TYPE STANDARD TABLE OF t_scenario4 WITH DEFAULT KEY. 

TYPES: BEGIN OF t_scenario3,
number TYPE string, sc_data 
TYPE tt_clearing_scenarios4, 
END OF t_scenario3. 
TYPES: tt_scenario3 TYPE STANDARD TABLE OF t_scenario3 WITH DEFAULT KEY. 

TYPES: BEGIN OF t_json2, 
email TYPE string, 
cl_data TYPE tt_scenario3, 
END OF t_json2. 
TYPES: tt_json2 TYPE STANDARD TABLE OF t_json2 WITH DEFAULT KEY.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Jul 2021 13:56:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-into-this-datastructure/m-p/12469324#M2000847</guid>
      <dc:creator>former_member756616</dc:creator>
      <dc:date>2021-07-14T13:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: insert into this datastructure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-into-this-datastructure/m-p/12469325#M2000848</link>
      <description>&lt;P&gt;Be very very careful if you use SELECT inside a loop. The rule-of-thumb is to never nest a SELECT in a loop.&lt;/P&gt;&lt;P&gt;I guess SELECT cannot store data into a Deep internal table, so you should temporarily define a Flat internal table to store the SELECT results, and after that use ABAP to distribute the lines to the Deep internal table.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 06:52:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-into-this-datastructure/m-p/12469325#M2000848</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-07-15T06:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: insert into this datastructure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-into-this-datastructure/m-p/12469326#M2000849</link>
      <description>&lt;P&gt;OMG, please try to edit your CODE to (at least) add the proper line feeds... It took me hours to figure what sc_data meant.&lt;BR /&gt;So, your data structure looks like&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;email1   number1  id1
                  id2
                  id3
         number2  id4
                  id5
email2   number3  id6
         number4  id7
                  id8
         number5  id9&lt;IMG alt="" /&gt;&lt;IMG alt="" style="color: inherit;" /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;now, try to explain how are you trying to put data into your table, please... it comes from a single table with those three fields and you want to group them? it comes from more than a table? from calculations?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 09:00:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-into-this-datastructure/m-p/12469326#M2000849</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-07-15T09:00:55Z</dc:date>
    </item>
  </channel>
</rss>

