on 2023 Nov 06 2:34 PM
Dear Experts,
do you have an idea why I am still getting results with stat= 'E0012' and inact = SPACE although
as per below mentioned Select query they should be clearly delimited (see EXISTS Command)
I am expecting hits with:
stat= 'E0012' and inact = X
and NOT
stat= 'E0012' and inact = SPACE
<strong>
TYPES: BEGIN OF ty_s_prps,
posid TYPE ps_posid,
post1 TYPE ps_post1,
psphi TYPE ps_psphi,
pbukr TYPE ps_pbukr,
objnr TYPE j_objnr, "20160712
END OF ty_s_prps,
TYPES: ty_t_prps TYPE TABLE OF ty_s_prps.
DATA: lt_prps TYPE ty_t_prps.
SELECT a~posid
a~post1
a~psphi
a~pbukr
a~objnr
INTO TABLE lt_prps
FROM prps AS a
INNER JOIN jest AS j ON a~objnr = j~objnr
WHERE a~belkz EQ lc_on_x
AND a~loevm EQ space
AND a~pbukr IN lt_sel_bukrs_range
* AND a~plakz EQ lc_on_x
AND j~stat EQ 'I0002'
AND j~inact EQ space
AND a~fakkz EQ lc_on_x
AND EXISTS ( SELECT * FROM jest WHERE stat = 'E0012' AND inact = 'X'
OR stat NE 'E0012'). </strong><br>
Br
Ilhan
Request clarification before answering.
Is it not possible to achieve this with ABAP at all?
Requirement:
('stat' I0002 must be present AND 'inact' not equal to “X”) AND (( 'stat' E0012 must not be present) OR ('stat' E0012 is present AND inact equal to “X”))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 29 | |
| 14 | |
| 14 | |
| 6 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.