Implementing the Administration Tab in MyForms

The Administration tab in MyForms provides a way for nominated administrators to view all, or a selection of instances for an application.  An example of why the instances could be filtered is because you may want to have multiple administrators, each one responsible for a specific area in the organization (e.g. Plant, Cost Center, Company Code). 

Instructions:


  1. Create a new ABAP class with a Superclass of /IQX/CL_FORMS_WORKLIST_CLASS.
  2. Redefined the method FILL_WORKLIST_FOR_ROLE.
    Below is an example of code that will return ALL instances for the current form.

    method FILL_WORKLIST_FOR_ROLE.
    
    FIELD-SYMBOLS: <fs_instances> LIKE LINE OF et_instances.
    DATA: lv_Instance TYPE /IQX/INSTANCE,
          lv_FormName TYPE STRING.
    
    CASE i_Filter.
    
      WHEN 'Administrator'.
    
            lv_FormName = I_FORM_NAME. "This could be hard coded with the name of your application
    
            SELECT * FROM /iqx/formhd_inst INNER JOIN /iqx/formhd
              ON /iqx/formhd~zform_name =  /iqx/formhd_inst~zform_name
              INTO CORRESPONDING FIELDS OF TABLE et_instances
              WHERE /iqx/formhd~ZFORM_NAME = lv_FormName
              AND ( deleted IS NULL OR deleted = ` ` ).
    
    ENDCASE.
    
    endmethod.
  3. Go into the /IQX/FAB_CONFIG and create a new Role.  Set the Implementing Class for Workflist value to the name of the class you created in step 1.
  4. Go into the Forms for Roles section and add a row that assigns the Application to the Role you just created.
  5. Go into the Roles for Users section and assign the necessary users to the Role you just created, ensuring you check the Admin flag.
  6. My Forms will now show an Administrator tab and return the instances you configured in the FILL_WORKLIST_FOR_ROLE method.



IQX Business Solutions - FAB 3.10