2010 Dec 28 1:28 PM
I want to concatenate a numeric field with a string. The numeric field length is 5. However the actual entry may be less than that. What I want now is one function module to add proper no of spaces before the numeric field so that I can split the concatenated result afterwards without being bothered what the length of that numeric field is. ( I will simply take out the first five characters). I know a function module CONVERSION_EXIT_ALPHA_INPUT that adds 0(zero). Is there any function module that can add spaces is the length is below 5?
I did not get you dear
first you are concatenating and then spitting ?
If so you can use separated by space with concatenate and use space for spitting.
Thanks,
Anmol.
2010 Dec 28 1:51 PM
Do we need a fm for this ??
data:lv(5) type n.
data:str type char10.
lv = '1234'.
str+5(*) = lv.
2010 Dec 28 2:07 PM
Did not get you.
Example: My numc field may be 12345 or just 123 (I don't know).
After concatenation with the string (say ABCDEF) it may become 12345ABCDEF or 123ABCDEF.
What will be splitting criteria then?
2010 Dec 28 2:34 PM
I did not get you dear
first you are concatenating and then spitting ?
If so you can use separated by space with concatenate and use space for spitting.
Thanks,
Anmol.
2010 Dec 28 2:37 PM
Hi,
Splitting criteria will be from offset 5
You said that your numeric fields maximum length is 5. So do it like this. always the first five characters is for the numeric value.
data:lv(5) type n.
data:str type char255.
lv = '123'.
str+0(5) = lv.
str+5(*) = 'ABCDEF'.
write str.
skip 1.
write str+0(5).
lv = '1234'.
str+0(5) = lv.
str+5(*) = 'ABCDEF'.
write str.
skip 1 .
write str+0(5)..
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |