Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Data not coming when debugging

uzair_1234
Explorer
0 Likes
1,518

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

6 REPLIES 6
Read only

Jeansy
Active Contributor
1,472

Hi,

can you please show us the full SELECT-statement in ABAP?

Kind regards
Jens

Read only

uzair_1234
Explorer
0 Likes
1,472

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.

Read only

matt
Active Contributor
0 Likes
1,472

As it says to the left of the "Your answer" editor

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 your answer complies with our Rules of Engagement.

Read only

Jeansy
Active Contributor
0 Likes
1,472

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

Read only

matt
Active Contributor
1,472

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.

Read only

Jeansy
Active Contributor
0 Likes
1,472

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