Skip to Content

Two ALV's in one view

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    Posted on May 02, 2012 at 09:35 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 02, 2012 at 06:00 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 02, 2012 at 06:11 AM

    Hi Venkat,

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

    SALV_WD_TABLE.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 02, 2012 at 06:21 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 02, 2012 at 07:23 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 03, 2012 at 08:27 AM

    I must say, I'm surprised that @Thomas Jung 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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 03, 2012 at 05:26 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.