Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Exception CX_SY_OPEN_SQL_DB within Select statement with JOIN

Hi,

I have a problem with a select statement. The exception CX_SY_OPEN_SQL_DB" is raised.

Below you can see my coding. Within the range for the AWKEY I have only one single entry. Therefore there should not be too many values within the where condition. What else can be wrong?

TYPES: BEGIN OF mm_fi_inv_join,
    bukrs TYPE bukrs,
    belnr TYPE belnr,
    gjahr TYPE gjahr,
    koart TYPE koart,
    augdt TYPE augdt,
    augbl TYPE augbl,
    END OF mm_fi_inv_join.

 

 

  FIELD-SYMBOLS: <lt_mm_fi_inv>     TYPE ANY TABLE.

 

  DATA: lt_mm_fi_inv            TYPE REF TO data.


CREATE DATA lt_mm_fi_inv TYPE TABLE OF mm_fi_inv_join.
  ASSIGN lt_mm_fi_inv->* TO <lt_mm_fi_inv>.

  SELECT bkpf~bukrs bkpf~belnr bkpf~gjahr bsak~augdt bsak~augbl
    FROM bkpf
      INNER JOIN bsak
    ON bkpf~bukrs = bsak~bukrs
    AND bkpf~belnr = bsak~belnr
    AND bkpf~gjahr = bsak~gjahr
    INTO CORRESPONDING FIELDS OF TABLE <lt_mm_fi_inv>
    WHERE bkpf~awkey IN lr_awkey.


Thanks and Regards

Tom

Former Member
Not what you were looking for? View more on this topic or Ask a question