07-10-2006 1:40 PM
HI FRNDS ..
I AM HAVING SOME ERRORS IN THE WHERE CLAUSE PLZ CORRECT IT
select DOCNO into t_DOCNO from J_1IEXCHDR
where exnum = gf_text and
status ne ( 'd' and 'r' and 'b' ).
PLZ HELP ME TO COLLECT VALU OF THE STATUS FILED WHER IT IS NOT EQUAL TO D, R AND B
07-10-2006 1:50 PM
Hi,
select DOCNO into t_DOCNO from J_1IEXCHDR
where exnum = gf_text and
status ne 'd'
and status ne 'r'
and status ne 'b'.
endselect.
Rgds,
Prakash
<b>Please reward points if it helps</b>
07-10-2006 1:44 PM
select DOCNO into t_DOCNO from J_1IEXCHDR
where exnum = gf_text and
( status ne 'd' OR status ne 'r' status ne 'b' ).
OR
ranges : r_status for YOUR FIELD REFERENCE.
r_status-sign = 'E'.
r_status-option = 'EQ'.
r_status-low = 'D'. APPEND r_status
r_status-low = 'R'. APPEND r_status
r_status-low = 'B'. APPEND r_status
select DOCNO into t_DOCNO from J_1IEXCHDR
where exnum = gf_text and
status IN r_status.
-Kiran
*Please reward useful answers
07-10-2006 1:49 PM
hi Rohit,
Use <b>Ranges</b> concept for the same
i.e,
<b>Ranges : r_ranges for your field reference.
r_ranges-sign = 'E'.
r_ranges-option = 'EQ'.
r_ranges-low = 'D'.
append r_ranges.
r_ranges-low = 'R'.
append r_ranges.
r_ranges-low = 'B'.
append r_ranges.</b>
Regards,
Santosh
07-10-2006 1:48 PM
Use a RANGES variable for appending the status.
r_status-sign = 'E'.
r_status-option = 'EQ'.
r_status-low = 'D'.
append r_status.
Now use this in the select statement.
Regards,
Ravi
07-10-2006 1:50 PM
Hi,
select DOCNO into t_DOCNO from J_1IEXCHDR
where exnum = gf_text and
status ne 'd'
and status ne 'r'
and status ne 'b'.
endselect.
Rgds,
Prakash
<b>Please reward points if it helps</b>
07-10-2006 1:52 PM
Hi Rohit,
Consider this .
SELECT docno
INTO t_docno FROM j_1iexchdr
WHERE exnum = gf_text AND
status NOT IN ( 'D' , 'R' , 'B' ).
ENDSELECT.
Regards,.
Arun Sambargi.
07-10-2006 1:55 PM
RANGES: R_STAT FOR J_1IEXCHDR-STATUS.
R_STAT-LOW = 'D'.
R_STAT-SIGN = 'I'.
R_STAT-OPTION = 'EQ'.
APPEND R_STAT.
CLEAR R_STAT.
R_STAT-LOW = 'R'.
R_STAT-SIGN = 'I'.
R_STAT-OPTION = 'EQ'.
APPEND R_STAT.
CLEAR R_STAT.
R_STAT-LOW = 'B'.
R_STAT-SIGN = 'I'.
R_STAT-OPTION = 'EQ'.
APPEND R_STAT.
CLEAR R_STAT.
DATA: T_DOCNO LIKE J_1IEXCHDR-DOCNO OCCURS 0 WITH HEADER LINE.
DATA: GF_TEXT LIKE J_1IEXCHDR-EXNUM.
SELECT DOCNO INTO TABLE T_DOCNO FROM J_1IEXCHDR
WHERE EXNUM = GF_TEXT
AND
STATUS NOT IN R_STAT.
Try to use Ranges.
Regards
vijay