‎2016 Apr 26 7:32 AM
Hi all!
I'm trying to show a message like this
DATA: menge type menge_d,
meins type meins.
menge = 555.
meins = 'ST'.
MESSAGE |Amount available { menge } { meins alpha = out } | TYPE 'S'.
But I got ST not converted in my native language ( sy-langu ). I can use FM CONVERSION_EXIT_CUNIT_OUTPUT, but I want to do it with string templates.
Here is another example:
report zzz.
START-OF-SELECTION.
SELECT SINGLE *
INTO @DATA(ls)
FROM mara
WHERE meins <> @space.
WRITE:/ ls-meins.
WRITE:/ | { ls-meins } { ls-meins ALPHA = in } { ls-meins ALPHA = out } { ls-meins ALPHA = raw }|.
DATA output TYPE string.
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT'
EXPORTING
INPUT = ls-meins
IMPORTING
OUTPUT = OUTPUT
.
WRITE:/ output.
Output
ШТ
ST ST ST ST
ШТ
‎2016 Apr 26 8:32 AM
I don't think there's an equivalence of WRITE USING NO EDIT MASK (to not execute the conversion routine). You may create a functional method which executes the WRITE, and execute it from within the string template.
Message was edited by: Sandra Rossi : my answer is out of context, sorry
‎2016 Apr 26 9:08 AM
As far as I know the String-Template currently does not support CUNIT conversion. Your used ALPHA conversion adds or removes only leading zeros to or from a string containing a number.
‎2016 Apr 26 9:36 AM
Any links that confirm it? (only leading zeroes). Or you meant note from abap help http://help.sap.com/abapdocu_740/en/abapcompute_string_format_options.htm#!ABAP_ADDITION_13@13@ ?
- The formatting option ALPHA has the same function as the conversion routineCONVERSION_EXIT_ALPHA_INPUT or CONVERSION_EXIT_ALPHA_OUTPUT.
- The parameter IN can be used to transform numeric sequences without leading zeroes to the format of numeric text with leading zeroes. The parameter OUT can be used to convert numeric text with leading zeroes to numeric sequences without leading zeroes.
‎2016 Apr 26 10:04 AM