*---------------------------------------------------------------------* * FORM INIT_SUBSET_FCTFIELDS * *---------------------------------------------------------------------* * init subset fields which are not keyfields * *---------------------------------------------------------------------* * FORMNAME --> name of FORM to get view work area filled with current * * subset field values * * PROGNAME --> program of FORM 'FORMNAME' * *---------------------------------------------------------------------* FORM init_subset_fctfields USING value(formname) value(progname). DATA: alr_read TYPE c. LOOP AT x_namtab WHERE readonly EQ subset AND keyflag EQ space. ASSIGN component x_namtab-viewfield of structure TO . ASSIGN component x_namtab-viewfield of structure TO . IF alr_read EQ space. MOVE TO . IF x_header-clidep NE space. MOVE sy-mandt TO . ENDIF. IF x_header-frm_rp_cpl NE space. "event AD PERFORM (x_header-frm_rp_cpl) IN PROGRAM (sy-repid). ELSEIF formname NE compl_formname OR progname NE sy-repid. PERFORM (formname) IN PROGRAM (progname) USING . ELSEIF maxlines EQ 0. PERFORM (compl_formname) IN PROGRAM (sy-repid) USING IF FOUND. ELSE. READ TABLE extract INDEX 1. MOVE TO . ENDIF. IF vim_called_by_cluster NE space. CALL FUNCTION 'VIEWCLUSTER_COMPL_SUBSET_VALUE' EXPORTING view_name = x_header-viewname CHANGING workarea = . ENDIF. MOVE 'X' TO alr_read. ENDIF. MOVE TO . ENDLOOP. IF sy-subrc NE 0 AND maxlines EQ 0. MOVE TO . ENDIF. ENDFORM.