<?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: ALV report with variable rows in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291890#M1989505</link>
    <description>&lt;P&gt;Look for some SAP samples at transaction DWDM (&lt;A href="https://wiki.scn.sap.com/wiki/display/ABAP/Examples+and+demos+by+SAP"&gt;Examples and demos by SAP&lt;/A&gt;) for sample of gui tree.or a tool such as &lt;A href="https://github.com/sapmentors/abap2xlsx"&gt;Abap2Xlxsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But IMHO if you want a not too complicated ALV report you should use a single format for header/footer an another format for detail so you can use the ALV block/hierarchy tool (and use a total row to simulate the footer display.)&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2020 08:48:10 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2020-12-16T08:48:10Z</dc:date>
    <item>
      <title>ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291881#M1989496</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
  &lt;P&gt;I have a requirement to display an alv report for below scenario.&lt;/P&gt;
  &lt;P&gt;Header1&lt;/P&gt;
  &lt;P&gt;Details&lt;/P&gt;
  &lt;P&gt;Footer&lt;/P&gt;
  &lt;P&gt;---&lt;/P&gt;
  &lt;P&gt;Header2&lt;/P&gt;
  &lt;P&gt;Details&lt;/P&gt;
  &lt;P&gt;Footer.&lt;/P&gt;
  &lt;P&gt;--&lt;/P&gt;
  &lt;P&gt;The above no. of blocks may vary based on report selection.&lt;/P&gt;
  &lt;P&gt;I need to know how can we build multiple field catalogs and pass field catalog and data from my internal table to build the above scenario.&lt;/P&gt;
  &lt;P&gt;Note: My Internal table is having data in below format and I am using the same to generate output txt file. I need to show the similar details in alv.&lt;/P&gt;
  &lt;P&gt;Internal Table Data:&lt;/P&gt;
  &lt;P&gt;Header1&lt;/P&gt;
  &lt;P&gt;Details Record 1&lt;/P&gt;
  &lt;P&gt;Details Record 2&lt;/P&gt;
  &lt;P&gt;Details Record 3&lt;/P&gt;
  &lt;P&gt;Footer ( remains constant )&lt;/P&gt;
  &lt;P&gt;Header2&lt;/P&gt;
  &lt;P&gt;Details Record 1&lt;/P&gt;
  &lt;P&gt;Details Record 2&lt;/P&gt;
  &lt;P&gt;Details Record 3&lt;/P&gt;
  &lt;P&gt;Footer ( remains constant )&lt;/P&gt;
  &lt;P&gt;and so on..&lt;/P&gt;
  &lt;P&gt;Thankyou for all your help.&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Dheeraj&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 01:18:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291881#M1989496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-12-15T01:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291882#M1989497</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;You can do this by using block ALV.

DATA :  IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV, 
        T_LAYOUT TYPE SLIS_LAYOUT_ALV,
        T_EVENT1 TYPE SLIS_T_EVENT,
        T_EVENT2 TYPE SLIS_T_EVENT.

DATA :  B1_IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
        B1_WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

DATA :  B2_IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
        B2_WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  BLOCK1_ALV
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM BLOCK1_ALV.


CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
      I_CALLBACK_PROGRAM       = SY-REPID.


" Block 1 - 
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    IS_LAYOUT                        = T_LAYOUT
    IT_FIELDCAT                      = B1_IT_FIELDCAT
    I_TABNAME                        = 'BLOCK1'
    IT_EVENTS                        = T_EVENT1
*   IT_SORT                          =
*   I_TEXT                           = ' '
  TABLES
    T_OUTTAB                         = BLOCK1
  EXCEPTIONS
   PROGRAM_ERROR                     = 1
   MAXIMUM_OF_APPENDS_REACHED        = 2
   OTHERS                            = 3
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
ENDIF.

" Block 2
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    IS_LAYOUT                        = T_LAYOUT
    IT_FIELDCAT                      = B2_IT_FIELDCAT
    I_TABNAME                        = 'BLOCK2'
    IT_EVENTS                        = T_EVENT2
*   IT_SORT                          =
*   I_TEXT                           = ' '
  TABLES
    T_OUTTAB                         = BLOCK2
  EXCEPTIONS
   PROGRAM_ERROR                     = 1
   MAXIMUM_OF_APPENDS_REACHED        = 2
   OTHERS                            = 3
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
ENDIF.


CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
*    EXPORTING
*      I_INTERFACE_CHECK = ' '
*    EXCEPTIONS
*      PROGRAM_ERROR     = 1
*      OTHERS            = 2.
.


ENDFORM.                    " BLOCK1_ALV
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Dec 2020 01:45:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291882#M1989497</guid>
      <dc:creator>former_member637331</dc:creator>
      <dc:date>2020-12-15T01:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291883#M1989498</link>
      <description>&lt;P&gt;Thankyou Suresh!&lt;/P&gt;&lt;P&gt;Do you mean B1_IT_FIELDCAT is for header record and B2_IT_FIELDCAT is for detail record?&lt;/P&gt;&lt;P&gt;My actual data is somewhat like below:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;1st row is header row and last row is footer. Middle rows are details and they can vary.&lt;/P&gt;&lt;P&gt;This is one block and I can have multiple such blocks of data in my output.&lt;/P&gt;&lt;P&gt;Could you please provide some more details to achieve the desired output?&lt;/P&gt;&lt;P&gt;Appreciate all your help!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dheeraj&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 02:02:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291883#M1989498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-12-15T02:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291884#M1989499</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/1868853-sample-data.jpg"&gt;sample-data.jpg&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 02:04:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291884#M1989499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-12-15T02:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291885#M1989500</link>
      <description>&lt;P&gt;ALV block, or tab strip, or splitter, etc. What did you search, what did you find, what did you try, what do you think?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 04:44:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291885#M1989500</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-12-15T04:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291886#M1989501</link>
      <description>&lt;UL&gt;
