Dinamik dönüşüm

Alan kataloğundaki convexit alanı ile dönüşüm fonksiyonu tespit edilir.
Tam fonksiyon adı için ön ve son ek ile birleştirmek gereklidir.

CONCATENATE `CONVERSION_EXIT_` ls_fieldcat-convexit `_INPUT` into lv_conv_outfm.
CONCATENATE `CONVERSION_EXIT_` ls_fieldcat-convexit `_OUTPUT` into lv_conv_outfm.

CONVERSION_EXIT_ALPHA_INPUT
CONVERSION_EXIT_ALPHA_OUTPUT
CONVERSION_EXIT_MATN1_INPUT
CONVERSION_EXIT_MATN1_OUTPUT
CONVERSION_EXIT_CUNIT_INPUT
CONVERSION_EXIT_CUNIT_OUTPUT


 
  data: lt_fieldcat  type lvc_t_fcat.
  data: lt_fc_conv  type lvc_t_fcat.
  data: ls_fieldcat  type lvc_s_fcat.

      field-symbols <new_tab> type standard table  .
      field-symbols: <fs_line> type any.
      field-symbols: <lfs_row> type any.
      field-symbols: <fs_cell> type any.
....
   lt_fc_conv[] = lt_fieldcat[].
   delete lt_fc_conv where convexit is initial.

 
lt_fc_conv[] = lt_fieldcat[].
   delete lt_fc_conv where convexit is initial.

   loop at <new_tab> assigning <fs_line>.
      loop at lt_fc_conv into  ls_fieldcat.
        if <fs_cell> is assigned. unassign <fs_cell>. endif.

        assign component ls_fieldcat-fieldname of structure <fs_line> to <fs_cell>.
        if <fs_cell> is assigned.
            CONCATENATE `CONVERSION_EXIT_` ls_fieldcat-convexit `_OUTPUT` into lv_conv_outfm.
            call function `CONVERSION_EXIT_ALPHA_OUTPUT`
              exporting
                input         = <fs_cell>
             IMPORTING
               OUTPUT        = <fs_cell>
                      .

        endif.

      endloop.
   endloop.