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 display

Former Member
0 Likes
1,096

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--


KA--


11123451

10006--


KB--


11256453

10006--


KA--


63313322

10006--


KB--


23214344

100007

Name: ABDC

Address: xyz

100007--


CA--


51123459

100007--


CB--


51256450

100007--


CA--


13313328

100007--


CB--


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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,051

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.

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--


KA--


11123451

10006--


KB--


11256453

10006--


KA--


63313322

10006--


KB--


23214344

100007

Name: ABDC

Address: xyz

100007--


CA--


51123459

100007--


CB--


51256450

100007--


CA--


13313328

100007--


CB--


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

7 REPLIES 7
Read only

Former Member
0 Likes
1,051

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

Read only

0 Likes
1,051

how will that help?

are you suggesting that i call REUSE_ALV_GRID_DISPLAY in a loop?

i dont want that..

thanks

shraddha

Read only

0 Likes
1,051

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' .

Read only

0 Likes
1,051

thts exactly how i have created it_final.

it contains data like this-

10006--


KA--


11123451

10006--


KB--


11256453

10006--


KA--


63313322

10006--


KB--


23214344

100007--


CA--


51123459

100007--


CB--


51256450

100007--


CA--


13313328

100007--


CB--


13214340

but i cant insert vendor name and details in this table

Read only

Former Member
0 Likes
1,052

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.

Read only

Former Member
0 Likes
1,051

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

Read only

Former Member
0 Likes
1,051

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..