i need to compare two status and then diplay how should i do that.
if the stat - 'I0002' , stat - 'I0042'.
if the object id is having both the stat then only i need to display it.
how should i write the select statement.
SELECT SINGLE * INTO I_JEST FROM JEST
WHERE OBJNR = I_TMP_CAUFV-OBJNR and STAT IN ('I0002','I0042')
Hi,
I think you cannot do this in a single select statement..
Instead Try this..
SELECT * INTO TABLE IT_JEST FROM JEST
WHERE OBJNR = I_TMP_CAUFV-OBJNR and STAT IN ('I0002','I0042')
READ TABLE IT_JEST WITH KEY OBJNR = I_TMP_CAUFV-OBJNR
STAT = 'I0002'.
IF SY-SUBRC = 0.
READ TABLE IT_JEST WITH KEY OBJNR = I_TMP_CAUFV-OBJNR
STAT = 'I0004'.
IF SY-SUBRC = 0.
Both the status are found..
ENDIF.
ENDIF.
Thanks,
Naren
SELECT SINGLE * INTO I_JEST FROM JEST WHERE OBJNR = I_TMP_CAUFV-OBJNR and STAT = 'I0002'. if sy-subrc = 0. SELECT SINGLE * INTO I_JEST FROM JEST WHERE OBJNR = I_TMP_CAUFV-OBJNR and STAT = 'I0042'. endif. so now ur object id will contain both the status
Add a comment