2011 Apr 12 12:17 PM
hi,
I am displaying data in an alv.
the data consists of multiple documents under multiple vendors.
When i display this data....this is sorted according to vendor.
Now when the line items for a particular vendor are displayed,before that i have to print the vendor name and details.
Vendor-----DocumentType-----Document No
100006
Name: ABDC
Address: xyz
10006--
11123451
10006--
11256453
10006--
63313322
10006--
23214344
100007
Name: ABDC
Address: xyz
100007--
51123459
100007--
51256450
100007--
13313328
100007--
13214340
How do i achieve this?
Thanks in advance,
Shraddha
Edited by: shraddha85 on Apr 12, 2011 1:18 PM
Edited by: shraddha85 on Apr 12, 2011 1:20 PM
2011 Apr 12 1:07 PM
Hi,
I think you need Hierarchical display
try out this Fm instead of GRID 'REUSE_ALV_HIERSEQ_LIST_DISPLAY',
Pass header table and item table, this will fullfill the requirement, I suppose.
Regards,
Anmol.
dear Shraddha,
Better you use the Hierarchical display what Anmol said. you just pass the header table as the vendor itab and in the item table you just pass the item itab.
in the IS_KEYINFO you just pass the vendor number in HEADER01 = 'LIFNR' and ITEM01 = 'LIFNR'. Hope it will help full.
Click the link for example of Hierarchical display .
http://learningabap.wordpress.com/2007/04/11/abap-alv-hirarchial-sequential-display/
Regards,
Dhina..
2011 Apr 12 12:32 PM
hi
before populating your final internal table to "REUSE_ALV_GRID_DISPLAY" maipulate your internal table within loop or using control break statements , like AT NEW customer/vendor.
-anjali
2011 Apr 12 12:45 PM
how will that help?
are you suggesting that i call REUSE_ALV_GRID_DISPLAY in a loop?
i dont want that..
thanks
shraddha
2011 Apr 12 12:53 PM
no m not suggesting that u shld use "REUSE_ALV_GRID_DISPLAY' in loop.
form a table it_final and do all the manipulations on it (format it in the way you want output) and then pass it to "REUSE_ALV_GRID_DISPLAY' .
2011 Apr 12 1:00 PM
thts exactly how i have created it_final.
it contains data like this-
10006--
11123451
10006--
11256453
10006--
63313322
10006--
23214344
100007--
51123459
100007--
51256450
100007--
13313328
100007--
13214340
but i cant insert vendor name and details in this table
2011 Apr 12 1:07 PM
Hi,
I think you need Hierarchical display
try out this Fm instead of GRID 'REUSE_ALV_HIERSEQ_LIST_DISPLAY',
Pass header table and item table, this will fullfill the requirement, I suppose.
Regards,
Anmol.
2011 Apr 12 2:02 PM
Hi Shraddha,
I think what Anmol's view is correct as per your requirment.
If so, you can check this program for refference
BCALV_TEST_FULLSCREEN_EXCEPT
Regards
HM
2011 Apr 12 2:26 PM
dear Shraddha,
Better you use the Hierarchical display what Anmol said. you just pass the header table as the vendor itab and in the item table you just pass the item itab.
in the IS_KEYINFO you just pass the vendor number in HEADER01 = 'LIFNR' and ITEM01 = 'LIFNR'. Hope it will help full.
Click the link for example of Hierarchical display .
http://learningabap.wordpress.com/2007/04/11/abap-alv-hirarchial-sequential-display/
Regards,
Dhina..
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |