SSHR workflow information

Hi Gurus,
I have a below requirement. Appreciate if anyone can help.
Suppose if we do Assignment Change/New Hire/Termination etc functions through SSHR, then initially it stores
temporary on hr_api_transactions,hr_api_transaction_steps,hr_api_transaction_values till final approver approves it.
Once it is approved, it triggers API and commits into the system. User need a report to know who initiated,start_date,end_date and who approved etc details. As far i know it stores all these info in Workflow tables until DBAs purge it. Is there anyway we can get these details using Workflow tables. If Yes, can anyone have idea/query to get it.
Is there any approval history table which stores this information(person_id,transaction_id,start_date,end_date,status etc)?

try this to start:
SELECT *
FROM (SELECT wi.item_type,
wi.item_key,
wi.root_activity,
wav.display_name process_name,
wav.read_role,
wav.write_role,
wav.execute_role,
wav.begin_date wav_begin_date,
wav.end_date wav_end_date,
wi.root_activity_version,
wi.owner_role,
wi.parent_item_type,
wi.parent_item_key,
wi.parent_context,
wi.begin_date,
wi.end_date,
wi.user_key,
witv.NAME,
witv.display_name,
wf_directory.getroledisplayname
(wi.owner_role) AS role_name,
wf_fwkmon.getitemstatus
(wi.item_type,
wi.item_key,
wi.end_date,
wi.root_activity,
wi.root_activity_version
) AS status_code,
wf_fwkmon.getroleemailaddress (wi.owner_role) AS role_email,
DECODE
((SELECT COUNT (0)
FROM wf_items wi2
WHERE wi.item_type = wi2.parent_item_type
AND wi.item_key = wi2.parent_item_key),
0, 'WfMonNoChildren',
'WfMonChildrenExist'
) AS child_switcher
FROM wf_items wi,
wf_item_types_vl witv,
wf_activities_vl wav
WHERE wi.item_type = witv.NAME
AND wav.item_type = wi.item_type
AND wav.NAME = wi.root_activity
AND wav.VERSION = wi.root_activity_version ) qrslt
WHERE item_type = :1
AND begin_date >= TO_DATE ('30-MAY-2010 08:00:00', 'DD-MON-YYYY HH24:MI:SS' )
ORDER BY item_key,wav_begin_date

