6 Replies Latest reply: Oct 22, 2011 5:40 PM by rome2324 RSS

    SAP Connector: Calling multiple fields with the same name using Join

    Jesper Bagge

      Hi,

      As stated in the topic, I'm trying to call multiple fields with the same name from two tables in SAP using a JOIN statement. However, I get a errormessage saying i have already stated the fieldname once in my query. Would this have been an ordinary MS SQL query i would have used alias to differentiate the two fields. Is there a similar technique I can use when querying SAP using the SAP Connector?

      Example as follows:

       


      SQL SELECT
      EKBE~EBELN
      EKBE~EBELP
      EKBE~EINDT
      EKES~EINDT
      FROM EKBE
      JOIN EKES ON EKBE~EBELN = EKES~EBELN AND EKBE~EBELP = EKES~EBELP;


      The fields EINDT from the tables EKBE and EKES contain different dates, both of great use to my client. However, I cannot seem to load the both in the same query. I know i can join them in the QV part of my script, but these two tables contain a lot of rows and loadtime is an issue.