after concatenating, leading zeroes appeared.
I concatenated 2 fields as shown below:
CONCATENATE it_finaltab-asset '-' it_anla-anln2
Originally,I am displaying it_finaltab-asset in my report but the users said that they want it to be show as
for example: 123456-0
Now, what I did was to create another field named
it_finaltab-asset_subnum where the concatenated values will be stored. Now, I noticed when I run my report
that there are now leading zeroes in it. for example:
What I want is to show it in its original format but with the addition of the concatenated values.
I declared the new field it_finaltab-asset_subnum as type c with a length of 15.
Again, thank you and have a nice day guys!
Norman Salter replied
When you WRITE, it invokes the conversion routine on the domain.
When you CONCATENATE, it does not.
I would suggest you use the WRITE TO command and then concatenate the result.
Another option is to run the conversion routine (function module) on the fields, and then concatenate.
Data element ANLN1 uses domain ANLN1. In the data dictionary, this shows routine ALPHA. The corresponding function module is CONVERSION_EXIT_ALPHA_OUTPUT.
If you force removal of the zeros with SHIFT, you might get the wrong result if the value is not completely numeric.
An asset value of "002XYZ" would end up as "2XYZ" (wrong).
When you WRITE, it would come out as "002XYZ" (right).