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

Inner Join

Hello,

I've got the following problem in BI 7 :

I've got two tables : CRM_JCDS and TJ30.

In the first one, there are records like :

objnr----


stat

469C4D7D25DD5411E1000000AC1E9ACA E0007

469C4D7D25DD5411E1000000AC1E9ACA I1002

In the second one :

stsma----


estat

ZSTOPAF1 E0001

ZSTOPAF1 E0002

ZSTOPAF1 E0007

I want to join these two tables in order to put in result the status which is the same in the two tables... (the result is : status(5) type c)

But I'm not very good in ABAP.

Someone could give to me the code ?

Cheers,

Vince

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2007 at 11:31 AM

    Hi,

    data:begin of itab occurs 0,"this is an internal table to *hold the datawhich satisfies ur condition

    objnr type CRM_JCDS-objnr,

    stat type CRM_JCDS-stat,

    stsma type TJ30-stsma,

    end of itab.

    select aobjnr astat bstsma into corresponding fields of itab from CRM_JCDS as a inner join TJ30 as b on astat = b~estat."join condition

    write:/ itab-objnr,itab-stat,itab-stsma.

    endselect.

    <b>reward if helpful</b>

    rgds,

    bharat.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I would put a condition, but i'm not good in ABAP !!

      The good code (for me) is :

      SELECT a~stat

      INTO statut

      FROM crm_jcds AS a

      INNER JOIN tj30 AS b

      ON astat = bestat

      WHERE a~objnr = guid_ds.

      ENDSELECT.

      Thanks for your help.

      Points are assigned.

      Cheers,

      Vince.

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.