<?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: Accessing Deep Structure Components in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-deep-structure-components/m-p/765692#M37576</link>
    <description>&lt;P&gt;Thanks Ryan, you pointed me the direction I needed.  I am now getting the structure reference and then using that to do a get_relative_name, which returns the proper PTS_ADDRESS, then I can do the describe_by_name and get components.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jan 2019 19:51:07 GMT</pubDate>
    <dc:creator>DonnaA</dc:creator>
    <dc:date>2019-01-24T19:51:07Z</dc:date>
    <item>
      <title>Accessing Deep Structure Components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-deep-structure-components/m-p/765690#M37574</link>
      <description>&lt;P&gt;I want to access the Data Field names and Data in a deep structure. The Deep structure contains data fields and 2 flat structures. The 2 structures are of the same Type, see snippet below.&lt;/P&gt;
  &lt;P&gt;The problem is that I do not want to hard code the PTS_ADDRESS for the structure name to access the data fields and data in the shipfr_address and shipto_address components.&lt;/P&gt;
  &lt;P&gt;Can someone please provide me the proper method to get to that data, dynamically? If I pass the shipfr_address as the name in the describe_by_name method, then it fails, because that name does not exist.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ptw_pallet_label,
         printer          TYPE rspolname,     " Printer Long name
         btw_file         TYPE char30,        " Bartender File Name
         copies           TYPE char2,         " Number of Copies
         shipfr_address   TYPE pts_address,   " Ship-From  &amp;lt;--Structure
         shipto_address   TYPE pts_address,   " Ship-To    &amp;lt;--Structure
         shipto_pstlz     TYPE char20,        " Ship-To Postal Code w/ Prefix
         bolnr            TYPE bolnr,         " Bill of Lading
       END OF ptw_pallet_label.
TYPES: pti_pallet_label TYPE STANDARD TABLE OF ptw_pallet_label.

*&amp;amp; Currently using the following to access the data fields, 
*&amp;amp; So how to complete this without having it hardcoded?
   gw_comp_strucname = 'PTS_ADDRESS'.
   go_comp_structdescr ?= cl_abap_typedescr=&amp;gt;describe_by_name( gw_comp_strucname ).
   gi_comp_structure = go_structdescr-&amp;gt;get_components( ).


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jan 2019 17:08:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-deep-structure-components/m-p/765690#M37574</guid>
      <dc:creator>DonnaA</dc:creator>
      <dc:date>2019-01-24T17:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Deep Structure Components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-deep-structure-components/m-p/765691#M37575</link>
      <description>&lt;P&gt;Hi Donna,&lt;/P&gt;&lt;P&gt;I have used the method 'describe_by_data' in the past for reading information dynamically in nested structures.  You can retrieve a structure reference for what you are interested in by giving the relevant structure as input to the method and then read the components from that.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Ryan Crosby&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 17:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-deep-structure-components/m-p/765691#M37575</guid>
      <dc:creator>Ryan-Crosby</dc:creator>
      <dc:date>2019-01-24T17:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Deep Structure Components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-deep-structure-components/m-p/765692#M37576</link>
      <description>&lt;P&gt;Thanks Ryan, you pointed me the direction I needed.  I am now getting the structure reference and then using that to do a get_relative_name, which returns the proper PTS_ADDRESS, then I can do the describe_by_name and get components.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 19:51:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-deep-structure-components/m-p/765692#M37576</guid>
      <dc:creator>DonnaA</dc:creator>
      <dc:date>2019-01-24T19:51:07Z</dc:date>
    </item>
  </channel>
</rss>

