Properties SourceCde
txt
1
*&--------------------------------------------------------------------*
2
*&      Form VIM_CONVERT_TABKEY                                       *
3
*&--------------------------------------------------------------------*
4
* ...                                                                 *
5
*&--------------------------------------------------------------------*
6
FORM vim_convert_tabkey USING value(vct_key_int) TYPE x
7
                                    vct_key_ext TYPE vim_tabkey_c
8
                                    vct_xkeylen TYPE i.
9
  FIELD-SYMBOLS: <h1>, <h2>.
10
  CLEAR vct_xkeylen.
11
  <f1_wax> = vct_key_int.
12
  LOOP AT x_namtab WHERE keyflag NE space AND texttabfld EQ space.
13
    CHECK x_namtab-position LT x_header-keylen.
14
*    ASSIGN: vct_key_int+x_namtab-position(x_namtab-flength) TO <h1>,
15
*            vct_key_ext+vct_xkeylen(x_namtab-outputlen) TO <h2>.
16
    ASSIGN: COMPONENT x_namtab-viewfield OF STRUCTURE <table1_wa>
17
             TO <h1>,
18
            vct_key_ext+vct_xkeylen(x_namtab-outputlen) TO <h2>.
19
    IF ( x_namtab-inttype NE 'C' AND x_namtab-inttype NE 'N' )"SW
20
       OR x_namtab-convexit NE space.
21
      CALL FUNCTION 'VIEW_CONVERSION_OUTPUT'
22
           EXPORTING
23
                value_intern = <h1>
24
                tabname      = x_header-maintview
25
                fieldname    = x_namtab-viewfield
26
*                inttype      = x_namtab-inttype
27
*                datatype     = x_namtab-datatype
28
*                decimals     = x_namtab-decimals
29
*                convexit     = x_namtab-convexit
30
*                sign         = x_namtab-sign
31
                outputlen    = x_namtab-outputlen
32
                intlen       = x_namtab-flength
33
           IMPORTING
34
                value_extern = <h2>.
35
    ELSE.
36
      <h2> = <h1>.
37
    ENDIF.
38
    ADD x_namtab-outputlen TO vct_xkeylen.
39
  ENDLOOP.
40
ENDFORM.                               "vim_convert_tabkey