<?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: deep structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064378#M726099</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;DATA: gt_sernr LIKE SHP_SERNR_UPDATE_T,   "itab using the table type&lt;/P&gt;&lt;P&gt;wa_sernr LIKE LINE OF gt_sernr.    "line of the itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT gt_sernr INTO wa_sernr.&lt;/P&gt;&lt;P&gt;WRITE:/ wa_sernr-SHP_SERNR_UPDATE_S-RFBEL,&lt;/P&gt;&lt;P&gt;wa_sernr-SHP_SERNR_UPDATE_S-RFPOS,&lt;/P&gt;&lt;P&gt;wa_sernr-SHP_SERNR_UPDATE_S-SERNR.   "put a - sign before the field name&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Dec 2007 13:18:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-03T13:18:16Z</dc:date>
    <item>
      <title>deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064370#M726091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii All,&lt;/P&gt;&lt;P&gt;how to access deep strucvture data&lt;/P&gt;&lt;P&gt;in my case &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHP_SERNR_UPDATE_T is a table type and &lt;/P&gt;&lt;P&gt;SHP_SERNR_UPDATE_S is the struture in thi table &lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;how to declare in my program to access this structure and table..&lt;/P&gt;&lt;P&gt;plzz give one example of of this..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 11:21:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064370#M726091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T11:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064371#M726092</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;structures containing internal tables as components or&lt;/P&gt;&lt;P&gt;Internal table containing Structure as components are called Deep Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A nested structure is a structure that contains one or more other structures as components. Flat structures contain only elementary data types with a fixed length (no internal tables, reference types, or strings). The term deep structure can apply regardless of whether the structure is nested or not. Nested structures are flat so long as none of the above types is contained in any nesting level. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any structure that contains at least one internal table, reference type, or string as a component (regardless of nesting) is a deep structure. Accordingly, internal tables, references, and strings are also known as deep data types. The technical difference between deep structures and all others is as follows. When you create a deep structure, the system creates a pointer in memory that points to the real field contents or other administrative information. When you create a flat data type, the actual field contents are stored with the type in memory. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fcc358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fcc358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this link for reading a deep structure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="212928"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF TYPE_DEEP,&lt;/P&gt;&lt;P&gt;MATNR TYPE MATNR, &lt;/P&gt;&lt;P&gt;T_MARC TYPE MARC OCCURS 0,&lt;/P&gt;&lt;P&gt;END OF TYPE_DEEP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: T_DEEP TYPE STANDARD TABLE OF TYPE_DEEP.&lt;/P&gt;&lt;P&gt;DATA: WA_DEEP TYPE TYPE_DEEP.&lt;/P&gt;&lt;P&gt;DATA: T_MARC TYPE TABLE OF MARC.&lt;/P&gt;&lt;P&gt;DATA: S_MARC TYPE MARC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populating data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WA_DEEP-MATNR = 'TEST'.&lt;/P&gt;&lt;P&gt;S_MARC-MATNR = 'TEST'.&lt;/P&gt;&lt;P&gt;S_MARC-WERKS = '9090'.&lt;/P&gt;&lt;P&gt;APPEND S_MARC TO T_MARC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append second level internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WA_DEEP-T_MARC[] = T_MARC[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;APPEND WA_DEEP TO T_DEEP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Process the internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_DEEP INTO WA_DEEP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / WA_DEEP-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PROCESS the second level internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT WA_DEEP-T_MARC INTO S_MARC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: S_MARC-WERKS.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 11:23:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064371#M726092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T11:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064372#M726093</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;DATA: gt_sernr LIKE SHP_SERNR_UPDATE_T,&lt;/P&gt;&lt;P&gt;wa_sernr LIKE LINE OF gt_sernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT gt_sernr INTO wa_sernr.&lt;/P&gt;&lt;P&gt;MOVE 'A' TO wa_sernr-SHP_SERNR_UPDATE_S-field.&lt;/P&gt;&lt;P&gt;MODIFY gt_sernr FROM wa_sernr INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 11:24:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064372#M726093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T11:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064373#M726094</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;DATA: &amp;lt;TABLE&amp;gt;           TYPE SHP_SERNR_UPDATE_T, &lt;/P&gt;&lt;P&gt;           &amp;lt;WORK AREA&amp;gt; TYPE SHP_SERNR_UPDATE_S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can read the table by LOOP or READ TABLE statament&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;TABLE&amp;gt; INTO &amp;lt;WOR AREA&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE &amp;lt;TABLE&amp;gt; INTO &amp;lt;WORK AREA&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there's a table in the structure, you need to declare a new work area like that table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: &amp;lt;WORK AREA 2&amp;gt; TYPE ............

