Skip to Content
author's profile photo Former Member
Former Member

SAP Query Creation

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 05: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

    :

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 14, 2009 at 04:35 AM

    Sorry for the delay in closing the thread.Solved.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.