Start of Content Area

Process documentationUsing the Conversion Exit  Locate the document in its SAP Library structure


You use a conversion exit to define a jump to a conversion routine for a column of your output table. As the exit you specify the <conv> part of a function module called CONVERSION_EXIT_ <conv> _OUTPUT . For example, you can use conversion exit ALPHA (see function module CONVERSION_EXIT_ALPHA_OUTPUT ) to suppress leading zeros of account numbers.


The conversion exit is implemented through WRITE addition USING EDIT MASK .



So that the ALV Grid Control can perform the conversion, it must know the internal and the external length of the field, which is the same as the length before and the length after the conversion.


The following example that uses editing template EDIT MASK for the WRITE command shows you how these lengths are specified:

WRITE (8) TIME USING EDIT MASK '__:__:__'. "Output: 15:46:33

In this example, the internal length (of type T) is six characters, while the output length is eight.

The column width (which can be set using the current layout) does not depend on these values and needs not be adjusted accordingly.

Process Flow

  1. Declare the internal and the external length of the field to the ALV Grid Control.
  1. Specify the conversion exit using field EDIT_MASK of the field catalog (see Formatting Column Contents).
  2. Pass the field catalog with method set_table_for_first_display before the list is displayed for the first time.


The values of the columns are run through the conversion routine before display.