Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error in module RSQL of the database interface

Former Member
0 Kudos

I am trying to input the Latitude and Longitude in a report but I'm not having luck. Can anyone let me know what I'm doing wrong? I found that there are two tables that use the coordinates:

  • IFLOT
  • CI_IFLOT

Thanks.

Category           ABAP Programming Error
Runtime Errors     DBIF_RSQL_INVALID_RSQL
Except.            CX_SY_OPEN_SQL_DB
ABAP Program       Z_CCS_DISCONN_REPORT4

Application Component  PT-RC-AA

=====================================================================================================

data: begin of int_equi occurs 0,
          anlage       like  eastl-anlage,
          sernr          like  equi-sernr,
          matnr         like  equi-matnr, "Material Number SReed 09/08/15
          zzgiscodx  like iflot-zzgiscodx, "Testing Latitude

          zzgiscody  like iflot-zzgiscody, "Testing Longitude
          sparte         like  equi-sparte,
          logiknr        like  eastl-logiknr,
          bis             like  eastl-bis,
       end of int_equi.


=====================================================================================================


select b~anlage e~sernr e~matnr e~sparte c~logiknr c~bis f~zzgiscodx
     into table int_equi
        from            te422 as a
        left outer join eanlh as b   on b~ableinh = a~termschl
        inner      join eastl as c   on c~anlage  = b~anlage
        inner      join egerh as d   on d~logiknr = c~logiknr
        inner      join equi  as e   on e~equnr   = d~equnr
        inner      join iflot as f   on f~SERGE = e~matnr "Testing Coordinates
        where a~portion in s_portn
        and   c~bis ge p_keydt
        and   d~bis ge p_keydt
        and   d~kombinat = 'Z'
        and   e~EQTYP    = 'I'.

     sort int_equi by anlage.



1 ACCEPTED SOLUTION

juan_suros
Contributor
0 Kudos

Shawn,

I think fields zzgiscodx and zzgiscody must have been added to your SAP system. They are not standard SAP fields. The error you are seeing is telling you that either the source table or destination structure does not contain these fields.

At a guess, they were added to structure IFLOT using expansion structure CI_IFLOT. You should be able to confirm this in SE11.

BTW - These fields are not standard fields of table TE422, either.

Good luck,

Juan

14 REPLIES 14

sjeevan
Active Contributor
0 Kudos

Are you sure you meant to join f~SERGE = e~MATNR and not f~SERGE = e~SERGE?

Also zzgiscodx seems to be a custom field.

juan_suros
Contributor
0 Kudos

Shawn,

I think fields zzgiscodx and zzgiscody must have been added to your SAP system. They are not standard SAP fields. The error you are seeing is telling you that either the source table or destination structure does not contain these fields.

At a guess, they were added to structure IFLOT using expansion structure CI_IFLOT. You should be able to confirm this in SE11.

BTW - These fields are not standard fields of table TE422, either.

Good luck,

Juan

0 Kudos

The ZZGISCODX and ZZGISCODY are custom fields. I am trying to figure out how to add these custom fields. I had added the MATNR and that is working fine. It's just the custom fields that I'm having trouble with. I am using IE02 to add the Latitude and Longitude for testing. This is a custom report that has been created. So only the standard fields of table TE422 will only work? I'm new to SAP but I'm learning. Thanks.

0 Kudos

There is no problem with using custom fields, so long as they exist in both the source of data and the destination structure.

FWIW - We used CI_EQUI to add custom fields to serial numbers in IE02. I've never modified IFLOT before.

0 Kudos

This is the IFOT table and I'm trying to bring in the Latitude and Longitude to the report. I'm having trouble trying to add the ZZGISCODX and the ZZGISCODY to the report

sjeevan
Active Contributor
0 Kudos

Hi,

Try this:


select

   b~anlage

   e~sernr

   e~matnr

   e~sparte

   c~logiknr

   c~bis

   f~zzgiscodx

     into corresponding fields of table int_equi

...

or


select

      b~anlage

      e~sernr

      e~matnr

      f~zzgiscodx

      f~zzgiscody

      e~sparte

      c~logiknr

      c~bis

    into table int_equi

0 Kudos

The join conditions in view V_EQUI can get you from EQUI to ILOA

