Немного неправильно Вас направил, чуть другое поле нужно было. Понадеялся на документацию к ФМ REUSE_ALV_GRID_DISPLAY
Цитата:
Reference to fields with currency units/units of measure
Each amount or quantity field of the internal output table whose decimal places are to be displayed with the proper unit in the list output, must comply with the following conventions:◦The field is of data type QUAN or CURR (internal type P).
(Physically, the field must actually belong to this data type. Overriding the physical data type with parameter FIELDCAT-DATATYPE has no effect.)
◦There is one field in the internal output table that contains the relevant unit.
◦There is also an entry for the unit field in the field catalog.
(If the unit should not be displayed as a column in the list and the user should not be able to show the unit interactively, for example, because the unit is always unique and therefore explicitly output by the caller in the list header, then you can assign parameter FIELDCAT-TECH = 'X' to the field catalog entry for the unit field.
If a value field has a reference to a unit, this has the following effects when the list is output:◦The decimal places are displayed with the proper unit.
◦An initial value field with reference to a non-initial unit is displayed as '0' (provided that FIELDCAT-NO_ZERO is initial). If unit-specific totals are calculated for this value field, the unit is considered in the analysis of whether homogeneous units exist.
◦An initial value field with reference to an initial unit is displayed as SPACE. If unit-specific totals are calculated for this value field, the unit SPACE has no effect on the homogeneity of the unit if the value field is initial.
◦For non-initial value fields with initial unit, the unit SPACE is considered as a unit when unit-specific totals are calculated.
Работает со старым REUSE
Code:
TYPE-POOLS: slis.
DATA: BEGIN OF itab OCCURS 0,
menge TYPE menge_d,
meins TYPE bstme,
tech_meins TYPE bstme,
END OF itab.
DATA: fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
START-OF-SELECTION.
itab-menge = 10.
itab-meins = 'ШТ'.
itab-tech_meins = 'ШТ'.
APPEND itab.
CLEAR itab-menge.
itab-meins = 'ШТ'.
itab-tech_meins = space.
APPEND itab.
itab-menge = 0.
itab-meins = 'ШТ'.
itab-tech_meins = 'ШТ'.
APPEND itab.
CLEAR fieldcat.
fieldcat-fieldname = 'MENGE'.
fieldcat-seltext_m = 'Кол-во'.
fieldcat-qfieldname = 'TECH_MEINS'.
APPEND fieldcat.
CLEAR fieldcat.
fieldcat-fieldname = 'MEINS'.
fieldcat-seltext_m = 'ЕИ'.
APPEND fieldcat.
CLEAR fieldcat.
fieldcat-fieldname = 'TECH_MEINS'.
fieldcat-seltext_m = 'ЕИ'.
fieldcat-tech = 'X'.
APPEND fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = fieldcat[]
TABLES
t_outtab = itab.