‎2008 Dec 02 12:58 PM
Hi,
I have a customer table with a numc(16) field in it. I see that data stored in that field with leading zeroes. For example :
numc table field
-
0000000000000001
0000000000000002
0000000000000320
etc.
The thing is that in a report I have to select some records from the table and have to add a numeric literal to the numc field and store the result in another numc field.
Suppose:
I have a value 0000000000000002 inside lv_maknr which is a numc(16) field. And also suppose I want to add '1' to it and store the result in another lv_maknr2 field.
lv_maknr2 = lv_maknr + '1'.
The problem here is that when I look inside of lv_maknr2, I see there is number 2, left aligned and with leading spaces and many places on the right side of the variable is just empty.
It isn't acceptable for me. I want to have 0000000000000002 inside of lv_maknr2 field. How can I achive that?
regards.
‎2008 Dec 02 1:02 PM
Hi
For that use FM 'CONVERSION_EXIT_ALPA_INPUT '.
Regards,
Flavya
‎2008 Dec 02 1:56 PM
‎2008 Dec 02 1:06 PM
‎2008 Dec 02 2:02 PM
Hi,
You can do this way also.
unpack p_w_vbeln to p_w_vbeln1.
Use to fill leading zeros.
Thanks & Regards,
Krishna...
‎2008 Dec 02 2:04 PM
‎2008 Dec 02 2:15 PM
Hi,
you can use the Function module 'CONVERSION_EXIT_ALPHA_INPUT'
eg...
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input =lv_maknr2
IMPORTING
output = lv_maknr2.
Regards,
vicky.