EQUIMANDT=EQUZMANDT
EQUIEQUNR=EQUZEQUNR
EQUIMANDT=EQKTMANDT
EQUIEQUNR=EQKTEQUNR
ILOAMANDT=EQUZMANDT
ILOAILOAN=EQUZILOAN

Then the join conditions in view IFLO: can get you to IFLOT

ILOAMANDT=IFLOTMANDT
ILOAILOAN=IFLOTILOAN
ILOATPLNR=IFLOTTPLNR
IFLOTMANDT=IFLOTXMANDT
IFLOTTPLNR=IFLOTXTPLNR

That should work.

0 Kudos

Thanks. I tried that and it's still not getting the Lat and Long in the report.

sjeevan
Active Contributor
0 Kudos

Are you still getting short dump? If you're not getting short dump but you're not getting any data either into the internal table then there is a problem with your table join.

I'm still not convinced about the following join, because matnr is a 18 char field (master data) and serge is 30 char serial number (transactional data) .

inner join iflot as f on f~SERGE = e~matnr "Testing Coordinates

I don't know your business process so I can't say much about it though.

But one way to test your table join is check the joins using SE16N with one data record.

0 Kudos

Try this:

DATA: BEGIN OF int_equi OCCURS 0,

           anlage     LIKE  eastl-anlage,

           sernr      LIKE  equi-sernr,

           matnr      LIKE  equi-matnr, "Material Number SReed 09/08/15

           sparte     LIKE  equi-sparte,

           logiknr    LIKE  eastl-logiknr,

           bis        LIKE  eastl-bis,

           zzgiscodx  LIKE  iflot-zzgiscodx, "Testing Latitude

           zzgiscody  LIKE  iflot-zzgiscody, "Testing Longitude

        END OF int_equi.

SELECT

   b~anlage

   e~sernr

   e~matnr

   e~sparte

   c~logiknr

   c~bis

   h~zzgiscodx

   h~zzgiscody

INTO TABLE int_equi

FROM            te422 AS a

LEFT OUTER JOIN eanlh AS b   ON b~ableinh EQ a~termschl

INNER JOIN      eastl AS c   ON c~anlage  EQ b~anlage

INNER JOIN      egerh AS d   ON d~logiknr EQ c~logiknr

INNER JOIN      equi  AS e   ON e~equnr   EQ d~equnr

INNER JOIN      equz  AS f   ON f~equnr   EQ e~equnr

INNER JOIN      iloa  AS g   ON g~iloan   EQ f~iloan

INNER JOIN      iflot AS h   ON h~iloan   EQ g~iloan

                            AND h~tplnr   EQ g~tplnr

WHERE a~portion  IN s_portn

  AND c~bis      GE p_keydt

  AND d~bis      GE p_keydt

  AND d~kombinat EQ 'Z'

  AND e~eqtyp    EQ 'I'.

0 Kudos

Thanks. It went through without any errors and there isn't any data for Material Number as well as nothing for the Lat & Long. I appreciate your assistance in helping me with this.

0 Kudos

I think joining tables EQUZ and ILOA with field iloan does not work because deletion of prefill zeros.

0 Kudos

Thanks your assistance really helped me. This is what I used:

SELECT b~anlage h~zzgiscodx h~zzgiscody e~sernr e~matnr e~sparte c~logiknr c~bis "

INTO TABLE int_equi

   FROM                     te422    AS a
   LEFT OUTER JOIN  eanlh   AS b   ON b~ableinh  EQ a~termschl
   INNER JOIN            eastl     AS c   ON c~anlage  EQ b~anlage
   INNER JOIN            egerh   AS d   ON d~logiknr  EQ c~logiknr
   INNER JOIN            equi     AS e   ON e~equnr   EQ d~equnr
   INNER JOIN            v_eger  AS f   ON f~logiknr   EQ c~logiknr
   INNER JOIN            iflot      AS h   ON h~tplnr    EQ f~devloc

   WHERE a~portion  IN s_portn
   AND c~bis             GE p_keydt
   AND d~bis             GE p_keydt
   AND d~kombinat    EQ 'Z'
   AND e~eqtyp         EQ 'I'.

0 Kudos

Good of you to put your final answer online. It will help someone in the future.