‎2022 Oct 06 7:48 AM
Hello all,
I have applied a select query to ekpo using inner join as INNER JOIN ekko AS b ON b~ebeln EQ a~ebeln
and tried putting it in lt_ekko1 but still cant get the data inlt_ekko1 while debugging. Can anyone explain in detail why isn't the data coming
‎2022 Oct 06 7:57 AM
Hi,
can you please show us the full SELECT-statement in ABAP?
Kind regards
Jens
‎2022 Oct 06 8:47 AM
Hi,
Sure here is the query
SELECT DISTINCT
a~ebeln,
a~ebelp,
a~matnr,
a~werks,
a~loekz,
a~elikz,
a~eglkz,
a~menge,
b~aedat
FROM ekpo AS a
INNER JOIN ekko AS b ON b~ebeln EQ a~ebeln
INTO TABLE @DATA(lt_ekko1)
WHERE a~matnr IN @p_matnr
AND a~werks IN @p_werks
* AND c~bwart IN ('641','642')
AND a~elikz <> 'X'
AND a~eglkz <> 'X'
AND b~aedat BETWEEN @p_sdate
AND @p_edate.
‎2022 Oct 06 10:55 AM
As it says to the left of the "Your answer" editor
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 your answer complies with our Rules of Engagement.
‎2022 Oct 06 9:13 AM
Hi
AND b~aedat BETWEEN @p_sdate
This doesn't look okay from my perspective. Is this a select-option on the selection screen? Then just use the IN-operator for the selection.
Kind regards
Jens
‎2022 Oct 06 10:57 AM
You need the next line. It's badly formatted.
AND b~aedat BETWEEN @p_sdate AND @p_edate.Of course, since we don't know what's in the database, nor what's in p_matnr and p_werks, it's very hard to answer the question.
‎2022 Oct 06 11:00 AM
Oh you're right.
As select-options and parameters seem to have the same prefix, I did not see this in the non-formatted-code.
Thank you, matthew.billingham