¡Caminando hacia el éxito!

Aprende en Comunidad

Avalados por :

Erro ao usar INNER JOIN em ABAP/4: O nome da coluna 'EBELN' tem dois significados - Solução SSM

  • Creado 01/03/2024
  • Modificado 01/03/2024
  • 1 Vistas
0
Cargando...

Olá,

Estou trabalhando em um relatório.

Enquanto uso innerjoin, estou recebendo um erro como

"O nome da coluna "EBELN" tem dois significados. Declaração ABAP/4 OPEN SQL.

Meu código é

-


SELECT a ebeln a bsart a ekgrp a bedat a~waers

a ekorg a lifnr a reswk b ebelp b~matnr

b txz01 b matkl

b loekz b pstyp b knttp b werks

b lgort b menge b meins b netpr

b peinh b bednr b banfn b bnfpo

c menge c wemng c~eindt

FROM ( ( ekko AS a

INNER JOIN ekpo AS b ON a ebeln = b ebeln )

INNER JOIN eket AS c ON a ebeln = c ebeln AND

b ebelp = c ebelp )

INTO TABLE it_orders

WHERE ebeln IN s_ebeln AND

ekorg IN s_ekorg AND

bsart IN s_bsart AND

ekgrp IN s_ekgrp AND

  • bedat IN s_bedat AND

lifnr IN s_lifnr AND

  • ebeln IN s_ebeln AND

werks IN s_werks AND

pstyp IN s_pstyp AND

knttp IN s_knttp AND

matnr IN s_matnr AND

txz01 IN s_txz01 AND

matkl IN s_matkl AND

bednr IN s_bednr AND

elikz EQ espaço. "E

  • loekz EQ espaço.

-


por favor, resolva meu problema SSM.

Aruna

Pedro Pascal
Se unió el 07/03/2018
Pinterest
Telegram
Linkedin
Whatsapp

4 Respuestas

0
Cargando...
        
            SELECT a~ebeln a~bsart a~ekgrp a~bedat a~waers
            a~ekorg a~lifnr a~reswk b~ebelp b~matnr
            b~txz01 b~matkl
            b~loekz b~pstyp b~knttp b~werks
            b~lgort b~menge b~meins b~netpr
            b~peinh b~bednr b~banfn b~bnfpo
            c~menge c~wemng c~eindt
            FROM ( ( ekko AS a
            INNER JOIN ekpo AS b ON a~ebeln = b~ebeln )
            INNER JOIN eket AS c ON a~ebeln = c~ebeln AND
            b~ebelp = c~ebelp )
            INTO TABLE it_orders
            WHERE a~ebeln IN s_ebeln AND
            a~ekorg IN s_ekorg AND
            a~bsart IN s_bsart AND
            a~ekgrp IN s_ekgrp AND
            * bedat IN s_bedat AND
            a~lifnr IN s_lifnr AND
            * ebeln IN s_ebeln AND
            b~werks IN s_werks AND
            b~pstyp IN s_pstyp AND
            b~knttp IN s_knttp AND
            b~matnr IN s_matnr AND
            b~txz01 IN s_txz01 AND
            b~matkl IN s_matkl AND
            b~bednr IN s_bednr AND
            elikz EQ space. "AND
            * loekz EQ space.
            
Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

Olá,

Faça a alteração assim.


SELECT a~ebeln a~bsart a~ekgrp a~bedat a~waers
a~ekorg a~lifnr a~reswk b~ebelp b~matnr
b~txz01 b~matkl
b~loekz b~pstyp b~knttp b~werks
b~lgort b~menge b~meins b~netpr
b~peinh b~bednr b~banfn b~bnfpo
c~menge c~wemng c~eindt
FROM ( ( ekko AS a
INNER JOIN ekpo AS b ON a~ebeln = b~ebeln )
INNER JOIN eket AS c ON a~ebeln = c~ebeln AND
b~ebelp = c~ebelp )
INTO TABLE it_orders
WHERE a~ebeln IN s_ebeln AND
a~ekorg IN s_ekorg AND
a~bsart IN s_bsart AND
a~ekgrp IN s_ekgrp AND
* bedat IN s_bedat AND
lifnr IN s_lifnr AND
* ebeln IN s_ebeln AND
b~werks IN s_werks AND
b~pstyp IN s_pstyp AND
b~knttp IN s_knttp AND
b~matnr IN s_matnr AND
b~txz01 IN s_txz01 AND
b~matkl IN s_matkl AND
b~bednr IN s_bednr AND
b~elikz EQ space. "AND
* loekz EQ space.
Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

EBELN está presente en mais de uma tabela, o que indica que o SQL não sabe em qual tabela usá-lo.

Você precisa fazer isso.

Onde a~ebeln eq .....

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

        SELECT a~ebeln a~bsart a~ekgrp a~bedat a~waers
        a~ekorg a~lifnr a~reswk b~ebelp b~matnr
        b~txz01 b~matkl
        b~loekz b~pstyp b~knttp b~werks
        b~lgort b~menge b~meins b~netpr
        b~peinh b~bednr b~banfn b~bnfpo
        c~menge c~wemng c~eindt
        FROM ( ( ekko AS a
        INNER JOIN ekpo AS b ON a~ebeln = b~ebeln )
        INNER JOIN eket AS c ON a~ebeln = c~ebeln AND
        b~ebelp = c~ebelp )
        INTO TABLE it_orders
        WHERE ebeln IN s_ebeln AND
        ekorg IN s_ekorg AND
        bsart IN s_bsart AND
        ekgrp IN s_ekgrp AND
        * bedat IN s_bedat AND
        lifnr IN s_lifnr AND
        a~ebeln IN s_ebeln AND
        werks IN s_werks AND
        pstyp IN s_pstyp AND
        knttp IN s_knttp AND
        matnr IN s_matnr AND
        txz01 IN s_txz01 AND
        matkl IN s_matkl AND
        bednr IN s_bednr AND
        elikz EQ space. "AND
        * loekz EQ space.
        

Deve ser como a~ebeln

Saudações,

Blag.

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019

contacto@primeinstitute.com

(+51) 1641 9379
(+57) 1489 6964

© 2024 Copyright. Todos los derechos reservados.

Desarrollado por Prime Institute

¡Hola! Soy Diana, asesora académica de Prime Institute, indícame en que curso estas interesado, saludos!
Hola ¿Puedo ayudarte?