‎2006 Aug 01 7:48 PM
SELECT SINGLE * FROM ADRC
INTO ws_adrc
WHERE
client = sy-mandt AND
ADDRNUMBER = ws_adrnr
AND date_from = lv_data
AND nation = ' ' .
client , addrnumber, date_from and nation are the primary keys . what is the problem in Above select stmt?
Sy-subrc is always 4 ( do not understand).
But there is an entry in table adrc fot the supplied values of select single.
‎2006 Aug 01 7:56 PM
Hai Sam Kumar
Check the following Code
SELECT SINGLE * FROM ADRC
INTO ws_adrc
WHERE ADDRNUMBER = '0000022003' and
date_from = '00010101' and
nation = space.
if sy-subrc = 0.
exit.
endif.
no need to give the condition as client = sy-mandt
Regards
Sreeni
Message was edited by: Sreenivasulu Ponnadi
‎2006 Aug 01 7:51 PM
How is WS_ADRNR defined? Does it have leading zeroes?
NATION probably has a space, not a null field.
Try
AND NATION = SPACE.
‎2006 Aug 01 7:51 PM
‎2006 Aug 01 7:56 PM
‎2006 Aug 01 7:56 PM
Hai Sam Kumar
Check the following Code
SELECT SINGLE * FROM ADRC
INTO ws_adrc
WHERE ADDRNUMBER = '0000022003' and
date_from = '00010101' and
nation = space.
if sy-subrc = 0.
exit.
endif.
no need to give the condition as client = sy-mandt
Regards
Sreeni
Message was edited by: Sreenivasulu Ponnadi
‎2006 Aug 01 8:05 PM
Also... the DATE_FROM line should probably be
DATE_FROM <= LV_DATA
or
DATE_FROM <= SY-DATUM AND
DATE_TO >= SY-DATUM
‎2006 Aug 01 8:19 PM
yes the problem should be of leading Zeros. as there is a conversion routine for the Domain. You could also use the Fm: CONVERSION_EXIT_ALPHA_RANGE_I, to convert it in the proper format.