Conversion problem

Question: I have written a pogram to see the existance of customer like below

CONCATENATE '00' ITAB-KUNNR INTO ITAB-KUNNR.
SELECT SINGLE * FROM KNVV WHERE KUNNR = ITAB-KUNNR
AND VKORG = ITAB-VKORG
AND VTWEG = '04'
AND SPART = '04'.

IF SY-SUBRC <> 0.
WRITE:/2 'CUSTOMER', ITAB-KUNNR, 'NOT FOUND'.
CONTINUE.
ENDIF.
the bold italic underline part will not work if somebody will provide with 6 digit or less digit customer.At that point I need atleast 4 zeros or more,b'cos the knvv-kunnr field is 10 char long.
.I have tried conversion_exit_alpha_output and conversion_exit_kunnr_input .but these thing not working.Can Any one help me out?
Thanks in advance.
bye
chik

Answer:
I cannot see your problem, from my point of view, your italic line is not needed. If you are using the right data types (itab-kunnr like knvv-kunnr) you don't need these "extra zeroes".

I believe...
_________________
Brief History of the Tuly Idiots
Bad advices, wrong answers, bigotism
sapfans GD

Ad by Viiiiiic

Answer:
use fm CONVERSION_EXIT_ALPHA_INPUT

May I suggest a visit to the Abapper's knoledge corner.?

It's really interesting, and contains a lot of answers ...


In this specific case...

Regards

Answer:
Hi,
Maybe as an alternative:
DATA: w_kunnr LIKE knvv-kunnr.
MOVE itab-kunnr TO w_kunnr. “ will need to be within loop
SHIFT w_kunnr RIGHT DELETING TRAILING ‘ ‘.
REPLACE ‘ ‘ WITH ‘0’ INTO w_kunnr.
Then either change your SELECT to use w_kunnr or MODIFY the field back into the itab.
This should cater for any length of Customer Number and enable you to drop the CONCATENATE, it might need some variation on this theme dependent how your Numbers are actually held. But the previous respondent is correct, this is essentially what that F/M is doing anyway so you should be able to get that Function to work.
Regards.
Copyright ?2007 - 2008 www.jt77.com