‎2006 Jul 28 8:16 AM
hi ,
I am usnig a field LIFNR (vendor) in my ITAB.
ITs length is 10. But my data values are of 6 or 7 digi.
when i pass these values to a FM , ouput comes only when 0 are padded.
Please tell appropriate code.
i am using concatenate '000' itab-lifnr into itab-lifnr.
but as length of lifnr may be 6 , 7 or may be anything then this wont work.
i m sure some better method is there.
plz help/
‎2006 Jul 28 8:18 AM
‎2006 Jul 28 8:18 AM
Use the conversion exit:
CONVERSION_EXIT_ALPHA_INPUT
U can find this in the domain....
-Aarthi.
‎2006 Jul 28 8:18 AM
‎2006 Jul 28 8:18 AM
you should use function module : CONVERSION_EXIT_ALPHA_INPUT and pass this vendor number as import and export parameter.
‎2006 Jul 28 8:18 AM
data: gv_lifnr(10) type n.
loop at itab.
gv_lifnr = itab-lifnr.
pass this (gv_lifnr.)...
endloop
‎2006 Jul 28 8:18 AM
Hi sharadha,
1. we can use the FM
CONVERSION_EXIT_ALPHA_INPUT
2. It will pad zeroes to the left,
automatically,
based upon the field length, and data in it.
regards,
amit m.
‎2006 Jul 28 8:18 AM
Hi,
Use conversion exit...CONVERSION_EXIT_ALPHA_INPUT
Sreedhar
‎2006 Jul 28 8:18 AM
You will have to use a conversion exit. Look at the data element level if there is a separated CONVERSION EXIT for LIFNR field. If not you can use CONVERSION_EXIT_ALPHA_INPUT. Pass the vendor no. you have and the output will have the padded zeroes.
Regards,
Ravi
Note : Please mark all the helpful answers
‎2006 Jul 28 8:19 AM
Hi
Use These FM
CONVERSION_EXIT_ALPHA_INPUT Conversion exit ALPHA, external->internal
CONVERSION_EXIT_ALPHA_OUTPUT Conversion exit ALPHA, internal->external
Rgds,
Prakash
‎2006 Jul 28 8:20 AM
HI,
data: len type i.
len = strlen(itab-lifnr).
len = 10 - len.
OD len times.
concatenate '0' itab-lifnr into itab-lifnr.
ENDDO.
Regards,
Wasim Ahmed