Skip to Content
avatar image
Former Member

Create database view dynamically within an ALV

Hi everybody,

is it possible to create a database view dynamically at runtime? I have 4 DB with the same key field. At runtime the user should have the possibility to show an own combination of the Databases in an ALV by using checkboxes for eatch DB.

For example Checkbox 1 & 2 => shows in the ALV DB1 and DB2 (same key fields)

For example Checkbox 1 & 4 => shows in the ALV DB1 and DB4 (same key fields)

regards,

Sid

Edited by: Sid on Jul 6, 2009 10:57 AM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 06, 2009 at 09:28 AM

    Hi Sid,

    Can you please be a bit more clear about your requirement. Is it something like depending up on the users choice (checkbox selection) you want to JOIN the corresponding database tables and display the result in the ALV. Is that your question?

    Regards,

    Uday

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 06, 2009 at 09:34 AM

    An ALV table can be used to display a context node, which is built up at runtime i.e, the actual contexts structure isn't known at design time. So depending up on the users selection you should dynamically create the corresponding context node. Try go through this [article |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783]over an ALV with a dynamic context node to get an idea about the same.

    Regards,

    Uday

    Add comment
    10|10000 characters needed characters exceeded