Eigenschaften | Quelltext
Titel | INIT_SUBSET_FCTFIELDS |
Originalsprache | DE | Deutsch
Erstellt | 27.10.1998 |  | SAP |
Letzte Änderung | 13.11.2001 |  | SAP |
Status | aktiv |
Attribute
Typ | Include-Programm |
Status | Testprogramm |
Anwendung | Basis (System) |
Paket | SVIM | Basis Viewmaintenance
| Editorsperre
txt
    1
    *---------------------------------------------------------------------*
    2
    *       FORM INIT_SUBSET_FCTFIELDS                                    *
    3
    *---------------------------------------------------------------------*
    4
    * init subset fields which are not keyfields                          *
    5
    *---------------------------------------------------------------------*
    6
    * FORMNAME --> name of FORM to get view work area filled with current *
    7
    *              subset field values                                    *
    8
    * PROGNAME --> program of FORM 'FORMNAME'                             *
    9
    *---------------------------------------------------------------------*
    10
    FORM init_subset_fctfields USING value(formname) value(progname).
    11
    12
      DATA: alr_read TYPE c.
    13
    14
      LOOP AT x_namtab WHERE readonly EQ subset AND keyflag EQ space.
    15
        ASSIGN component x_namtab-viewfield of structure <initial>
    16
               TO <subsetfield>.
    17
        ASSIGN component x_namtab-viewfield of structure <table1>
    18
               TO <value>.
    19
        IF alr_read EQ space.
    20
          MOVE <initial> TO <table1>.
    21
          IF x_header-clidep NE space.
    22
            MOVE sy-mandt TO <client>.
    23
          ENDIF.
    24
          IF x_header-frm_rp_cpl NE space.   "event AD
    25
            PERFORM (x_header-frm_rp_cpl) IN PROGRAM (sy-repid).
    26
          ELSEIF formname NE compl_formname OR progname NE sy-repid.
    27
            PERFORM (formname) IN PROGRAM (progname) USING <table1>.
    28
          ELSEIF maxlines EQ 0.
    29
            PERFORM (compl_formname) IN PROGRAM (sy-repid) USING <table1>
    30
                                     IF FOUND.
    31
          ELSE.
    32
            READ TABLE extract INDEX 1.
    33
            MOVE <vim_extract_struc> TO <table1>.
    34
          ENDIF.
    35
          IF vim_called_by_cluster NE space.
    36
            CALL FUNCTION 'VIEWCLUSTER_COMPL_SUBSET_VALUE'
    37
                 EXPORTING
    38
                      view_name = x_header-viewname
    39
                 CHANGING
    40
                      workarea  = <table1>.
    41
          ENDIF.
    42
          MOVE 'X' TO  alr_read.
    43
        ENDIF.
    44
        MOVE <value> TO <subsetfield>.
    45
      ENDLOOP.
    46
      IF sy-subrc NE 0 AND maxlines EQ 0.
    47
        MOVE <initial> TO <table1>.
    48
      ENDIF.
    49
    ENDFORM.