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

join query help

hi

i am encountering error like the values not getting populated in internal table though values are in dbtable...so if u can help me out in the join query it will be of gr8 help

SELECT a1~guid a1~posting_date a1~process_type
       b1~sales_org b1~division b1~dis_channel
       INTO CORRESPONDING FIELDS OF TABLE it_ordel
       FROM ( ( crmd_orderadm_h AS a1 INNER JOIN crmd_link AS c1 ON a1~guid  = c1~guid_hi )
                INNER JOIN crmd_orgman AS b1 ON c1~guid_hi = b1~guid )
       WHERE c1~objtype_hi = '05'
       AND   c1~objtype_set = '21'.
    AND   a1~process_type IN so_prst
       AND   a1~posting_date IN so_podt
       AND   b1~division     IN so_div.

thnx

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 02, 2010 at 08:07 AM

    For a start, you are best to stop using the a1....b1. Use the actual table name instead. It makes the SQL easier to read.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 02, 2010 at 08:32 AM
    SELECT a1~guid a1~posting_date a1~process_type
           b1~sales_org b1~division b1~dis_channel
           INTO CORRESPONDING FIELDS OF TABLE it_ordel
           FROM ( ( crmd_orderadm_h AS a1 INNER JOIN crmd_link AS c1 ON a1~guid  = c1~guid_hi )
                    INNER JOIN crmd_orgman AS b1 ON c1~guid_hi = b1~guid )
           WHERE c1~objtype_hi = '05'
           AND   c1~objtype_set = '21'.
        AND   a1~process_type IN so_prst
           AND   a1~posting_date IN so_podt
           AND   b1~division     IN so_div.

    SELECT a1~guid a1~posting_date a1~process_type
           b1~sales_org b1~division b1~dis_channel
           INTO CORRESPONDING FIELDS OF TABLE it_ordel
           FROM ( ( crmd_orderadm_h AS a1 INNER JOIN crmd_link AS c1 ON a1~guid  = c1~guid_hi )
                    INNER JOIN crmd_orgman AS b1 ON c1~guid_hi = b1~guid )
           WHERE c1~objtype_hi = '05'
           AND   c1~objtype_set = '21'    ".              delete that period its wrong
        AND   a1~process_type IN so_prst
           AND   a1~posting_date IN so_podt
           AND   b1~division     IN so_div.
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 02, 2010 at 09:23 AM

    Hey why do you have . after first AND. is it not giving u sysntax error.

    Regards,

    Uma Dave

    Edited by: UmaDave on Jul 2, 2010 11:23 AM

    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.