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.
Hola,
Haz el cambio así.
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.
EBELN existe en más de una tabla, por lo que el error indica que el SQL no sabe en qué tabla usarlo.
Necesitas hacer esto.
Donde a~ebeln eq .....
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.
Debe ser como a~ebeln
Saludos,
Blag.