‎2007 Jul 13 9:35 PM
Hi, I am embarrassed to say this but I can't figure out why this select isn't working.
SELECT single adrnr INTO w_adrnr FROM lfa1
WHERE lifnr = w_lifnr.I know that I have a match in LFA1 where LIFNR = W_LIFNR but the select will not return anything. Can you tell me what [obvious] mistake I have made?
Regards,
Davis
‎2007 Jul 13 9:40 PM
Just a guess - but does w_lifnr contain the leading zeroes?
Rob
‎2007 Jul 13 9:40 PM
Davis,
did you see data at SE11 ? if so then use
Use Below FM -> pass CONVERSION_EXIT_ALPHA_INPUT
give input w_lifnr and output is w_lifnr
SELECT single adrnr INTO w_adrnr FROM lfa1
WHERE lifnr = w_lifnr.
now see the results
Thanks
Seshu
‎2007 Jul 13 9:42 PM
Seshu, thanks for the reply. Can I call this function module inside a SmartForm? I just tried it and it gives me a syntax error saying that CONVERSION_EXIT_ALPHA_INPUT is unknown. I guess maybe I need to put it in the global definitions?
Regards,
Davis
‎2007 Jul 13 9:40 PM
Just a guess - but does w_lifnr contain the leading zeroes?
Rob
‎2007 Jul 13 9:43 PM
No it doesn't, I guess that is the problem.
Rob, thanks for the help. I didn't even think about the leading zeros. Now I feel even dumber than I did 10 minutes ago.
Davis
Message was edited by:
Davis
‎2007 Jul 13 9:42 PM
It's working man...
data: w_ADRNR like lfa1-ADRNR.
parameters: w_lifnr like lfa1-lifnr.
start-of-selection.
select single adrnr from lfa1 into w_adrnr where lifnr = w_lifnr.
check sy-subrc eq 0.
write:/ w_adrnr.
‎2007 Jul 13 9:44 PM
Hi,
Your coding seems fine
How did you declare W_ADRNR and W_LIFNR?
Please check table LFA1 (SE16) and see whether you have record for the corresponding LIFNR.
Regards,
Ferry Lianto
‎2007 Jul 13 9:45 PM
Try:
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_lifnr
IMPORTING
output = w_lifnr.
SELECT SINGLE adrnr INTO w_adrnr FROM lfa1
WHERE lifnr = w_lifnr.
Rob