Reputation: 21
I got a request from user to develop a report that show the invoice detail in one display.
All I found was how to show two different tables in the same page.
Is there a way to show it in the same table but with two header?
It's something like this.
HD Billing Doc. Doc. Currency Sales Org Distr. Channel Billing Date
IT Item Billed qty Sales unit Net weight Net value
HD 900230006 USD JH01 01 05.01.2014
IT 10 60 KG 60 1000
IT 20 20 BAG 20 4000
HD 900230007 EUR JH01 01 05.01.2014
IT 10 22 KG 22 990
IT 20 67 BAG 67 456
IT 30 15 KG 15 897
Upvotes: 2
Views: 2560
Reputation: 3687
You can use ALV functionality to do this.
You can use the ALV object model to apply tables in three different ways:
- as a simple, two-dimensional table ( CL_SALV_TABLE class)
- as a hierarchically-sequential table
- The following paragraphs relate to this table. as a tree structure ( CL_SALV_TREE class)
See program SALV_DEMO_TREE_SIMPLE or SALV_DEMO_HIERSEQ_SIMPLE in package SALV_OM_OBJECTS as an examples. The class documentation is also pretty good.
Alternatively you can try using function module REUSE_ALV_HIERSEQ_LIST_DISPLAY, but this is older functionality
Functionality This module outputs two internal tables as a formated hierarchical-sequential list.
Principle:
- Pass an internal table containing the set of header information to be output.
- Pass an internal table containing the set of item information to be output.
- Pass a structure containing the general list layout details
- Pass a field catalog in the form of an internal table. The field catalog describes the fields to be output in the list.
See program BCALV_TEST_HIERSEQ_LIST in package SLIS as an example.
Upvotes: 2