&lt;LI&gt;Among the &lt;A href="https://help.sap.com/viewer/search?q=main+alv+classes"&gt;main classes of ALV&lt;/A&gt;, which ones have you already considered?&lt;/LI&gt;&lt;LI&gt;Is usage of ALV mandatory?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;Hint: Look at some samples such as &lt;A href="https://archive.sap.com/kmuuid2/b0f03986-046c-2910-a5aa-e5364e96ea2c/ALV%20Object%20Model%20-%20Hierarchical%20Sequential%20List%20-%20The%20Basics.pdf"&gt;ALV Object Model – Hierarchical Sequential List – The Basics&lt;/A&gt; which use CL_SALV_HIERSEQ_TABLE.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 09:02:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291886#M1989501</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2020-12-15T09:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291887#M1989502</link>
      <description>&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P&gt;Thankyou for sharing the valuable inputs. This may be helpful at some point.&lt;/P&gt;&lt;P&gt;However for now, my requirement is bit different.&lt;/P&gt;&lt;P&gt;I have the data in the single internal table of type string ( which i am using to generate the output file )&lt;/P&gt;&lt;P&gt;The output is 3 variable rows of data:&lt;/P&gt;&lt;P&gt;1. Type 1 records are Header ( This is not the header of the report ). For example: These record provide the date range and company details etc.&lt;/P&gt;&lt;P&gt;2.Type 2 records are Details. These records have punch in , punch out details for the employees.&lt;/P&gt;&lt;P&gt;3.Type 3 record. This is a constant footer.&lt;/P&gt;&lt;P&gt;I have the entire data in a single table.&lt;/P&gt;&lt;P&gt;These 3 types of records have their own field names ( for example: Type 1 will have, company name, rep id etc. Type 2 will have punch in , punch out etc,)&lt;/P&gt;&lt;P&gt;The only thing that i am looking for is how can I have generate ALV output for above mentioned 3 types of data records and pass their field descriptions accordingly.&lt;/P&gt;&lt;P&gt;The Binding method using Main Class - CL_SALV_HIERSEQ_TABLE should work for 2 variable data records as per example shared by you, however in my case I have 3 types of data records and don't have a common column for 3rd Type ( footer ) to bind. Also not sure if the binding works for more than 2 data records.&lt;/P&gt;&lt;P&gt;I am new to ALV. Any Inputs are highly appreciated!&lt;/P&gt;&lt;P&gt;Thankyou!&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 13:03:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291887#M1989502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-12-15T13:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291888#M1989503</link>
      <description>&lt;P&gt;Could you then elaborate on: 'Footer ( remains constant )' - There is no data in this record, it seems only to exist to record the end of a document, why would you display it?&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If this record is not actually required you can use CL_SALV_HIERSEQ_TABLE which handles two  level (e.g.header, item)&lt;/LI&gt;&lt;LI&gt;If you want to display this 3rd record, it won't be as easy with ALV (personally I would then go on a html display - xml viewer like)&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 15 Dec 2020 13:56:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291888#M1989503</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2020-12-15T13:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291889#M1989504</link>
      <description>&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P&gt;The client requirement is to display the 3 footer record.&lt;/P&gt;&lt;P&gt;Could you please share some details for alternate method that you have proposed.(html display )&lt;/P&gt;&lt;P&gt;Thankyou!&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 22:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291889#M1989504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-12-15T22:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291890#M1989505</link>
      <description>&lt;P&gt;Look for some SAP samples at transaction DWDM (&lt;A href="https://wiki.scn.sap.com/wiki/display/ABAP/Examples+and+demos+by+SAP"&gt;Examples and demos by SAP&lt;/A&gt;) for sample of gui tree.or a tool such as &lt;A href="https://github.com/sapmentors/abap2xlsx"&gt;Abap2Xlxsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But IMHO if you want a not too complicated ALV report you should use a single format for header/footer an another format for detail so you can use the ALV block/hierarchy tool (and use a total row to simulate the footer display.)&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 08:48:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291890#M1989505</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2020-12-16T08:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: ALV report with variable rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291891#M1989506</link>
      <description>&lt;P&gt;Thankyou Suresh!&lt;/P&gt;&lt;P&gt;I was able to achieve the required functionality using the ALV Blocked LIST.&lt;/P&gt;&lt;P&gt;Created 3 Field Catalogs ( for header, detail and footer ) with 3 internal tables and Appended appropriate data using FM 'REUSE_ALV_BLOCK_LIST_APPEND'. And Finally using FM 'REUSE_ALV_BLOCK_LIST_DISPLAY' for displaying.&lt;/P&gt;&lt;P&gt;reference: &lt;A href="http://saptechnical.com/Tutorials/ALV/BlockedList/DemoPrg.htm" target="test_blank"&gt;http://saptechnical.com/Tutorials/ALV/BlockedList/DemoPrg.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Dheeraj&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 17:55:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-with-variable-rows/m-p/12291891#M1989506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-12-16T17:55:20Z</dc:date>
    </item>
  </channel>
</rss>

