INTERFACE zif_wfe_data
  PUBLIC .
  TYPES: BEGIN OF ts_return,
           type    TYPE bapi_mtype,
           message TYPE string,
         END OF ts_return .
  TYPES:
    tt_return TYPE STANDARD TABLE OF ts_return WITH EMPTY KEY .
  TYPES: BEGIN OF ts_params_sl,
           selname TYPE  fieldname,
           kind    TYPE  rsscr_kind,
           sign    TYPE  tvarv_sign,
           option  TYPE  tvarv_opti,
           low     TYPE  rvari_val_255,
           high    TYPE  rvari_val_255,
         END OF ts_params_sl.
  TYPES tt_params_sl TYPE STANDARD TABLE OF ts_params_sl WITH EMPTY KEY.

  CONSTANTS: BEGIN OF cs_wf_process,
               BEGIN OF step_status,
                 active    TYPE zwfe_e_step_status VALUE 'A',
                 completed TYPE zwfe_e_step_status VALUE 'C',
               END OF step_status,
               BEGIN OF wf_status,
                 active    TYPE zwfe_e_wf_status VALUE 'A',
                 completed TYPE zwfe_e_wf_status VALUE 'C',
                 draft     TYPE zwfe_e_wf_status VALUE 'D',
                 rejected  TYPE zwfe_e_wf_status VALUE 'R',
               END OF wf_status,
               BEGIN OF step_result,
                 approve TYPE zwfe_e_step_result VALUE 'A',
                 reject  TYPE zwfe_e_step_result VALUE 'R',
               END OF step_result,
             END OF cs_wf_process.

  CONSTANTS: BEGIN OF cs_model_data,
               BEGIN OF header,
                 prefix TYPE string VALUE 'HEADER',
                 BEGIN OF structure,
                   key    TYPE strukname VALUE 'ZWFE_S_HEADER_KEY_FIELDS',
                   fields TYPE strukname VALUE 'ZWFE_S_HEADER_FIELDS',
                   all    TYPE strukname VALUE 'ZWFE_S_HEADER_ALL_FIELDS',
                 END OF structure,
                 BEGIN OF fields,
                   wf_id         TYPE fieldname VALUE 'WF_ID',
                   workflow      TYPE fieldname VALUE 'WORKFLOW',
                   status        TYPE fieldname VALUE 'STATUS',
                   wf_status     TYPE fieldname VALUE 'WF_STATUS',
                   ernam_process TYPE fieldname VALUE 'ERNAM_PROCESS',
                   ernam         TYPE fieldname VALUE 'ERNAM',
                   aenam_process TYPE fieldname VALUE 'AENAM_PROCESS',
                   aenam         TYPE fieldname VALUE 'AENAM',
                   creation_date TYPE fieldname VALUE 'ERDAT',
                   creation_time TYPE fieldname VALUE 'ERZET',
                   change_date   TYPE fieldname VALUE 'AEDAT',
                   change_time   TYPE fieldname VALUE 'AETIM',
                 END OF fields,
               END OF header,
               BEGIN OF values,
                 prefix TYPE string VALUE 'VALUES',
                 BEGIN OF structure,
                   key    TYPE strukname VALUE 'ZWFE_S_VALUES_KEY_FIELDS',
                   fields TYPE strukname VALUE 'ZWFE_S_VALUES_FIELDS',
                   all    TYPE strukname VALUE 'ZWFE_S_VALUES_ALL_FIELDS',
                 END OF structure,
                 BEGIN OF fields,
                   wf_id TYPE fieldname VALUE 'WF_ID',
                   field TYPE fieldname VALUE 'FIELD',
                   value TYPE fieldname VALUE 'VALUE',
                 END OF fields,
               END OF values,
               BEGIN OF steps,
                 prefix TYPE string VALUE 'STEPS',
                 BEGIN OF fields,
                   wf_id       TYPE fieldname VALUE 'WF_ID',
                   status      TYPE fieldname VALUE 'STATUS',
                   step_status TYPE fieldname VALUE 'STEP_STATUS',
                   approved_by TYPE fieldname VALUE 'APPROVED_BY',
                   is_backup   TYPE fieldname VALUE 'IS_BACKUP',
                 END OF fields,
               END OF steps,
               BEGIN OF steps_approvers,
                 prefix TYPE string VALUE 'STEPSAPPROVERS',
                 BEGIN OF fields,
                   wf_id    TYPE fieldname VALUE 'WF_ID',
                   status   TYPE fieldname VALUE 'STATUS',
                   approver TYPE fieldname VALUE 'APPROVER',
                 END OF fields,
               END OF steps_approvers,
               BEGIN OF changelog,
                 BEGIN OF source,
                   header TYPE zwfe_e_changelog_source VALUE 'H',
                   values TYPE zwfe_e_changelog_source VALUE 'V',
                 END OF source,
                 BEGIN OF update_ind_pos,
                   insert TYPE cdchngind VALUE 'I',
                   update TYPE cdchngind VALUE 'U',
                   delete TYPE cdchngind VALUE 'D',
                 END OF update_ind_pos,
               END OF changelog,
               BEGIN OF update_ind,
                 new_wf         TYPE zwfe_e_change_ind VALUE 'NW',
                 edit_wf        TYPE zwfe_e_change_ind VALUE 'EW',
                 delete_wf      TYPE zwfe_e_change_ind VALUE 'DW',
                 full_delete_wf TYPE zwfe_e_change_ind VALUE 'FD',
                 continue_step  TYPE zwfe_e_change_ind VALUE 'CS',
                 edit_step      TYPE zwfe_e_change_ind VALUE 'ES',
               END OF update_ind,
             END OF cs_model_data.
  CONSTANTS: BEGIN OF cs_message,
               id TYPE arbgb VALUE 'ZWFE',
               BEGIN OF type,
                 sucess TYPE bapi_mtype VALUE 'S',
                 error  TYPE bapi_mtype VALUE 'E',
               END OF type,
             END OF cs_message.
ENDINTERFACE.
