Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV with 3 headers

Former Member
0 Likes
1,441

Hi Friends,

My business requirement is to provide a list of Sales revenue report by 3 header field details as the image attached below. This is a dynamic table report output where each month of sales to be listed by Material weight item levels based on country keys. Please guide me which ALV function module or which way I can implement this requirement. This report output also to be exported as excel sheet manually by the user.

Thanks & Regards,

Saravanan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,082

  If columns under each month of sales (i.e) Material weight item levels based on

country keys is constant for every month.

Then you can use 'REUSE_ALV_LIST_DISPLAY' and in TOP_OF_PAGE event you can use conventional Write statement within the loop of no. of months to be print . this is just like hard coding title position

Note: try to adjust the position of printing vertical lines based on your cell width,

         in other ALV methods you cannot merge the cells.

  If columns under each month of sales varies then it is not possible to display in above method.

Hi Friends,

My business requirement is to provide a list of Sales revenue report by 3 header field details as the image attached below. This is a dynamic table report output where each month of sales to be listed by Material weight item levels based on country keys. Please guide me which ALV function module or which way I can implement this requirement. This report output also to be exported as excel sheet manually by the user.

Thanks & Regards,

Saravanan

5 REPLIES 5
Read only

rosenberg_eitan
Active Contributor
0 Likes
1,081

Hi,

As far as I know (prove me wrong some one, Please !!!) there is none .

But I had similar request and finely I settled to generate html and

and pesenting it using excel 😞 .

You can use the span see here http://www.w3schools.com/tags/att_th_colspan.asp

Sample:

<html>

<head>

<title>Insert title here</title>

<style>

table {

    border: 1px solid black;

    border-collapse: collapse;

}

th {

    border: 2px solid black;

    padding: 5px;

    text-decoration: underline;

    color: blue;

    text-align: center;

}

td {

    border: 2px solid black;

    padding: 5px;

    text-align: center;

}

</style>

</head>

<body>

    <table border="1">

        <tr>

            <th colspan="4">1</th>

        </tr>

        <tr>

            <th colspan="2">1</th>

            <th colspan="2">2</th>

        </tr>

        <tr>

            <th>1</th>

            <th>2</th>

            <th>3</th>

            <th>4</th>

        </tr>

        <tr>

            <td>1</td>

            <td>2</td>

            <td>3</td>

            <td>4</td>

        </tr>

        <tr>

            <td>1</td>

            <td>2</td>

            <td>3</td>

            <td>4</td>

        </tr>

        <tr>

            <td>1</td>

            <td>2</td>

            <td>3</td>

            <td>4</td>

        </tr>

        <tr>

            <td>1</td>

            <td>2</td>

            <td>3</td>

            <td>4</td>

        </tr>

    </table>

</body>

</html>

Result:

   

   

Regards.

Read only

Former Member
0 Likes
1,081

We can get but not with merged cells

Read only

former_member209120
Active Contributor
0 Likes
1,081

This message was moderated.

Read only

Former Member
0 Likes
1,083

  If columns under each month of sales (i.e) Material weight item levels based on

country keys is constant for every month.

Then you can use 'REUSE_ALV_LIST_DISPLAY' and in TOP_OF_PAGE event you can use conventional Write statement within the loop of no. of months to be print . this is just like hard coding title position

Note: try to adjust the position of printing vertical lines based on your cell width,

         in other ALV methods you cannot merge the cells.

  If columns under each month of sales varies then it is not possible to display in above method.

Read only

Former Member
0 Likes
1,081

Hi,

Thanks to all.

I will try with your inputs and complete the report. If it matches to my expected requirement I will come back and close this thread with points again.

Regards.