Similar Messages

  • R/3 workflow information

    Is it possible to store "workflow" information in BW?  We currently use a customised program in R/3 to retrieve this information, but would prefer to access it via BW if possible.
    Regards, Frederick

    Hi Niharika,
    I think you have a typo in your code. You can retrieve the work item id by using [code]<Property name="DynamicParameter" value="wi_id=${item.<b>externalId</b>}" />[/code] instead of [code]<Property name="DynamicParameter" value="wi_id=${item.<b>externaId</b>}"/>[/code]
    In addition, you can get values from the work item container by extracting them as custom attributes:
    [code]<ItemType name="uwl.task.webflow.TS90000001.<system id>" connector="WebFlowConnector" ...>
      <ItemTypeCriteria ... />
      <CustomAttributes>
      <CustomAttributeSource id="WEBFLOW_CONTAINER" objectIdHolder="<element name>" ...>
      <Attribute name="<element name>" type="string" displayName="<element description>" />
      </CustomAttributeSource>
      </CustomAttributes>
      <Actions>
        <Action name="launchWebDynPro" handler="SAPWebDynproLauncher">
          <Properties>
            <Property name="DynamicParameter" value="<custom param>=${item.<element name>}" />
          </Properties>
          <Descriptions default="" />
        </Action>
      </Actions>
    </ItemType>[/code]
    Hope this helps,
    Mikko

  • UCCE 7.5 - CAD - In which database workflow information is stored?

    Hi guys,
    I'm wondering in which database the workflow information is stored for CAD agent.
    In fact, how does Cisco Desktop Administrator works?
    Thank you very much for your attention.
    Best Regards,

    All is stored in the LDAP - Directory Services. The Sync process pulls ICM information from the AW DB and inserts it into the LDAP.
    You can see all of the info with a LDAP browser. Download a free LDAP Browser and connect anonymously - you can browse it and see how it is laid out. I have posted instructions on how to access the LDAP before, if you care to search for the post.
    Regards,
    Geoff

  • Read currently running workflow information

    Hi everybody,
    Please let me know if anyone came across a situation where we need to read the currently running workflow information..
    To be precise, I have a workflow which starts a method, which in turn executes code present in an include.. Now, in this include, I need to know whether it was called from the workflow.. (What i mean to say is that, the include could have been called from many places.. like BAdI methods etc.. I need to execute a specific action only if it was called from the workflow.)
    The plan could be something like.. "read all the currently running workflows and get the related information" .. Any idea how????
    Regards,
    Arun B

    Hello again,
    well, as long nobody else runs jobs using this background-user or changes the user-ID of the workflow-system, it'll work fine.
    To be more precisely on the WF-BATCH user, you could also check for the configured name. Anyways, for a quick check/fix you could be fine when using this procedure.
    However it'll not work within work-item execution from dialog-tasks, as then the actual user processed the code.
    So here's the code snippet to determine the workflow user's user-id:
    *Method signature:
    * RETURNING VALUE( RV_WF_BATCH ) TYPE XUBNAME
    *   "User Name of workflow background user
    method GET_WORKFLOW_USER.
       DATA: lv_rfcdest             TYPE RFCDES-RFCDEST.
    *   Read the RFC destination from workflow basic customizing
       CALL FUNCTION 'SWW_WIM_RFC_DESTINATION_NAME'
          IMPORTING
             WORKFLOW_DESTINATION       = lv_rfcdest.
    *   Read the user-ID from this destination
       CALL FUNCTION 'RFC_READ_L_DESTINATION'          "#EC CI_USE_WANTED
           EXPORTING
              DESTINATION               = lv_rfcdest   "#EC CI_USE_WANTED
              AUTHORITY_CHECK           = ' '
           IMPORTING
              USER                      = rv_wf_batch
           EXCEPTIONS
              OTHERS                    = 0.
    endmethod.

  • Where can I find the source code of the sshr workflow source file?

    Dear all:
    Where can I find the source code of the sshr workflow?
    Regards
    Terry

    Dear all:
    I found the answer, usually the workflow of the self-service 4.1 is HRSSA
    Regards
    Terry

  • Workflow information combine to one view/list

    I current have a list setup in sharepoint, with workflow created.
    I have created the rule using custom workflow created in designer.
    1)First guy fills in content of list and starts the workflow. 2) 2nd guy is assigned certain information to provide, and he does that. 3) 3rd guy will need information from both guys and make decision (approved or rejected).
    My issues is when 3rd guy is assigned to the task, he can only view stuff from 1st guy. Seeing the information from the 2nd guy is a lot harder and not that clear.
    Does anyone know if I am able to have view where the 2nd guys information is added to the view for 3rd guy (or similar). its really annoying me.
    Thanks!

    Are the columns that the second guys is required to fill in consistent?  If so, than a static view with just these columns in might be the answer.
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Workflow Information

    Hello Everyone,
    I am looking for infomation on CRM Workflow and how to use to standard workflow for specific business case.I have gone through help.sap.com to find out some information, I got idea...but looking for more information how to use to workflow.
    Any information or documentation would be great help.
    Thanks,
    Ajay

    Hi Ajay,
              I am also in ur situation.. to know about CRM Workflow... If i got any information about workflow(CRM)..  i will share with u... I am expecting from ur help also... id : [email protected]. Can u share about the information in help.sap.com..
    thanks in advance
    sk

  • Attribute & workflow information missing - serious problem

    Hi
    I have a peculiar problem......
    I have been using the repository for a few days now & all of a sudden i realised that the attribute names that i created in Data Manager have disappeared, rest of the attribute information are intact. The attributes are without any name & description. Similarly i was working on the workflow & later even their names & description got disappeared, though the workflows & other details are intact. My server is in a secure area & i am sure nobody has tampered with the database. The other repositories which i have not been using for the last few days are good.
    Has anybody faced this problem before & how can i trace what has gone wrong & how to get back the deleted information? Any suggestions.
    Arvind

    Hi,
    could you please stop the repository and Load it with "Update Indizes" again?
    This should solve the problem.
    Regards,
    Florens

  • Customize SSHR workflow

    We want to notify HR department of any address changes made by an employee using SSHR so that they can update the payroll system details. How do we achieve this functionality using HR workflow (HRSSA)? We are also thinking of HR approval instead of FYI notification so that HR makes sure they update payroll system before approving the changes. So instead to sending the approval to hierarchy we want to send the approval to HR. Please help.

    You can use AME to create a Approval Group with HR user. That will send address changes for approval to the specified HR user.

  • Save workflow information

    Hi,
    I have the following scenario:
    - A user gets added to a group using workflowSaveChangeAttributeRequest function sent to the OAM server using IdentityXML.
    - The workflow is initiated by a third-party person in a page that does not have the credentials of the user to be added to the group.
    - Therefore, I have created a hardcoded account that has access to initiate the workflow, say admin/password.
    - When the workflow is initiated (onclick of a button in my custom page) admin/password get inserted in the identityXML on the server side, and user (e.g. user1) gets added to the group (e.g. group1).
    The problem:
    - When I check the workflow logs using the Monitor Requests tool of OAM I can't track which user was added to the group. Only which user initiated it which is of no use to me.
    Possible solutions:
    - I tried setting the workflow initiation permissions to "anyone", and tried initiating the workflow (through IdentityXML) with no credentials at all. It didn't work.
    - I tried finding a field or an option in OAM to save some information with the request. I didn't find anything.
    Does anyone have an idea about how to solve this?

    I think there is no need to complicate it you can just enable the approvals through email so whatever the mobile used the manager will receive an email and he can take action through email.

  • How to build a Report from workflow information

    Hi Friends,
    I want to create a sales order approval and rejection steps using workflow. For this I have created User Decision Step where I have included approval and rejection decisions. And it is working fine. But the thing is that user wants a report for later analyis by giving sales order info. in selection and in output he need SO number,creation date, approver name, how many times he rejected, rejection date, approval date etc. How to achieve this? Is there any standard report programs available to get this type of info? kindly assist me.
    Rewarded...
    Thanks in advanace,
    Steve.

    Hi Stephen!
    Take a look this example I've developed a report like this.
    REPORT ZSICREP001 .
    INCLUDE ZSICREP001I.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
        PARAMETERS: S_UNAME LIKE USR02-BNAME OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK B1.
    INITIALIZATION.
      PERFORM zf_init_alv USING p_var.
    START-OF-SELECTION.
      PERFORM busca_nome USING S_UNAME CHANGING LC_NAME.
      CONCATENATE 'Tarefas de:' LC_NAME INTO TITULO SEPARATED BY SPACE.
      PERFORM: busca_dados,
               prepara_dados,
               zf_monta_tabela_alv,
               zf_monta_layout,
               ZF_SORT_SUBTOTAL,
               zf_executa_funcao_alv TABLES t_alv USING ' '.
    END-OF-SELECTION.
    Executa a busca dos dados no BD.
    Form Busca_Dados.
         CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
              EXPORTING
                 percentage = 15
                 text       = 'Buscando dados ...'.
      Busca o histório das tarefas executadas pelo usuário informado.
         Select WI_ID
                METHOD
                METH_EDATE
                METH_ETIME
         FROM SWWLOGHIST
         INTO TABLE T_SWWLOGHIST
         WHERE METHOD    EQ 'SWW_WI_STATUS_TO_COMPLETED' AND
               METH_USER EQ S_UNAME.
         IF SY-SUBRC EQ 0.
          BUSCA O LOG DE CRIAÇÃO DA TAREFA
            Select WI_ID
                   METHOD
                   METH_EDATE
                   METH_ETIME
            FROM SWWLOGHIST
            INTO TABLE T_SWWLOGHIST_CRIA
            FOR ALL ENTRIES IN T_SWWLOGHIST
            WHERE WI_ID     EQ T_SWWLOGHIST-WI_ID AND
                  METHOD    EQ 'SWW_WW_CREATE'    AND
                  METH_USER EQ 'WF-BATCH'.
         ENDIF.
         CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
              EXPORTING
                percentage = 35
                text       = 'Buscando dados ...'.
      Busca as tarefas aguardando execução do usuário.
         CONCATENATE 'US' S_UNAME INTO S_ORG_OBJ.
         Select WI_ID
         FROM SWWORGTASK
         INTO TABLE T_SWWORGTASK
         WHERE ORG_OBJ EQ S_ORG_OBJ.
    Para cada tarefa aguardando execução, busca o evento de criação da
    tarefa e appenda na tabela de histórico
         IF SY-SUBRC EQ 0.
            SORT T_SWWORGTASK BY WI_ID.
            Select WI_ID
                   METHOD
                   METH_EDATE
                   METH_ETIME
            FROM SWWLOGHIST
            APPENDING TABLE T_SWWLOGHIST_CRIA
            FOR ALL ENTRIES IN T_SWWORGTASK
            WHERE WI_ID     EQ T_SWWORGTASK-WI_ID AND
                  METHOD    EQ 'SWW_WW_CREATE'    AND
                  METH_USER EQ 'WF-BATCH'.              .
         ENDIF.
         CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
              EXPORTING
                percentage = 45
                text       = 'Buscando dados ...'.
    Endform.
    PREPARA OS DADOS
    FORM prepara_dados.
    DATA: lc_hoje  like SWWLOGHIST-METH_EDATE,
          lc_index type i.
    LC_HOJE = SY-DATUM.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
         percentage = 50
         text       = 'Preparando dados ...'.
    SORT T_SWWLOGHIST      BY WI_ID METH_EDATE METH_ETIME.
    SORT T_SWWLOGHIST_CRIA BY WI_ID.
    LOOP AT T_SWWLOGHIST_CRIA.
         PERFORM BUSCA_REQUISICAO USING T_SWWLOGHIST_CRIA-WI_ID
                                                 CHANGING l_NUM_REQ l_WIPAI.
    Se o número da req. vier em branco é porque o workitem nao é do SIC.
         IF NOT l_NUM_REQ IS INITIAL.
          BUSCA O EVENTO DE EXECUCAO DA TAREFA
            READ TABLE T_SWWLOGHIST WITH KEY WI_ID = T_SWWLOGHIST_CRIA-WI_ID
                                                              BINARY SEARCH.
            IF SY-SUBRC EQ 0.
               l_DTEXECTASK = T_SWWLOGHIST-METH_EDATE.
               l_HREXECTASK = T_SWWLOGHIST-METH_ETIME.
            ELSE.
               l_DTEXECTASK = ''.
               l_HREXECTASK = ''.
            ENDIF.
            T_ALV-WORK_ITEM        = T_SWWLOGHIST_CRIA-WI_ID.
            T_ALV-EXEC_TAREFA      = l_DTEXECTASK.
            T_ALV-HORA_EXEC_TAREFA = l_HREXECTASK.
            T_ALV-CRIA_TAREFA      = T_SWWLOGHIST_CRIA-METH_EDATE.
            T_ALV-HORA_CRIA_TAREFA = T_SWWLOGHIST_CRIA-METH_ETIME.
            T_ALV-REQUISICAO       = l_NUM_REQ.
            T_ALV-WIPAI            = l_WIPAI.
          BUSCA O TIPO DO FLUXO
            SELECT SINGLE FLUXO
            FROM ZSICREQUISICAO
            INTO T_ALV-FLUXO
            WHERE BANFN EQ T_ALV-REQUISICAO.
            APPEND T_ALV.
         ENDIF.
    ENDLOOP.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
           EXPORTING
                percentage = 75
                text       = 'Preparando dados ...'.
    SORT T_ALV BY REQUISICAO.
    LOOP AT T_ALV.
         AT NEW REQUISICAO.
    BUSCA O TIPO DO FLUXO
            SELECT SINGLE FLUXO
            FROM ZSICREQUISICAO
            INTO T_ALV-FLUXO
            WHERE BANFN EQ T_ALV-REQUISICAO.
            PERFORM BUSCA_LOG USING T_ALV-REQUISICAO
                                    T_ALV-FLUXO
                              CHANGING T_LOG.
         ENDAT.
         CLEAR: T_ALV-ICONE.
    BUSCA O LOG DE CRIACAO DO WORKITEM
         READ TABLE T_LOG WITH KEY WORKITEM = T_ALV-WORK_ITEM.
         IF SY-SUBRC EQ 0.
            T_ALV-TEXTO_LOG_CRIA = T_LOG-TEXTO_LOG.
         ELSE.
            T_ALV-TEXTO_LOG_CRIA = ''.
         ENDIF.
    BUSCA O LOG DE EXECUÇÃO DO WORKITEM
         IF SY-SUBRC EQ 0.
            lc_index = SY-TABIX.
            lc_index = lc_index + 1.
            READ TABLE T_LOG INDEX lc_index.
            IF SY-SUBRC EQ 0.
               T_ALV-TEXTO_LOG_EXEC = T_LOG-TEXTO_LOG.
            ELSE.
               T_ALV-TEXTO_LOG_EXEC = ''.
            ENDIF.
         ENDIF.
    Calcula o tempo que a tarefa ficou parada
         IF NOT T_ALV-EXEC_TAREFA = ''.
            T_ALV-DIAS = T_ALV-EXEC_TAREFA - T_ALV-CRIA_TAREFA.
         ELSE.
            T_ALV-DIAS = LC_HOJE - T_ALV-CRIA_TAREFA.
           WRITE icon_red_light AS ICON TO t_alv-icone.
         ENDIF.
         MODIFY T_ALV.
    ENDLOOP.
    ENDFORM.
    BUSCA A REQUISIÇÀO ATRAVES DO WORKITEM.
    FORM BUSCA_REQUISICAO USING l_WI CHANGING NUMREC WI_PAI.
    DATA: LC_NUMREC LIKE SWW_CONTOB-OBJKEY.
    CLEAR:  l_SWR_WIHDR.
    BUSCA O WORKITEM PAI.
    CALL FUNCTION 'SAP_WAPI_GET_HEADER'
        EXPORTING
          workitem_id         = l_WI
        IMPORTING
          WORKITEM_ATTRIBUTES = l_SWR_WIHDR.
    BUSCA O NUMERO DA REQUISICAO.
    SELECT SINGLE OBJKEY
    FROM SWW_CONTOB
    INTO LC_NUMREC
    WHERE WI_ID   EQ l_SWR_WIHDR-WI_CHCKWI AND
          ELEMENT EQ 'REQUISITIONHEADER'   AND
          OBJTYPE EQ 'BUS2105'.
    IF SY-SUBRC EQ 0.
       NUMREC = LC_NUMREC.
       WI_PAI = l_SWR_WIHDR-WI_CHCKWI.
    ELSE.
       NUMREC = ''.
       WI_PAI = ''.
    ENDIF.
    ENDFORM.
    Monta a estrutura do relatório
    FORM ZF_MONTA_TABELA_ALV.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
           EXPORTING
                percentage = 80
                text       = 'Montando a estrutura do relatório...'.
    CLEAR t_fieldcat.
    t_fieldcat-fieldname        = 'ICONE'.
    t_fieldcat-tabname          = 'T_ALV'.
    t_fieldcat-reptext_ddic     = 'Status'.
    t_fieldcat-inttype          = 'C'.
    t_fieldcat-no_out           = 'X'.
    APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'REQUISICAO'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Requisição'.
      t_fieldcat-inttype          = 'C'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'CRIA_TAREFA'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Dt.Rec.Tarefa'.
      t_fieldcat-inttype          = 'D'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'HORA_CRIA_TAREFA'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Hr.Rec.Tarefa'.
    t_fieldcat-inttype          = 'C'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'TEXTO_LOG_CRIA'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Log do recebimento da tarefa'.
      t_fieldcat-inttype          = 'C'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'EXEC_TAREFA'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Dt.Exec.Tarefa'.
      t_fieldcat-inttype          = 'D'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'HORA_EXEC_TAREFA'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Hr.Exec.Tarefa'.
    t_fieldcat-inttype          = 'C'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'TEXTO_LOG_EXEC'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Log da execução da tarefa'.
      t_fieldcat-inttype          = 'C'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'DIAS'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Dias'.
      t_fieldcat-inttype          = 'I'.
      t_fieldcat-do_sum           = 'X'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'WORK_ITEM'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Work Item'.
      t_fieldcat-inttype          = 'C'.
      t_fieldcat-no_out           = 'X'.
      APPEND t_fieldcat.
    CLEAR t_fieldcat.
    t_fieldcat-fieldname        = 'WIPAI'.
    t_fieldcat-tabname          = 'T_ALV'.
    t_fieldcat-reptext_ddic     = 'WI Pai.'.
    t_fieldcat-inttype          = 'C'.
    t_fieldcat-no_out           = 'X'.
    APPEND t_fieldcat.
    ENDFORM.
          Form  zf_sort_subtotal
          Classificação e item de subtotalização
    FORM ZF_SORT_SUBTOTAL.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
           EXPORTING
                percentage = 90
                text       = 'Montando a estrutura do relatório...'.
         CLEAR t_sort.
         t_sort-spos      = 1.
         t_sort-fieldname = 'REQUISICAO'.
         t_sort-tabname   = 'T_ALV'.
         t_sort-up        = 'X'.
         t_sort-subtot    = 'X'.
         append t_sort.
         CLEAR t_sort.
         t_sort-spos      = 2.
         t_sort-fieldname = 'CRIA_TAREFA'.
         t_sort-tabname   = 'T_ALV'.
         t_sort-up        = 'X'.
         append t_sort.
    ENDFORM.
    BUSCA A LINHA DO LOG REFERENTE AO WORKITEM
    FORM BUSCA_LOG USING NUM_REQ TIPO_WFLOW CHANGING LOG STRUCTURE T_LOG.
    DATA: lh_wis like SWWWIHEAD occurs 0 with header line,
          lc_wiatual  type TP_DADOSWI,
          lc_noant    like ZSICDESETAPA-NODE_ID,
          lc_chckwi   like swwwihead-wi_chckwi,
          lh_itemlist like SWWWIHEAD occurs 0 with header line,
          lc_wid      like swwwihead-wi_id,
          lc_objkey   like SWW_CONTOB-OBJKEY.
    BUSCA TODAS AS INSTANCIAS DO FLUXO
    lc_objkey = NUM_REQ.
    call function 'SWI_WORKITEMS_OF_OBJECT_GET'
         exporting
              objtype  = 'BUS2105'
              objkey   = lc_objkey
         tables
              itemlist = lh_itemlist.
    Elimina os Workitens que não sao de diálogo e não são de criação do
    *fluxo.
      delete lh_itemlist where not wi_chckwi is initial or wi_type <> 'F'.
    loop at lh_itemlist.
         Refresh: lh_wis.
         CLEAR:   lc_noant.
         lc_wid = lh_itemlist-wi_id.
       busca todos os workitems dependentes do WI pai
         call function 'SWI_GET_DEPENDENT_WORKITEMS'
              exporting
                wi_id         = lc_wid
              tables
                dependent_wis = lh_wis.
       elimina WI que não são de diálogo
         delete lh_wis where wi_type <> 'W'.
    Verifica se existe alguma tarefa para o usuário informado se não
    existir, né há necessidade de entrar no loop.
         READ TABLE lh_wis WITH KEY WI_AAGENT = S_UNAME.
         CHECK SY-SUBRC EQ 0.
         Loop at lh_wis.
            busca nó
              search lh_wis-wi_creator for lh_wis-WI_CHCKWI.
              lc_wiatual-node_id = lh_wis-wi_creator+sy-fdpos(22).
    busca o SUBWORKFLOW que a tarefa pertence.
              select single wi_rh_task
              into lc_wiatual-task
              from swwwihead
              where wi_id = lh_wis-WI_CHCKWI.
    Monta o log
             IF S_UNAME EQ lc_wiatual-agent.
                 LOG-WORKITEM = lh_wis-WI_ID.
                 PERFORM MONTA_LOG USING TIPO_WFLOW
                                         lc_wiatual-task
                                         lc_wiatual-node_id
                                         lc_noant
                                         lc_wiatual-agent
                                         lh_wis-WI_AAGENT
                                CHANGING LOG-TEXTO_LOG.
                 APPEND LOG TO T_LOG.
    Busca o Agente
              lc_wiatual-agent = lh_wis-WI_AAGENT.
              lc_noant         = lc_wiatual-node_id.
         endloop.
    Endloop.
    ENDFORM.
    MONTA O TEXTO DO LOG.
    FORM MONTA_LOG USING TIPO_WF TAREFA NODE NODE_ANT AGENT AGENT_DEST
                                                      CHANGING TEXTO_LOG.
    Data: lc_DESETAPA LIKE ZSICDESETAPA,
          lc_LEN      TYPE I.
    BUSCA O TEXTO DO LOG.
    SELECT * UP TO 1 ROWS
    FROM ZSICDESETAPA
    INTO lc_DESETAPA
    WHERE TASK    EQ TAREFA   AND
          NODE_ID EQ NODE     AND
          FLUXO   EQ TIPO_WF.
    ENDSELECT.
    SE FOR ETAPA RECURSIVA
    IF lc_DESETAPA-RECURSIVA = 'X'.
       SELECT SINGLE LOG
       INTO TEXTO_LOG
       FROM ZSICETAPA_RECUR
       WHERE TASK       = TAREFA   AND
             NODE_ID    = NODE     AND
             FLUXO      = TIPO_WF  AND
             NODE_IDPAI = NODE_ANT.
    ELSE.
       TEXTO_LOG = lc_DESETAPA-LOG.
    ENDIF.
    IF NOT TEXTO_LOG IS INITIAL.
    Formata Mensagem DO USUARIO ORIGEM
       PERFORM busca_nome USING AGENT CHANGING LC_NAME.
       lc_LEN  = STRLEN( lc_NAME ).
       IF NOT lc_LEN IS INITIAL.
          REPLACE 'V1' LENGTH lc_LEN with lc_name(lc_LEN)
                                              INTO TEXTO_LOG.
       ELSE.
          REPLACE 'V1' LENGTH 2 WITH SPACE INTO TEXTO_LOG.
       ENDIF.
    Formata Mensagem DO USUARIO DESTINO
       PERFORM busca_nome USING AGENT_DEST CHANGING LC_NAME.
       lc_LEN  = STRLEN( lc_NAME ).
       IF NOT lc_LEN IS INITIAL.
          REPLACE 'V2' LENGTH lc_LEN with lc_name(lc_LEN)
                                              INTO TEXTO_LOG.
       ELSE.
          REPLACE 'V2' LENGTH 2 WITH SPACE INTO TEXTO_LOG.
       ENDIF.
    ELSE.
       TEXTO_LOG = ''.
    ENDIF.
    ENDFORM.
    BUSCA O NOME DO USUÁRIO
    form busca_nome using p_usrid CHANGING p_name.
      data ln_pernr like pa0105-pernr.
      check not p_usrid is initial.
    Busca o no.pessoal do usuário
      select pernr into ln_pernr up to 1 rows
      from pa0105
      where usrty eq '0001'
        and usrid eq p_usrid.
      endselect.
      if sy-subrc = 0.
    Busca o nome completo do usuário
        select ename into p_name up to 1 rows
        from pa0001
        where pernr eq ln_pernr.
        endselect.
        translate p_name to upper case.
      endif.
    endform.
    *&      Form  zf_monta_layout
          text
    -->  p1        text
    <--  p2        text
    form zf_monta_layout.
    Preenchendo algumas opções de impressão (Não é obrigatório)
    v_layout-expand_all          = 'X'. "Abrir subitens
    v_layout-colwidth_optimize   = 'X'. "Largura melhor possível da coluna
    v_layout-edit                = 'X'. "Permitir a edição
    v_layout-zebra               = 'X'. "Zebrar o relatório
    v_layout-info_fieldname      = 'COLOR'. "Cor da linha
    v_layout-no_totalline        = 'X'. "Não imprime a linha de Total.
    v_layout-totals_before_items = 'X'. "Imprime o total antes do item
    endform.                    " zf_monta_layout
    Best Regards
    Luciano Barreto

  • How to add attachments to seeded sshr workflow  process

    Hi all,
    i have a requirement to send an offer letter as  an attachment after the final approver
    clicks on approve button  , ideally the requester is supposed to  receive  a notification of approval and
    a pdf offer letter as an attachment.Currently am  not using a custom workflow but the seeded HRSSA workflow item type
    and the process am using is HR_SIT_JSP_PRC this requirement is urgent any help will be appreciated .
    thanks in advance.

    Hello Ravi,
    Please take a look at: Add attachments to the Interactive form of a Web dynpro application
    Please take a look at my reply there on Mar. 29, 2007. I am not sure but i assume that you are using Web Dynpro for Java. Attachment capability is available with NW04s SP10 (both runtime and NWDS). Although, SP09 contains the required web dynpro runtime changes but the API has only been made part of SP10. Follow the note numbers provided therein.
    Best Regards,
    Krish

  • How to Navigate Directly to Manager SSHR Personal Information

    Hi there,
    Is it possible to navigate directly to an employees personal information either via a function or a url call?
    For example a function to simulate navigating to:
    Manager Self Service -> Personal Information -> Search for EmployeeA and start actions
    Using the function HR_PERINFO_MGR_SS I can navigate to Manager Self Service -> Personal Information but I still have to enter the EmployeeA name which is what I want to avoid. Ideally I would like to pass the personID.
    Does anyone know if this is possible?
    Many thanks,
    Mike

    Thanks for the reply. I tried your suggestion of redirecting to the view activity URL using the code below.
    ControllerContext controllerContext = ControllerContext.getInstance();
    String viewId = "RootFlow1/PageOne";
    String url = controllerContext.getGlobalViewActivityURL(viewId);
    System.out.println(url);
    FacesContext.getCurrentInstance().getExternalContext().redirect(url);
    the sysout prints the URL below
    /TestUIShell-ViewController-context-root/faces/RootFlow1/PageOne?_adf.ctrl-state=qlewpla4_41
    However, I get a 404, saying that it can't find the page. I tried modifying some of the flow settings to get it to work. I set the redirect property on the view to true and the URL Invoke visiblity on the flow to url-invoke-allowed, but I still get a 404. What am I missing?
    To give you more info about our app, we are using an outer page template to define the layout of the app (like the Fusion UIShell) and an inner page template to define the main area where pages will be rendered. Navigation is achieved by putting the main area flow in a dynamic region. When the user clicks a lnk, we swap out the task flow id on the region. Once they are in the region, navigation is normal ADF navigation within just that region.
    I read both of the threads that you referenced, but I don't see anything in there that I can use (maybe I'm missing it). Are there other ways to navigate to a view in a flow that I am missing?
    Thanks!!
    Mike

  • SSHR Extra Information Type - Restricting date entered

    As part of out draft SSHR build, we have created an EIT (and made it available via a function in Self-Service) to capture MOT and Licence Expiry Dates relating to an employee's private vehicle.
    Is it possible to restrict the date entered to prevent users entering a past date i.e. an expired MOT/Licence?
    Many thanks,

    Create user hook for the API hr_person_extra_info_api.
    In the user hook write your code to validate.
    It will raise error in the page.
    Regards,
    Peddi.

  • Workflow Information System (WIS)

    Hi all,
    Recently i came to know about WIS.
    When i researched, i found that it is a workflow reporting tool for LIS (Logistics) system only.
    (1) Then what about workflow reporting for non-LIS system ?
    (2) From SDN, I discovered that it is going to be obselete soon. Then what is the alternative for the same ?
    Please answer my qus.
    (3) I will highly appreciate if you can give more practical examples of the WIS reporting.
    In SDN, till now no clear cut explanation is posted for WIS.
    Let's make this thread count so that others can leverage from it.
    Regards,
    Debi

    Any body who can answer my question ?
    Thanks,
    Debi

Maybe you are looking for