<?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 Display nested table in one grid in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/display-nested-table-in-one-grid/m-p/6068176#M1355114</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 have the following internal tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: BEGIN OF itab_qual OCCURS 0,
        objid TYPE hrobjid,
        proficiency TYPE rating.
DATA: END OF itab_qual.

DATA: BEGIN OF itab_person OCCURS 0,
        pernr TYPE pernr_d,
        ename TYPE emnam,
        tasks LIKE itab_task OCCURS 0.
DATA: END OF itab_person.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I have a table with qualifications and this table is assigned to each person in the second table. Then the nested table itab_person-tasks is filled with the proficiency of each person for each qualification. I need to do it like this because the amount of qualifications can differ, and this way I have a dynamic solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do next is display itab_person in a grid, including the proficiencies of each person for each qualification in the nested table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PERNR	ENAME	QUAL1	QUAL2	QUAL3   
00001	name1	0002	0001 
00002	name2	0002	0001
00003	name3	0001	0001	0002
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do this? It shouldn't be hard, but I think I'm overlooking something, because I can't get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone an idea? &lt;/P&gt;&lt;P&gt;Thanks! &lt;span class="lia-unicode-emoji" title=":monkey_face:"&gt;🐵&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dave Wolles on Aug 26, 2009 3:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Aug 2009 13:52:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-26T13:52:12Z</dc:date>
    <item>
      <title>Display nested table in one grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/display-nested-table-in-one-grid/m-p/6068176#M1355114</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 have the following internal tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: BEGIN OF itab_qual OCCURS 0,
        objid TYPE hrobjid,
        proficiency TYPE rating.
DATA: END OF itab_qual.

DATA: BEGIN OF itab_person OCCURS 0,
        pernr TYPE pernr_d,
        ename TYPE emnam,
        tasks LIKE itab_task OCCURS 0.
DATA: END OF itab_person.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I have a table with qualifications and this table is assigned to each person in the second table. Then the nested table itab_person-tasks is filled with the proficiency of each person for each qualification. I need to do it like this because the amount of qualifications can differ, and this way I have a dynamic solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do next is display itab_person in a grid, including the proficiencies of each person for each qualification in the nested table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PERNR	ENAME	QUAL1	QUAL2	QUAL3   
00001	name1	0002	0001 
00002	name2	0002	0001
00003	name3	0001	0001	0002
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do this? It shouldn't be hard, but I think I'm overlooking something, because I can't get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone an idea? &lt;/P&gt;&lt;P&gt;Thanks! &lt;span class="lia-unicode-emoji" title=":monkey_face:"&gt;🐵&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dave Wolles on Aug 26, 2009 3:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2009 13:52:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/display-nested-table-in-one-grid/m-p/6068176#M1355114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-26T13:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Display nested table in one grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/display-nested-table-in-one-grid/m-p/6068177#M1355115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see its easy.&lt;/P&gt;&lt;P&gt;create a internal table with all the needed fields.&lt;/P&gt;&lt;P&gt;and loop at the tables you have data in.&lt;/P&gt;&lt;P&gt;pass each line to this final table.&lt;/P&gt;&lt;P&gt;and put this final table for ALV display..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2009 17:04:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/display-nested-table-in-one-grid/m-p/6068177#M1355115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-26T17:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Display nested table in one grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/display-nested-table-in-one-grid/m-p/6068178#M1355116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dave Wolles ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab_qual OCCURS 0,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pernr TYPE pernr_d,&lt;/STRONG&gt;          Add this field&lt;/P&gt;&lt;P&gt;        objid TYPE hrobjid,&lt;/P&gt;&lt;P&gt;        proficiency TYPE rating.&lt;/P&gt;&lt;P&gt;DATA: END OF itab_qual.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab_person OCCURS 0,&lt;/P&gt;&lt;P&gt;        pernr TYPE pernr_d,&lt;/P&gt;&lt;P&gt;        ename TYPE emnam,&lt;/P&gt;&lt;P&gt;        tasks LIKE itab_task OCCURS 0.&lt;/P&gt;&lt;P&gt;DATA: END OF itab_person.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab_alv OCCURS 0,&lt;/P&gt;&lt;P&gt;        pernr TYPE pernr_d,&lt;/P&gt;&lt;P&gt;        ename TYPE emnam,&lt;/P&gt;&lt;P&gt;        tasks LIKE itab_task OCCURS 0.&lt;/P&gt;&lt;P&gt;        objid TYPE hrobjid,&lt;/P&gt;&lt;P&gt;        proficiency TYPE rating.&lt;/P&gt;&lt;P&gt;DATA: END OF itab_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab_person.&lt;/P&gt;&lt;P&gt;     READ TABLE  itab_qual WITH KEY  pernr  = itab_person-pernr.&lt;/P&gt;&lt;P&gt;     IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;         MOVE-CORRESPONDIG itab_person TO  itab_alv.&lt;/P&gt;&lt;P&gt;         MOVE-CORRESPONDIG itab_qual      TO itab_alv.&lt;/P&gt;&lt;P&gt;         APPEND itab_alv.&lt;/P&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the internal table &lt;STRONG&gt;itab_alv&lt;/STRONG&gt; in ALV display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this information is help to you.&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;José&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2009 14:35:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/display-nested-table-in-one-grid/m-p/6068178#M1355116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-04T14:35:19Z</dc:date>
    </item>
  </channel>
</rss>