LOOP AT &amp;lt;TABLE&amp;gt; INTO &amp;lt;WOR AREA&amp;gt;.
    LOOP AT &amp;lt;WORK AREA&amp;gt;-ITAB INTO &amp;lt;WORK AREA 2&amp;gt;.
    ENDLOOP.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 11:31:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064373#M726094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T11:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064374#M726095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii.. still not clear with deep structure.. please &lt;/P&gt;&lt;P&gt;in my case &lt;/P&gt;&lt;P&gt;table SHP_SERNR_UPDATE_T&lt;/P&gt;&lt;P&gt;contains SHP_SERNR_UPDATE_S structure inside..&lt;/P&gt;&lt;P&gt;this structure has &lt;/P&gt;&lt;P&gt;vbeln, posnd and sernr fields ..&lt;/P&gt;&lt;P&gt;how to access these from this structure..&lt;/P&gt;&lt;P&gt;please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 11:48:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064374#M726095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T11:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064375#M726096</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 can't understand the relation beetween SHP_SERNR_UPDATE_T&lt;/P&gt;&lt;P&gt;and  SHP_SERNR_UPDATE_S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If SHP_SERNR_UPDATE_T is type table based on SHP_SERNR_UPDATE_S:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: ITAB TYPE SHP_SERNR_UPDATE_T,
           WA  TYPE SHP_SERNR_UPDATE_S.

LOOP AT ITAB INTO WA.
  WRITE: WA-VBELN,
               WA-POSND,
   .................................
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 12:06:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064375#M726096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T12:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064376#M726097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max &lt;/P&gt;&lt;P&gt;in this Fm &lt;/P&gt;&lt;P&gt;SD_DELIVERY_UPDATE_PICKING_1&lt;/P&gt;&lt;P&gt;it contains table type for serial number  SHP_SERNR_UPDATE_T&lt;/P&gt;&lt;P&gt;and structure line type SHP_SERNR_UPDATE_S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHP_SERNR_UPDATE_S-RFBEL &lt;/P&gt;&lt;P&gt;SHP_SERNR_UPDATE_S-RFPOS&lt;/P&gt;&lt;P&gt;SHP_SERNR_UPDATE_S-SERNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to acces sthiese filds i need code in my program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 12:42:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064376#M726097</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T12:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064377#M726098</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;It means the table type SHP_SERNR_UPDATE_T is based on line type SHP_SERNR_UPDATE_S, so just as we said in previous answers you need to loop the table using a work area defined as SHP_SERNR_UPDATE_S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: WA TYPE SHP_SERNR_UPDATE_S.

LOOP AT ITAB INTO WA.

   WRITE: WA-RFBEL, 
               WA-RFPOS,
               WA-SERNR.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 13:13:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064377#M726098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T13:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064378#M726099</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;DATA: gt_sernr LIKE SHP_SERNR_UPDATE_T,   "itab using the table type&lt;/P&gt;&lt;P&gt;wa_sernr LIKE LINE OF gt_sernr.    "line of the itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT gt_sernr INTO wa_sernr.&lt;/P&gt;&lt;P&gt;WRITE:/ wa_sernr-SHP_SERNR_UPDATE_S-RFBEL,&lt;/P&gt;&lt;P&gt;wa_sernr-SHP_SERNR_UPDATE_S-RFPOS,&lt;/P&gt;&lt;P&gt;wa_sernr-SHP_SERNR_UPDATE_S-SERNR.   "put a - sign before the field name&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 13:18:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3064378#M726099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T13:18:16Z</dc:date>
    </item>
  </channel>
</rss>

