09-17-2015 10:29 PM
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:
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.
09-17-2015 11:25 PM
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
09-17-2015 11:22 PM
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.
09-17-2015 11:25 PM
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
09-17-2015 11:31 PM
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.
09-17-2015 11:41 PM
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.
09-18-2015 12:03 AM
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
09-18-2015 12:15 AM
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
09-18-2015 12:22 AM
The join conditions in view V_EQUI can get you from EQUI to ILOA
EQUI | MANDT | = | EQUZ | MANDT |
EQUI | EQUNR | = | EQUZ | EQUNR |
EQUI | MANDT | = | EQKT | MANDT |
EQUI | EQUNR | = | EQKT | EQUNR |
ILOA | MANDT | = | EQUZ | MANDT |
ILOA | ILOAN | = | EQUZ | ILOAN |
Then the join conditions in view IFLO: can get you to IFLOT
ILOA | MANDT | = | IFLOT | MANDT |
ILOA | ILOAN | = | IFLOT | ILOAN |
ILOA | TPLNR | = | IFLOT | TPLNR |
IFLOT | MANDT | = | IFLOTX | MANDT |
IFLOT | TPLNR | = | IFLOTX | TPLNR |
That should work.
09-18-2015 4:55 PM
Thanks. I tried that and it's still not getting the Lat and Long in the report.
09-18-2015 5:07 PM
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.
09-18-2015 5:07 PM
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'.
09-18-2015 5:41 PM
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.
09-18-2015 8:04 PM
I think joining tables EQUZ and ILOA with field iloan does not work because deletion of prefill zeros.
09-23-2015 3:50 PM
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'.
09-23-2015 3:58 PM
Good of you to put your final answer online. It will help someone in the future.