<?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 deep structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3194679#M761246</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;                I have a deep structure......hw to write select statement for tht..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2007 13:46:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-13T13:46:33Z</dc:date>
    <item>
      <title>deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3194679#M761246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;                I have a deep structure......hw to write select statement for tht..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 13:46:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3194679#M761246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T13:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3194680#M761247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it's a structure you cannot perform a SELECT statement...&lt;/P&gt;&lt;P&gt;What's the name of this deep struc?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 13:54:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3194680#M761247</guid>
      <dc:creator>former_member199581</dc:creator>
      <dc:date>2007-12-13T13:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3194681#M761248</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;In a Deep structures you can have data, tables, structures, objects and etc. We can create a Deep internal table based on deep structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also is possible create Deep transparent table. And you can use the SELECT with a deep table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no difference with Deep transparent table and Deep Internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at follow example, i hope it solve your doubts !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT zmar.

CLASS main DEFINITION.

  PUBLIC SECTION.

    DATA t_sflight TYPE TABLE OF sflight.
    DATA e_sflight TYPE sflight.

ENDCLASS.                    "main DEFINITION


" Structure
DATA: BEGIN OF e_data,
        field1 TYPE char01,
        field2 TYPE char01,
        field3 TYPE char01,
       END OF e_data.

* Table without header line
DATA: t_table LIKE STANDARD TABLE OF e_data.

* Deep Structure
DATA: BEGIN OF e_deep_struc,
         struc  TYPE spfli,    "structure of table SPFLI
         table  LIKE t_table,  "Internal table like t_data
         o_main TYPE REF TO main, "Object Reference of class main
      END OF e_deep_struc.

"Internal table with structure of e_table
DATA t_deep_table LIKE STANDARD TABLE OF e_deep_struc.

" Your Deep table will like this
* STRUC
*  SPFLI-MANDT
*  SPFLI-CARRID
*  SPFLI-CONNID
*  SPFLI-COUNTRYFR
*  SPFLI-CITYFROM
*  SPFLI-AIRPFROM
*  SPFLI-COUNTRYTO
*  SPFLI-CITYTO
*  SPFLI-AIRPTO
*  SPFLI-FLTIME
*  SPFLI-DEPTIME
*  SPFLI-ARRTIME
*  SPFLI-DISTANCE
*  SPFLI-DISTID
*  SPFLI-FLTYPE
*  SPFLI-PERIOD
*TABLE
*   Table[initial]
*O_MAIN
* {O:5*PROGRAM=&amp;lt;PROGRAM&amp;gt;CLASS=MAIN}

START-OF-SELECTION.

  " Select only one line into a structure struc of e_deep_struc
  SELECT *
    FROM spfli
    INTO e_deep_struc-struc
    UP TO 1 ROWS.
  ENDSELECT.

  IF sy-subrc IS INITIAL.
    "   Populate e_data
    DO 3 TIMES.
      MOVE: 'A' TO e_data-field1,
            'B' TO e_data-field2,
            'C' TO e_data-field3.

      "     Populate table of e_deep_struc with values of e_data
      APPEND e_data TO e_deep_struc-table.

      "     Create an object o_main of structure e_deep_struc
      CREATE OBJECT e_deep_struc-o_main.

    ENDDO.

"     Insert line into table T_SFLIGHT of object O_MAIN
      SELECT *
      FROM sflight
      INTO TABLE e_deep_struc-o_main-&amp;gt;t_sflight
      UP TO 3 ROWS.

"   Populate the internal table t_deep_table with values of structure e_deep_struc
    APPEND e_deep_struc TO t_deep_table.
    CLEAR e_deep_struc.

  ENDIF.

  IF NOT t_deep_table IS INITIAL.

    WRITE 'Content of T_DEEP_TABLE-STRUC'.

"   Read all field of internal table t_deep_table into structure e_deep_struc
    LOOP AT t_deep_table INTO e_deep_struc.

      WRITE: / e_deep_struc-struc-carrid,
               e_deep_struc-struc-connid,
               e_deep_struc-struc-countryfr.

      WRITE / 'Content of T_DEEP_TABLE-TABLE'.

      "      Do It
*      MOVE e_deep_struc-table TO t_table.
*      LOOP AT t_table INTO e_data ......
*        WRITE: e_data-field1,
*               e_data-field2,
*               e_data-field3.
*      ENDLOOP.

*     Or Just do it
      LOOP AT e_deep_struc-table INTO e_data.

        WRITE: / e_data-field1,
                 e_data-field2,
                 e_data-field3.

      ENDLOOP.

      WRITE / 'Content of T_DEEP_TABLE-O_MAIN-&amp;gt;T_SFLIGHT'.

"     Read the internal table t_sflight of object o_main from structure e_deep_struc
      LOOP AT e_deep_struc-o_main-&amp;gt;t_sflight INTO e_deep_struc-o_main-&amp;gt;e_sflight.

        WRITE: / e_deep_struc-o_main-&amp;gt;e_sflight-carrid,
                 e_deep_struc-o_main-&amp;gt;e_sflight-connid,
                 e_deep_struc-o_main-&amp;gt;e_sflight-fldate.

      ENDLOOP.
      CLEAR e_deep_struc.
    ENDLOOP.
  ENDIF.
&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;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 15:31:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deep-structure/m-p/3194681#M761248</guid>
      <dc:creator>marcelo_ramos1</dc:creator>
      <dc:date>2007-12-13T15:31:41Z</dc:date>
    </item>
  </channel>
</rss>

