Exclude task from workflow log

I have had a client ask me to stop several tasks in a particular workflow from appearing in the workflow log. There does not appear to be an option that does this. The options I see are
In all workflow logs
Only in technacal workflow log
Condition 'Complete Work Item ' True: Not in graf protocol
The user doesn't want to see certain taks in the log displayed via SWI1. Anyone know how to achieve this?
Cheers,
Ross

Dear Ross,
I guess this is not something that is soft customizing. This needs to have a change done in the workflow template.
As Rick mentioned, there are few steps where you have an option in the Outcomes tab "Not in Workflow Log" checkbox that is used to exclude that step from the log.
But this would call for a workflow change and would require a transport request.
Hope this helps!
Regards,
Saumya

Similar Messages

  • Pulling Multiple Approver Names from Workflow Logs for One Work Item

    I have a workflow design which requires multiple approvals per single work item.  I happen to have another functional design that is also pulling data from those same workflow logs.  Assuming I have multiple approvals at various levels for a single work item which table do I need to reference along with which fields to reference the different approvers per level of approval?

    Hello,
    The same tables. The principle is the same, just more agents.
    regards
    Rick Bakker
    Hanabi Technology

  • Exclude manager from workflow

    Hi experts,
    How to set start condition in workflow?
    here is my client case,
    if Manager create "travel request" than the workflow shouldn't trigger.
    I have create workflow, with start event of travel request created.
    for employee who has manager, when they create travel request, workflow will send "task" to manager for approve or reject the request.
    but, if the manager create travel request, I want the workflow to not be trigger.
    how to achieve this?
    thanks

    Hi,
    You can use check FM to control the triggering of WF.
    Check FM has object key as import parameter,you can use this key(pernr) to check whether the employee is manager or not.
    Use logic maintained by HR team that marks an employee as Manager.
    the interface for check FM is as below :
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(OBJTYPE) TYPE  SWETYPECOU-OBJTYPE
    *"     VALUE(OBJKEY) TYPE  SWEINSTCOU-OBJKEY
    *"     VALUE(EVENT) TYPE  SWETYPECOU-EVENT
    *"     VALUE(RECTYPE) TYPE  SWETYPECOU-RECTYPE
    *"  EXPORTING
    *"     REFERENCE(REFERENCE) TYPE  C
    *"  TABLES
    *"      EVENT_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOT_TRIGGERD
    Here objkey is key of BOR object used for Travel.
    Use logic to find whether employee is manager or not, and if not raise exception. This will stop WF to trigger .
    Once you have created the WF, go to SWE2 and look for entry of your BOR object and your Workflow template number.
    Display the entry and maintain your FM in 'Check Function Module'.
    If you want to debug the code, put an external Break point in Check FM and use SWUE to trigger the workflow.
    Regards,
    Sangvir Singh

  • How to exclude a task from ETL container

    Hi
    I am running Full ETL load for Oracle Financials R12.1.3 Vision instance, where one of the task is failing and due to that some 86 subsequent tasks are also failing.
    The task name is SDE_ORA_ProductDimension.
    I an suggested by Oracle Support to exclude that task from EP.
    Can someone tell me that how to exclude that from available Container, EP?
    OBIA release is 7.9.6.4 and Informatica 9.1
    You can find the details log of error here http://pastebin.com/hZRHJssi
    Thanks
    Naeem Akhtar
    Edited by: Naeem Akhtar Khan on Feb 28, 2013 8:44 PM

    Hi,
    do you make a copy of a predefined container ?
    You cannot modify objects in the predefined source system containers either through the DAC Client or directly through SQL statements to the DAC repository. You must make a copy of a predefined container in order to make any changes to it.
    You could see how to create a copy of a predefined container in the Oracle DAC documentation : http://docs.oracle.com/cd/E25178_01/fusionapps.1111/e14849/dacquickstart.htm#BABJIIBB
    Hope it helps,
    Benoit

  • How to do reassingment of the task from the workflow.

    Hi,
    I have two work flow one is approval workflow & another is reassignment workflow in which manager approval is need for reassignment, once manager will approve, task should be reassing to requested user in approval workflow. How can i reassign the task from process 2 to process1. Please suggest.
    Thanks
    Edited by: 949691 on Sep 27, 2012 6:27 PM

    I haven't tried it for this, but try using a correlation.
    Create the correlation in the process you want to notify -> add an event subprocess in that process who's start event is an interrupting Message event that takes a string as input that is the user id you want to reassign it to -> add an Update Task in the event in the event subprocess -> change the Update Task's operation to "Reassign" and assign it to the user id that the notifying processes sends in -> have the notifying process send the notification into this process with the user id you want to reassign the instance to.
    In his blog post from about a year ago, Arun Pareek did an infinitely better job of explaining correlations than I have - http://beatechnologies.wordpress.com/2011/10/17/working-with-custom-correlation-in-oracle-bpm-suite-11g-ps4-feature-pack/.
    Hope this helps,
    Dan

  • Script to parse last 24 hours from TaskScheduler Log Cannot figure out how to prase a single task.

    All,
    I've been tasked with parsing a single task from a server scheduled task and email that to a couple individuals and a distribution list. I had the email portion working, and am now getting...
    ‘You cannot call a method on a null-valued expression.
    $smtp.Send(&msg)
    It is defined ‘$msg = new-object Net.Mail.MailMessage’
    I also need to parse out only a specific task in the log. I have tried everything that I can think of and find to get to that level, but this is my first attempt at PowerShell. Here is what I have so far.
    # Written by Shawn Miller #
    # Parse Task Scheduler Log and #
    # Email log to Regional Support #
    # and End-Users #
    # 4 FEB 14 ver. 1 #
    # Parse scheduler log and create file
    $yesterday = (get-date) - (new-timespan -day 1)
    $events = get-winevent -FilterHashtable @{logname = "Microsoft-Windows-TaskScheduler/Operational"; ID = "201","202"; StartTime = $yesterday} | Format-List -Property Message | out-file "c:\stuff\test.log"
    $events |foreach {
    $_
    # Create new email
    $smtpServer = “phcmail.peabodyenergy.com”
    $msg = new-object Net.Mail.MailMessage
    #From Address
    $msg.From = "Monitoring Admin <[email protected]>"
    #To Address, Copy the below line for multiple recipients
    $msg.To.Add(“[email protected]”)
    #$msg.To.Add(“[email protected]”)
    #$msg.To.Add(“[email protected]”)
    #$msg.To.Add(“[email protected]”)
    #Message Body
    $msg.Body=”Attached is the status report for the EoM Midwest Engineering files copied to STLEN1.”
    #Message Subject
    $msg.Subject = “EoM Transfer report”
    write-host "SENDING FILES"
    #your file location
    $files=Get-ChildItem “C:\Stuff\report\”
    Foreach($file in $files)
    Write-Host “Attaching File :- ” $file
    $attachment = New-Object System.Net.Mail.Attachment –ArgumentList C:\Stuff\report\$file
    $msg.Attachments.Add($attachment)
    $smtp.Send($msg)
    $attachment.Dispose();
    $msg.Dispose();
    write-host "Mail Sent Successfully"
    Any help would be greatly appreciated.
    Respectfully,
    Shawn

    I would use PowerShell to do this but you need to fix a lot of the code you have copied from various places.  Most of it is old.
    Start with this:
    #Parse scheduler log and create file
    $yesterday =[DateTime]::Today.AddDays(-1)
    get-winevent -FilterHashtable @{logname = "Microsoft-Windows-TaskScheduler/Operational"; ID = "201","202"; StartTime = $yesterday} |
    Format-List -Property Message |
    out-file c:\stuff\test.log
    $mailprops=@{
    SmtpServer='phcmail.peabodyenergy.com'
    From ='Monitoring Admin <[email protected]>'
    To='[email protected]','[email protected]'
    Body='Attached is the status report for the EoM Midwest Engineering files copied to STLEN1.'
    Subject='EoM Transfer report'
    $files=Get-ChildItem C:\Stuff\report\
    Send-MailMessage @mailprops -Attachments $files
    write-host "Mail Sent Successfully"
    It is more likely to work assuming you have access to an SMTP server which is not likely in a domain.  Check with your domain admins to find out how to gain access.
    ¯\_(ツ)_/¯

  • Calling Webdynpro application from Workflow Task

    Hi All,
    How do i call a custom Java WebDynPro Application from my task? How to pass the container values to the Webdynpro application.
    Can some one help me out?
    Thanks,
    Sarath

    Hi sarath,
    u see this thread, u get more information
    calling web dynpro from workflow - SWFVISU
    Calling Java code from Webdynpro Abap UI
    WebDynpro application that can work with SAP workflow work items?
    WebDynpro in Workflow
    Regards,
    vino

  • Launching webdynpro ABAP application from workflow task  (without UWL)

    Hello,
    How can i start webdynpro ABAP application from workflow without portal?
    Workflow and webdynpro ABAP are located on the same system.
    I assume it must be possible without transaction SWFVISU.
    thanks
    Regards
    Paul

    First you need to define a external service then you have to generate a task from this external service and then you need to include this task id in you workflow for a ACTIVITY step then this step can be either background or can be assigned to any agent
    you have to make use the below two Txn
    WF_HANDCUST and WF_EXTSRV

  • Excluding connections from certain hosts in log file

    Is it possible to exclude connections from certain IP addresses from
    getting written into the log on a 5.0 server?
    I have monitoring systems that do frequent health checks by binding to
    the server and it adds lots of lines to my logs (about 14 MB per day)
    that I don't need or care about. I'd like to exclude these connections
    from showing up.
    thanks,
    Gary LaVoy
    [email protected]

    Gary LaVoy wrote:
    Is it possible to exclude connections from certain IP addresses from
    getting written into the log on a 5.0 server?
    I have monitoring systems that do frequent health checks by binding to
    the server and it adds lots of lines to my logs (about 14 MB per day)
    that I don't need or care about. I'd like to exclude these connections
    from showing up.
    No, this is not possible
    What you can potentially do is to use the log file rotation and do something like a grep -v to supress the lines that you don't want in the rotated file that won't be used anymore by the server.
    Regards
    Daniel

  • Calling ABAP WebDyn Pro from Workflow task

    Hi All;
    Is there a way to call WebdynPro view from Workflow task?
    Regards
    Devraj

    hi,
    In the workitem text, you can provide HTTP link of your adobe interactive form, so this workitem will go to user with the hyperlink and when he will click, it will redirect it to your interactive form .
    regards,
    sirisha

  • WORKFLOW:Fetching agent for task from organisation plan

    Dear Experts,
    I have created organisation plan.
    Now I want to fetch agent for workflow task from the organisation plan created earlier.
    Can anybody kindly guide how logic can be written for rule to fetch agent for my task in workflow.
    Thanks,
    Sanjay

    Hi Deepthi,
    I guess unfortunately the answeris no. This question has been asked several times, if you search the forum you might find alternative ways to get this done. Check this [link|Can we change the user 'WF-BATCH' for the background task] for example.
    Regards,
    Saumya

  • Excluding task(s) from SPI or CPI Calculations

    Is there a mechanism to exclude task(s) from being included in the SPI/CPI calculations?
    The reason why I am asking this is we want to exclude a couple level of effort tasks from counting for or against the SPI/CPI.
    Thanks,
    Cheryl

    Thank you Prasanna and Guillaume for your input.
    Prasanna,
    Removing the baselines on the particular task(s) does seem to exclude some of the data from being included in SPI/CPI; however the baseline initially rolled up to the level 0 summary task, so with this approach either the SPI/CPI should be not
    be evaluated at the level 0 summary task level.  Instead the values should be viewed for the section of baselined tasks, assuming that the schedule was arranged to isolate the level of effort (LOEs) tasks to not include in SPI/CPI.  To avoid
    this issue, at the initial onset of schedule development ensure the LOEs are isolated and NEVER include these in the baseline, even in the initial baseline that way their values are excluded.  The ACWP will continue to get impacted, so CPI will always
    be impacted even at Level 0 summary task.  But we have some options, your suggestion allowed us to dig in these.  Thank you.
    Guillaume,
    We may take a look at this approach, however we rely on the task updates from actuals, so yes does sound like a bit more work.  But thank you for the suggestion.
    Cheryl

  • Unable to deploy BPM projects with human tasks from BPC

    I’m trying to edit and deploy a BPM process from Business Process Composer (web based tool). To do it, I followed the steps below:
    1.     I created I project in JDeveloper
    2.     I created the Human task from using the “Auto-generate task form” option
    3.     I converted it to a template
    4.     I published it to BPM MDS
    5.     On Business Process Composer I created I new project based on my published template
    6.     And I finally I deployed it with no errors.
    When I ran the BPM it creates I human task but I’m not able to access its form on Business Process Workspace.
    On Business Process Workspace I can see the task created by my BPM process, but when I click on it to access its form I get a 404 message (message below).
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
    I think this error occur because my Task form project was not deployed. To fix it I undeployed all the applications and then I deployed the BPM application with all its tasks forms from JDeveloper. It worked fine (I can actually access the task form on Business Process Workspace), but now I’m not able to edit the BPM process on Business Process Composer anymore.
    Then I finally repeated the steps 3 to 6 on top of this post in order to make the BMP process editable on Business Process Workspace but this time I receive the error at the end of this post taken from server log.
    No matters if I publish the project on MDS BMP repository as a template project or as non template project. I always have the same problem.
    So, how can I use a BPM project that contains Human Tasks forms on Business Process Composer?
    I’m using:
    •     JDevelopper: 11.1.1.5
    •     Oracle Soa Suite 11.1.1.5
    Error:
    <Error> <ServletContext-/soa-infra> <AUSDCCMTPRF03> <soa_server1> <[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <daba687c30fc2ae1:5f5821e2:131915bbc92:-8000-000000000001c442> <1312478914395> <BEA-000000> <Error during deployment
    oracle.fabric.common.FabricException: Deployment Failed: Error occurred during deployment of component: AssignVendorETATask to service engine: implementation.workflow, for composite: AlertBPMProject: ORABPEL-30123
    Error while deploying task metadata.
    The task namespace http://xmlns.oracle.com/AlertBPMApplication/AlertBPMProject/AssignVendorETATask is already used as a template namespace.
    Check if the project you are deploying now is a template project. Please avoid deploying template projects. Use a different namespace for the task definition to fix the problem or set the suffixNamespace flag to true.
    : Error while deploying task metadata.
    The task namespace http://xmlns.oracle.com/AlertBPMApplication/AlertBPMProject/AssignVendorETATask is already used as a template namespace.
    Check if the project you are deploying now is a template project. Please avoid deploying template projects. Use a different namespace for the task definition to fix the problem or set the suffixNamespace flag to true.
         at oracle.integration.platform.blocks.deploy.StandaloneCompositeDeploymentCoordinatorImpl.coordinateCompositeDeployment(StandaloneCompositeDeploymentCoordinatorImpl.java:62)
         at oracle.integration.platform.blocks.deploy.servlet.BaseDeployProcessor.deployNewComposite(BaseDeployProcessor.java:378)
         at oracle.integration.platform.blocks.deploy.servlet.BaseDeployProcessor.deploySARs(BaseDeployProcessor.java:226)
    Caused By: oracle.fabric.common.FabricException: Error occurred during deployment of component: AssignVendorETATask to service engine: implementation.workflow, for composite: AlertBPMProject: ORABPEL-30123
    Error while deploying task metadata.
    The task namespace http://xmlns.oracle.com/AlertBPMApplication/AlertBPMProject/AssignVendorETATask is already used as a template namespace.
    Check if the project you are deploying now is a template project. Please avoid deploying template projects. Use a different namespace for the task definition to fix the problem or set the suffixNamespace flag to true.
    : Error while deploying task metadata.
    The task namespace http://xmlns.oracle.com/AlertBPMApplication/AlertBPMProject/AssignVendorETATask is already used as a template namespace.
    Check if the project you are deploying now is a template project. Please avoid deploying template projects. Use a different namespace for the task definition to fix the problem or set the suffixNamespace flag to true.
         at oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.deployComponents(CompositeDeploymentConnection.java:244)
         at oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.deploy(CompositeDeploymentConnection.java:93)
    Caused By: oracle.fabric.common.FabricDeploymentException: ORABPEL-30123
    Error while deploying task metadata.
    The task namespace http://xmlns.oracle.com/AlertBPMApplication/AlertBPMProject/AssignVendorETATask is already used as a template namespace.
    Check if the project you are deploying now is a template project. Please avoid deploying template projects. Use a different namespace for the task definition to fix the problem or set the suffixNamespace flag to true.
    : Error while deploying task metadata.
    The task namespace http://xmlns.oracle.com/AlertBPMApplication/AlertBPMProject/AssignVendorETATask is already used as a template namespace.
    Check if the project you are deploying now is a template project. Please avoid deploying template projects. Use a different namespace for the task definition to fix the problem or set the suffixNamespace flag to true.
    {rootCauses=[]}
         at oracle.bpel.services.workflow.fabric.WorkflowServiceEngine.deploy(WorkflowServiceEngine.java:908)
         at oracle.bpel.services.workflow.fabric.WorkflowServiceEngine.deploy(WorkflowServiceEngine.java:368)
         at oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.deployComponents(CompositeDeploymentConnection.java:239)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused By: ORABPEL-30123
    Error while deploying task metadata.
    The task namespace http://xmlns.oracle.com/AlertBPMApplication/AlertBPMProject/AssignVendorETATask is already used as a template namespace.
    Check if the project you are deploying now is a template project. Please avoid deploying template projects. Use a different namespace for the task definition to fix the problem or set the suffixNamespace flag to true.

    I came across the same issue, and now resolved it like this.
    Firstly, you shouldn't deploy QuoteProcessLab with other UILabs like ApproveDealUILab and so on. So, if you already did it, then go to Weblogic EM and undeploy it.
    Secondly, you should deploy each of UILab separately as standalone application. So, deploy EnterQuiteUILab, BUsinessPracticesUILab, and so on each. These will run independently behind and when your project created based on template in the Composer runs, it will link each of these on human task.
    Thirdly, publish you QuoteProcessLab. And follow the book about how to create a project based on template in the Composer.
    Just one thing you should be careful with is, when you do auto-generation for human task, it sometimes doesn't work fully, unfinished halfway through. So, make sure that the icon 'go to existing business form taskflow' in .task file takes you to the human taskflow.
    If it fails, do another auto-generation. Sometimes DataBindings.cpx can get corrupted by JDev, but let's not go too far for now.
    Mostly, it will work.
    Sung

  • Error in Workflow log

    Hi All,
    I have got very little knowledge of workflows thus seeks the help from all of you.
    The problem is as folows.
    When I execute tcode SWI1 and click on any task it goes to the workflow log. When I click on the details of the workflow so the agents are displayed.But when I click on the object associated to any agent, the system displays and error message 'Error triggering method for Holiday Entitlement' where Holiday Entitlement is the Object associated to an agent.
    Please let me know why this error is occuring and how can I resolve it.
    Regards

    One possibility is insufficient authorization. I probably don't have to tell you how to resolve that.
    Another possibility, especially if the workflow has status "Error" is that the object does not have a valid key. I shouldn't have to tell you how to resolve that either. However, if this is the problem, and you need help to resolve it, you should tell us how your workflow is started.
    General hints: binding, binding, binding.

  • 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

Maybe you are looking for

  • Write file in OS/400 library

    Hi everybody I am requested to save data from ABAP to a flat file in a <b>library</b> in OS/400. The name of the library is LEISAP. Searching around, I found out that I can access it using the path /QSYS.LIB/LEISAP.LIB/ and it already has some files.

  • Unable to switch Macbook Pro off?

    Hi guys, I recently made the move from pc to mac, and while I have gotten used to mac now, I still have 1 or 2 problems with it.... I have a macbook pro 13, 2.66 ghz core 2 duo, which I got in january, and recently, it WON'T shut down! Its stuck at t

  • Call(PUSH) Button after executing report

    Hi, After executing report how to call select layout button automatically, and select layout screen display at output of screen after executing report. Regards Arpit

  • Need JavaHelp Solaris package to go with JDK 1.5 installation

    [Sorry - I had posted this in another forum before finding this forum...  Hope someone here can help...  Thanks!] Hi, I've installed the JRE component of JDK 1.5.0_20 on a Solaris 9 SPARC system, but it looks like that broke SMC. I think I found a so

  • Brasero Cannot burn cd using mp3 files [SOLVED]

    Everytime i try to burn an audio CD from mp3 files brasero gives me an error saying "Not suitable for audio or video media." I have all of the gstreamer plugins installed so thats not the problem. Ive seen a few posts on forums for other distros abou