<?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 read field value from table inside nested structure. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755447#M2022086</link>
    <description>&lt;P&gt;Hi Team&lt;/P&gt;
  &lt;P&gt;i need to read value of field (Check) from the below deep structure , &lt;/P&gt; 
  &lt;P&gt;HRDATA.STAR_CHEQUE-CHEQUE_FPAYHX-CHECK..&lt;/P&gt;
  &lt;P&gt;here HRDATA is structure of /1PYXXFO/ZHR_PAYSTUB.&lt;/P&gt;
  &lt;P&gt;STAR_CHEQUE is table type defined on /1PYXXFO/ZHR_PAYSTUB_____M0030.&lt;/P&gt;
  &lt;P&gt;CHEQUE_FPAYHX is defined on structure FPAYHX&lt;/P&gt;
  &lt;P&gt;CHECK is field of char13 field of FPAYHX.&lt;/P&gt;
  &lt;P&gt;i tried the below code , &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA table_descr TYPE REF TO cl_abap_tabledescr.&lt;BR /&gt;DATA struct_descr TYPE REF TO cl_abap_structdescr.&lt;BR /&gt;DATA columns TYPE abap_compdescr_tab.&lt;BR /&gt;FIELD-SYMBOLs&lt;BR /&gt;&amp;lt;column&amp;gt; LIKE LINE OF columns.&lt;BR /&gt; table_descr
?= cl_abap_typedescr=&amp;gt;describe_by_data( HRDATA-STAR_CHEQUE ).&lt;BR /&gt;struct_descr ?= table_descr-&amp;gt;get_table_line_type( ).&lt;BR /&gt;columns = struct_descr-&amp;gt;components.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;now i went a level where i see the fields of STAR_CHEQUE are moved to field symbol&lt;STRONG&gt; columns&lt;/STRONG&gt;. now how do i read CHEQUE_FPAYHX structure then the filed CHECK?&lt;/P&gt;
  &lt;P&gt;Please help with this?&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;NK&lt;/P&gt;</description>
    <pubDate>Mon, 21 Aug 2023 16:40:30 GMT</pubDate>
    <dc:creator>uirji_netweaver</dc:creator>
    <dc:date>2023-08-21T16:40:30Z</dc:date>
    <item>
      <title>read field value from table inside nested structure.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755447#M2022086</link>
      <description>&lt;P&gt;Hi Team&lt;/P&gt;
  &lt;P&gt;i need to read value of field (Check) from the below deep structure , &lt;/P&gt; 
  &lt;P&gt;HRDATA.STAR_CHEQUE-CHEQUE_FPAYHX-CHECK..&lt;/P&gt;
  &lt;P&gt;here HRDATA is structure of /1PYXXFO/ZHR_PAYSTUB.&lt;/P&gt;
  &lt;P&gt;STAR_CHEQUE is table type defined on /1PYXXFO/ZHR_PAYSTUB_____M0030.&lt;/P&gt;
  &lt;P&gt;CHEQUE_FPAYHX is defined on structure FPAYHX&lt;/P&gt;
  &lt;P&gt;CHECK is field of char13 field of FPAYHX.&lt;/P&gt;
  &lt;P&gt;i tried the below code , &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA table_descr TYPE REF TO cl_abap_tabledescr.&lt;BR /&gt;DATA struct_descr TYPE REF TO cl_abap_structdescr.&lt;BR /&gt;DATA columns TYPE abap_compdescr_tab.&lt;BR /&gt;FIELD-SYMBOLs&lt;BR /&gt;&amp;lt;column&amp;gt; LIKE LINE OF columns.&lt;BR /&gt; table_descr
?= cl_abap_typedescr=&amp;gt;describe_by_data( HRDATA-STAR_CHEQUE ).&lt;BR /&gt;struct_descr ?= table_descr-&amp;gt;get_table_line_type( ).&lt;BR /&gt;columns = struct_descr-&amp;gt;components.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;now i went a level where i see the fields of STAR_CHEQUE are moved to field symbol&lt;STRONG&gt; columns&lt;/STRONG&gt;. now how do i read CHEQUE_FPAYHX structure then the filed CHECK?&lt;/P&gt;
  &lt;P&gt;Please help with this?&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;NK&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 16:40:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755447#M2022086</guid>
      <dc:creator>uirji_netweaver</dc:creator>
      <dc:date>2023-08-21T16:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: read field value from table inside nested structure.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755448#M2022087</link>
      <description>&lt;P&gt;Why do you use RTTI?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 18:49:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755448#M2022087</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-08-21T18:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: read field value from table inside nested structure.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755449#M2022088</link>
      <description>&lt;P&gt;Hi Sandra ,&lt;/P&gt;&lt;P&gt;Thanks for the reply , the above code is reference from another post. now i tried the alternative way , but i see componet of &amp;lt;FS-STRCT2&amp;gt; is not assigning to &amp;lt;FS-STRCT2&amp;gt; . Please suggest&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS : &amp;lt;FS-STRUCT1&amp;gt; TYPE any,&lt;BR /&gt;                &amp;lt;FS-STRUCT2&amp;gt; TYPE ANY ,&lt;BR /&gt;                &amp;lt;fs_wa&amp;gt; type FPAYHX.&lt;BR /&gt;data: lv_comp_name(20) type c value 'CHEQUE_FPAYHX'.&lt;BR /&gt;ASSIGN HRDATA-STAR_CHEQUE[] to &amp;lt;FS-STRUCT1&amp;gt;.&lt;BR /&gt;ASSIGN COMPONENT lv_comp_name OF STRUCTURE &amp;lt;FS-STRUCT1&amp;gt;  TO &amp;lt;FS-STRUCT2&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Aug 2023 19:34:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755449#M2022088</guid>
      <dc:creator>uirji_netweaver</dc:creator>
      <dc:date>2023-08-21T19:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: read field value from table inside nested structure.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755450#M2022089</link>
      <description>&lt;P&gt;Same question for ASSIGN with dynamic naming, isn't your variable HRDATA typed statically? Do you mean that you don't have this line of code (or parameter)?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA hrdata TYPE /1PYXXFO/ZHR_PAYSTUB.&lt;/CODE&gt;&lt;/PRE&gt;If so, you don't need ASSIGN, its components may be accessed directly.&lt;P&gt;PS: minus character in names is obsolete and forbidden in ABAP Objects.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 04:22:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755450#M2022089</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-08-22T04:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: read field value from table inside nested structure.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755451#M2022090</link>
      <description>&lt;P&gt;If your ABAP release is &amp;gt;= 7.40, use:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT hrdata-star_cheque ASSIGNING FIELD-SYMBOL(&amp;lt;line_of_star_cheque&amp;gt;).
  IF &amp;lt;line_of_star_cheque&amp;gt;-cheque_fpayhx IS INITIAL.
    ...
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;PS: I advise using "good" names, bad practice in your code is to name &amp;lt;STRUCT1&amp;gt; a field symbol which refers to the internal table STAR_CHEQUE.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 04:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755451#M2022090</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-08-22T04:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: read field value from table inside nested structure.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755452#M2022091</link>
      <description>&lt;P&gt;Thanks &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; , your inputs solved my issue&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 17:00:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-field-value-from-table-inside-nested-structure/m-p/12755452#M2022091</guid>
      <dc:creator>uirji_netweaver</dc:creator>
      <dc:date>2023-08-22T17:00:31Z</dc:date>
    </item>
  </channel>
</rss>

