cancel
Showing results for 
Search instead for 
Did you mean: 

Two ALV's in one view

former_member672218
Participant
0 Kudos

Hello,

I would like to display two alv's in one view.I did go through this link

http://wiki.sdn.sap.com/wiki/display/Snippets/Web+Dynpro+ABAP+-+Multiple+ALV+Component+Usages

by thomas and it was pretty helpful. The only issue is that the output is not to be displayed in two tab strips but i want the alv output one below the

other.

I created two view containers and placed two views in it. The problem that i have in the interface controller of the ALV, i have to link the context node

to the DATA node of the ALV. I have two alv's inside this view with two different context nodes. I am able to only bind one context node to the DATA. Hence

in the output, i get two alv's, one filled with data and the other a blank ALV.How will i get this fixed?

Regards,

Venkat

Accepted Solutions (1)

Accepted Solutions (1)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

You can create another component usuage in the same way as you had done the first.

I am creating here 4 grids.Check the below link for step by step explanation.

http://scn.sap.com/docs/DOC-2346

Answers (6)

Answers (6)

former_member672218
Participant
0 Kudos

Thanks to every one of you. Your thoughts helped me fix it. Wonder how i didn't think of using mulitple alv components for the main view. It works now.

Regards,

Venkat Varadan

TomVanDoo
Active Contributor
0 Kudos

I must say, I'm surprised that recommends 2 hardcoded component usages, instead of a component usage Group. Ah well, anyone can have an off-day, or it may have been a different functional context.

In any case, I would recommend using the principle of a component usage group

described on help.sap.com

On the same page, there's also an alternative approach in which you dynamically duplicate a used component.

Both alternatives are viable options, although I like the "Group" a lot more.

basically, you only define the component usage once, but then you start creating multiple instances (which are stored in your group, or in an internal table). Each instance has it's own config and data. The big advantage here is, that you are not tied to the number of pre-defined component usages, but you can dynamically add new usages. (of the same type)

So instead of 2 ALV's, you could have 10, or 1.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I guess its a matter of preference.  I like to see my component usages visible on the properies tab and not down within the code unless I'm truely using dynamic component usages.

Former Member
0 Kudos

Hi venkat it is possible to create multiple ALV'S in one view declare alv component 2 times with different component usage names..

then go to view properties declare the two interfaces in view used controllers..

remaining all are the process as alv creation in webdynpro abap...

other wise go through the thread..

http://scn.sap.com/thread/1963845

http://www.scribd.com/doc/3335981/Creating-a-WebDynpro-ALV-Application

former_member199126
Participant
0 Kudos

Varadhan, Please use 2 ALV Component in "COMPONENTCONTROLLER" insted of one. You cannot use one ALV component and make use of that to display two different contents.

Also chenck under Component usage, under your ALV component,under properties tab, add the WD component name. Also make sure that the binding is done properly.

chengalarayulu
Active Contributor
0 Kudos

Hi Venkat,

you should use 2 ALV components and make sure the bindings to DATA node different.

SALV_WD_TABLE.

farooq_basha
Active Participant
0 Kudos

Hi Venkat,

Check whether you are using '2' SALV_WD_TABLE used component. Make use of 2 SALV_WD_TABLE component. Bind node1 with DATA of this component 1 and similary do for second table .

Regards,

Farooq