Skip to Content
avatar image
Former Member

Merging Two Tables from BAPI into single VC Table

Hi all,

I'm trying to take the output of a single BAPI that returns two tables. These tables have one piece of common data between them and are related to each other (1:1). I thought I could use the UNION operator to combine/merge both of these tables. I assumed that I would get a new VC table with columns from both BAPI tables. Instead, only the common piece (key) is available in the new VC table. Is what I am trying to do possible without backend modification ? Is there a workaround or other operator in VC that can do this for me. The combine operator appears to only output a form, which is not what I am trying to do.

Thanks, John

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jun 12, 2007 at 06:27 PM

    That's a wrong understanding of the UNION command. The UNION command (like in SQL statements) stitches the tables row-wise, not column wise. This works best, if both tables have the same field names. As you can see, the limitation in VC even is that it uses and displays only fields with the same name.

    BUT: this is a very performance intensive command.

    If you want to JOIN them, then you need to use the JOIN operator. But again: also this is time-consuming.

    I highly recommend to have the two outputs joined already in the backend as a separate BAPI and use that one table then for display in VC. This works much faster.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member


      Thanks, just wanted to see if this could be accomplished on the modeling side. Trying to use standard SAP BAPI that returns related information in 2 separate tables. I now know not to dig any deeper on the VC side.