‎2008 Dec 18 3:11 AM
Hi All,
I am creating a SAP query in the system using the tables KONP,MBEW & A018 i could join tables KONP & MBEW but i am not able to add the table A018 and a error message is displayed
Error Message:
Table A018 cannot be used in a join
Message no. AQ501
Diagnosis
1. You cannot read the selected table with SELECT statements (because, for example, it is a structure without a database table). Therefore, this table cannot be read within a table join either.
2. The chosen table is a pool or cluster table. These tables may not be used in a table join.
Can anyone tell me a alternative to join this table to MBEW & KONP.
I want this Join Conditions:
MBEW-MATNR = A018-MATNR
A018-KAPPL = KONP-KAPPL
A018-KSCHL = KONP-KSCHL
A018-KNUMH = KONP-KNUMH
Thanks & Regards
Andrew
Edited by: Andrew J on Dec 18, 2008 2:49 PM
‎2008 Dec 18 5:53 AM
hi,
use FOR ALL ENTRIES
EXAMPLE:
Exporting all flight data for a specified departure city. The relevant airlines and flight numbers are first put in an internal table entry_tab, which is evaluated in the WHERE condition of the subsquent SELECT statement.
PARAMETERS p_city TYPE spfli-cityfrom.
TYPES: BEGIN OF entry_tab_type,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
END OF entry_tab_type.
DATA: entry_tab TYPE TABLE OF entry_tab_type,
sflight_tab TYPE SORTED TABLE OF sflight
WITH UNIQUE KEY carrid connid fldate.
SELECT carrid connid
FROM spfli
INTO CORRESPONDING FIELDS OF TABLE entry_tab
WHERE cityfrom = p_city.
SELECT carrid connid fldate
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE sflight_tab
FOR ALL ENTRIES IN entry_tab
WHERE carrid = entry_tab-carrid AND
connid = entry_tab-connid.
REGARDS
RAHUL
:
‎2008 Dec 18 5:53 AM
hi,
use FOR ALL ENTRIES
EXAMPLE:
Exporting all flight data for a specified departure city. The relevant airlines and flight numbers are first put in an internal table entry_tab, which is evaluated in the WHERE condition of the subsquent SELECT statement.
PARAMETERS p_city TYPE spfli-cityfrom.
TYPES: BEGIN OF entry_tab_type,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
END OF entry_tab_type.
DATA: entry_tab TYPE TABLE OF entry_tab_type,
sflight_tab TYPE SORTED TABLE OF sflight
WITH UNIQUE KEY carrid connid fldate.
SELECT carrid connid
FROM spfli
INTO CORRESPONDING FIELDS OF TABLE entry_tab
WHERE cityfrom = p_city.
SELECT carrid connid fldate
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE sflight_tab
FOR ALL ENTRIES IN entry_tab
WHERE carrid = entry_tab-carrid AND
connid = entry_tab-connid.
REGARDS
RAHUL
:
‎2009 Apr 14 5:35 AM
‎2012 Jan 17 1:15 PM
Hi,
I am trying a view on A018 for the purpose of datasource creation . Pl post how you resolved it. I need the data in that table to be pushed to BI..
Regards
Vinoth