Get parent work item at runtime

Hi all,
Is there any function module which would return parent work item ID base on child work item ID?
My situation is that I have a workflow W1 which starts sub workflow W2. I know the id of currently u2018In processu2019 work item of the sub workflow W2. Now I would like to get two things.
-     Work item ID of the parent sub workflow template W2
-     Work item ID of the top level workflow template W1
Could you possibly help?
Many thanks and best regards,
Petr

Info when you need to find Manually is as below
Goto SWI1 tcode, enter the work item id that you have.
Then select the workflow log(Shift + F8) from the menu.
In the workflow log, select the "List with Technical details"(Shift+F9).
This provides you all the details with work item IDs that you are looking for.
However if you are looking for this info programmatically.
A function module like SWW_WIS_HEADER_READ can help getting the info.
Regards,
Kartik Nayak.

Similar Messages

  • Notification based on parent work item's status

    Good afternoon all.
    Would anyone know how it will be possible to send a notification for a manual activity reassignment but only when the parent work item (service request for example) is 'In Progress'? I know this is not going to be possible in the console so has anyone managed
    to achieve this within XML?
    Any pointers would be great!
    Thanks, Joe

    Unfortunately, what you're asking for can't be done out-of-the-box, even with direct management pack manipulation.
    There are basically two types of subscriptions: instance and relationship subscriptions. They can't be mixed.
    It is still possible to accomplish what you want, but it would require some development effort if you want to build it yourself.
    There are some 3rd party options out there since this has been asked for a number of times in the past.
    For example from a quick search, both
    http://www.carbon60.com/send-email-notification-custom-activity-for-service-manager/ and
    https://andrewsprivatecloud.wordpress.com/2012/07/02/assignmentre-assignment-notifications-using-sco/ use Orchestrator.
    It could also be done with a powershell-based service manager workflow if you don't want to use Orchestrator.

  • Report to get cumulative effort based on child items related to parent work item

    We have created a new work item type called 'Release' 
    Release -> Features -> PBI/Bugs -> Tasks/Test Case
    I have requirement to create many reports that has to filtered across the Release work item been created. We usually slice it by Area/Iteration but here the requirement is different.
    For ex: 
    Releases Overview report:
    Release name| Owner as AssignedTo| Status Indicator | Completed Work | Remaining Work | Open Impediments
    I can fetch all the release work items (Work Items with System_workItemType =Release) w.r.to team project for this report. But for other calculations :
    Compute Open Impediments
    Find all the child items belong to the parent 'Release work item'
    Pick Open Impediments (Work_Item_Count with System_workItemType=Impediment and State = Open) in that list.
    Is this possible by querying olap ?  Or we need to go for stored procedures for querying warehouse?
    please give a fair idea to start with and good resources for learning MDX.
    Thanks
    Divya

    Hi Divya,
    Thanks for your post.
    To get the Release work items and all linked Impediments, you can try to create the Work item and direct links query, under Filters for lined work items section, set Type of trees = Parent/Child, work item type = Impediments and State = Open. Please refer
    to the information in this document:https://msdn.microsoft.com/en-us/library/dd286705.aspx?f=255&MSPPError=-2147217396.
    For such a Release Overview report, you need create your custom report. For the MDX resource, please refer to this document:https://technet.microsoft.com/en-us/library/ms144785.aspx?f=255&MSPPError=-2147217396.
    Or contact SQL Server Reporting Service experts for the better response
    And you can also create the work item report using TFS API.    
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • UWL Customization to get selected Work Items

    Hi,
    I am trying to get only selected Work Items in my UWL. I have tried modifying the XML file as per the link below but that didnt help . I am still getting all the work items in my UWL. I am using EP7 with SP13
    UWL Customization
    Thanks,
    -Ashwani

    solved the issue my myself

  • Getting UWL Work-items

    Hi all,
    I am trying to fetch all work-items out of an UWL for an user and display them.
    For this reason I have taken a look at: https://help.sap.com/javadocs/NW04S/current/uw/index.html
    Unfortunately I am absolutely not familiar using UWL-API and it is just overwhelming.
    Does anybody have a code example and a hint, what the most important classes in UWL-API are?
    Thank you for your help!
    Kind regards, Patrick.

    Hi Patrick,
    Go through :[http://help.sap.com/javadocs/NW04S/SPS09/uw/overview-summary.html]
    Using the UWL API inside a Web Service   
    [thread|Using the UWL API inside a Web Service;
    Regards
    Khushboo

  • ITS cannot can transform %3D into = and canu00B4t get the Work Item ID

    Hi experts,
    We have an ECC 6.0 EHP3 with a EP 7 (Netweaver 2004s SP18). We use the UWL.
    The issue is when we try to open a taks in the UWL that launch a transaction in the ECC, it can´t open, show this error:
    Transaction SWK1+WI_ID=000000005 is unknown
    This is because in the parameter "DynamicParameter" it pass the value "wi_id%3D000000005004". It can´t resolve "%3D" and change it for "=" so lost the last 3 characteres, try to opens the WI_ID=000000005 instead the WI_ID=000000005004.
    The url is try to open is this:
    http://asvesap002.forcendm.es:50100/irj/servlet/prt/portal/prteventname/navigate/prtroot/pcd!3aportal_content!2fZDiseno!2fZDesktop!2fcom.sap.portal.defaultDesktop!2fframeworkPages!2fcom.sap.portal.frameworkpage!2fcom.sap.portal.innerpage!2fcom.sap.portal.contentarea?NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fevery_user%2Fgeneral%2Fuwl%2Fcom.sap.netweaver.bc.uwl.uwlSapLaunch&System=Memorias&TCode=swk1&UseSPO1=false&AutoStart=true&DynamicParameter=wi_id%3D000000005004&CurrentWindowId=WID1248779358537&NavMode=1
    If i copy this url in a browser and chage %3D for = , DynamicParameter=wi_id=000000005004 , it works fine, open the workitem.
    Here is the code for the task in the uwl xml:
    In the iview "UWL - Launch SAP Transaction", com.sap.netweaver.bc.uwl.uwlSapLaunch, i put the "NO" value for the property "Transaction Supports Unicode Codepages" but the error is still throw.
    Any one can help me?
    Thanks in advance,
    Manuel

    Hello Manuel,
    Please see note 1360904.  Thanks.
    Edgar

  • ITS cannot can transform %3D into = and can´t get the Work Item ID

    Hi experts,
    We have an ECC 6.0 EHP3 with a EP 7 (Netweaver 2004s SP18). We use the UWL.
    The issue is when we try to open a taks in the UWL that launch a transaction in the ECC, it can´t open, show this error:
    Transaction SWK1+WI_ID=000000005 is unknown
    This is because in the parameter "DynamicParameter" it pass the value "wi_id%3D000000005004". It can´t resolve "%3D" and change it for "=" so lost the last 3 characteres, try to opens the WI_ID=000000005 instead the WI_ID=000000005004.
    The url is try to open is this:
    http://asvesap002.forcendm.es:50100/irj/servlet/prt/portal/prteventname/navigate/prtroot/pcd!3aportal_content!2fZDiseno!2fZDesktop!2fcom.sap.portal.defaultDesktop!2fframeworkPages!2fcom.sap.portal.frameworkpage!2fcom.sap.portal.innerpage!2fcom.sap.portal.contentarea?NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fevery_user%2Fgeneral%2Fuwl%2Fcom.sap.netweaver.bc.uwl.uwlSapLaunch&System=Memorias&TCode=swk1&UseSPO1=false&AutoStart=true&DynamicParameter=wi_id%3D000000005004&CurrentWindowId=WID1248779358537&NavMode=1
    If i copy this url in a browser and chage %3D for = , DynamicParameter=wi_id=000000005004 , it works fine, open the workitem.
    Here is the code for the task in the uwl xml:
    In the iview "UWL - Launch SAP Transaction", com.sap.netweaver.bc.uwl.uwlSapLaunch, i put the "NO" value for the property "Transaction Supports Unicode Codepages" but the error is still throw.
    Any one can help me?
    Thanks in advance,
    Manuel

    The note 1360904 solves the issue.

  • API to get Work Item and Attached Information

    Dearl all,
    Is there any API to get the work items assigned to specific users and their attached information during runtime?
    Thanks, Jerome

    HI Jerome,
    This code will help you: API FM is " 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    DATA : w_name TYPE sos04-l_adr_name.
    SELECT-OPTIONS :
    Recipient address
      s_name FOR w_name DEFAULT sy-uname NO INTERVALS.
    START-OF-SELECTION.
    E-mail Abap report
      PERFORM f_send_mail.
    Form f_send_mail
    FORM f_send_mail.
    Data Declaration
      DATA:
        l_datum(10),
        ls_docdata    TYPE sodocchgi1,
        lt_objpack    TYPE TABLE OF sopcklsti1 WITH HEADER LINE,
        lt_objhead    TYPE TABLE OF solisti1   WITH HEADER LINE,
        lt_objtxt     TYPE TABLE OF solisti1   WITH HEADER LINE,
        lt_objbin     TYPE TABLE OF solisti1   WITH HEADER LINE,
        lt_reclist    TYPE TABLE OF somlreci1  WITH HEADER LINE,
        lt_listobject TYPE TABLE OF abaplist   WITH HEADER LINE,
        l_tab_lines TYPE i,
        l_att_type  LIKE soodk-objtp.
      WRITE sy-datum TO l_datum.
    List of Users According to Logon Date and Password Change
    NOTE: Create ALI/OTF Document in Spool
        MESSAGE ID 'ZWF' TYPE 'I' NUMBER '001'.
      SUBMIT ZMM_MIR_RPT_FOR_WORKFLOW VIA SELECTION-SCREEN WITH valid = 'X'
                      WITH notvalid = space
                      WITH unlocked = 'X'
                      WITH locked = space
                 EXPORTING LIST TO MEMORY AND RETURN.
                 IF sy-subrc = 0.
      ENDIF.
    MESSAGE ID 'ZWF' TYPE 'I' NUMBER '000'.
    Read list from memory into table
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = lt_listobject
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      IF sy-subrc <> 0.
      Error in function module &1
        MESSAGE ID '61' TYPE 'E' NUMBER '731'
           WITH 'LIST_FROM_MEMORY'.
      ENDIF.
    IF sy-subrc = 0.
      CALL FUNCTION 'WRITE_LIST'
        TABLES
          listobject = lt_listobject.
    ENDIF.
    IF sy-subrc = 0.
    endif.
    Because listobject is of size RAW(1000)
    and objbin is of size CHAR(255) we make this table copy
      CALL FUNCTION 'TABLE_COMPRESS'
        TABLES
          in             = lt_listobject
          out            = lt_objbin
        EXCEPTIONS
          compress_error = 1
          OTHERS         = 2.
      IF sy-subrc <> 0.
      Error in function module &1
        MESSAGE ID '61' TYPE 'E' NUMBER '731'
           WITH 'TABLE_COMPRESS'.
      ENDIF.
    NOTE: Creation of attachment is finished yet.
    For your report, the attachment should be placed into table
    objtxt for plain text or
    objbin for binary content.
    Now create the message and send the document.
    Create Message Body
    Title and Description
      ls_docdata-obj_name = 'Outstanding MIR'.
      CONCATENATE 'Outstanding MI-Report sent by' sy-uname l_datum                                     "#EC *
            INTO ls_docdata-obj_descr SEPARATED BY space.
    Main Text
      lt_objtxt = 'Outstanding MIR Report' &
                  'List of Outstanding Goods Receipts under inspection 103 movement'.                       "#EC *
      APPEND lt_objtxt.
    Write Packing List (Main)
      DESCRIBE TABLE lt_objtxt LINES l_tab_lines.
      READ TABLE lt_objtxt INDEX l_tab_lines.
      ls_docdata-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
      lt_objpack-transf_bin = 1. " If u want to CLEAR inbox evrytime
      lt_objpack-head_start = 1.
      lt_objpack-head_num = 0.
      lt_objpack-body_start = 1.
      lt_objpack-body_num = l_tab_lines.
      lt_objpack-doc_type = 'RAW'.
      APPEND lt_objpack.
    Create Message Attachment
    Write Packing List (Attachment)
      l_att_type = 'ALI'.
      DESCRIBE TABLE lt_objbin LINES l_tab_lines.
      READ TABLE lt_objbin INDEX l_tab_lines.
      lt_objpack-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objbin ).
      lt_objpack-transf_bin = 'X'.
      lt_objpack-head_start = 1.
      lt_objpack-head_num = 0.
      lt_objpack-body_start = 1.
      lt_objpack-body_num = l_tab_lines.
      lt_objpack-doc_type = l_att_type.
      lt_objpack-obj_name = 'ATTACHMENT'.
      lt_objpack-obj_descr = 'Outstanding MIR'.                   "#EC *
      APPEND lt_objpack.
    Create receiver list
      LOOP AT s_name.
        lt_reclist-receiver = s_name-low.
        lt_reclist-rec_type = 'B'.
        APPEND lt_reclist.
      ENDLOOP.
    Send Message
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = ls_docdata
          put_in_outbox              = ''
        TABLES
          packing_list               = lt_objpack
          object_header              = lt_objhead
          contents_bin               = lt_objbin
          contents_txt               = lt_objtxt
          receivers                  = lt_reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
      IF sy-subrc = 0.
      Document sent
        MESSAGE ID 'ZWF' TYPE 'S' NUMBER '002'.
      ELSE.
      Document <&> could not be sent
        MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
           WITH ls_docdata-obj_name.
      ENDIF.
    ENDFORM.
    Thanks and Regards,
    Prabhakar Dharmala

  • How to determine (sub)work-item in bpm

    Hi all,
    is there a way to determine the actual workitem in a bpm. I want to map this workitem in a xml-structure and send to a receiver just for log function.
    Best regards
    Mathias

    Hi Mathias,
    i dont know any standard way to get the work item no into the XML. But for your case should the message ID enough, coz you select the message and click on link PE to navigate to the work item.
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm">Special Access to Mapping Runtime Constants</a>
    Regards,
    Udo

  • HCM Processes and Forms: Work Item is not opening

    Hi,
    We are implementaing HCM processes and forms using NWBC (EHP7 - HR Renewal 2.0 FP1) and after using configuration of POWL inbox for MSS and HR Admin, We are not able to launch the Work Item.
    1) In MSS Work Book, while launching, we are getting message  -
    Failed to resolve Object Based Navigation target ".MSS_WL.NAVIGATE_FORM_WD". Use transaction PFCG to define this OBN target in a role or contact your system administrator to assign a role with the relevant OBN entries to your user.
    2) For HR Admin, we are getting message - Work Item can only be open using Portal and UWL. and it is displaying back end transaction SWNWIEX.
    Detail configuration steps are shown as below -
    Workflow Task used in configurations -
    1) Entries in IBO_C_WF_TA_P_SC  (Assign Task ID’s to POWL Types)
    2) IBO_C_WF_ACC configuration - (Define Tasks and Actions)
    3) IBO_C_WF_APC configuration (Provide Details of navigation parameters)
    4) IBO_V_WF_TTAC (Assignment of Actions to the Tasks)
    5) IBO_C_WF_TAC (Specify Default Action)
    Error -
    1) MSS -
    2)HR Admin -

    Hi Guru,
    Any input..its urgent!.
    Regards,
    Vijay

  • Function module to identify users - fowarded work items

    Hi
    Pls can anyone suggest an appropriate function module to identify the users of the forwarded work items?
    The onyl input i have is the user name.
    the scenario is :  UserA had fwd'ed a workitem XYZ to UserB and I need to find programatically all the details and the user of the workitem XYZ like who had forwarded to UserB. Since i dont have the work item number or dont want to restrict with date range, i wish to get this info purely with the user id only. pls can anyone suggest some functions?

    Hi Prabhu
    First, get the Work item IDS:
    Go to table SWWUSERWI, supply USER_ID as your User (User B) and FORWARDED flag = 'X'.
    You will get all workitems forwarded to THAT user (USER_ID) - User B
    Now Get "Who dared to forward them to me (the user which you have" :
    Now use FM SWL_WI_GET_HISTORY , supply WI_ID as fetched above
    You will get the History in table HISTORY. From this table, keep only records where WI_ID matches the above, METHOD = 'SWW_WI_FORWARD'
    You will be left with step history for that WI ID where it was forwarded. The field METH_USER will contain the user name of the guy (culprit) who forwarded the WI
    Regards,
    Modak

  • Creating a report for linked work items...

    We are using TFS 2012 and need to create a report (either excel or SSRS) that shows all the user stories under the current sprint and any linked child items across two projects. I can do this easily per project in VS and open it in excel but excel won't
    let me copy/paste two projects work items in one spreadsheet. I tried searching and found a few suggestions but they don't seem to work.
    TIA,
    Vik

    Hi Vik,  
    Thanks for your post.
    We suggest you create a such report using TFS API. Please refer to below code snippet:
                TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(new Uri("UrI"));
                tfs.EnsureAuthenticated();
                WorkItemStore workitemstore = tfs.GetService<WorkItemStore>();
                string wiql ="SELECT * FROM WorkItems WHERE [System.TeamProject] = 'TeamProject' ORDER BY [System.Id] ";
                WorkItemCollection wic = workitemstore.Query(wiql);
                foreach(WorkItem workitem in wic)
                if(workitem.Links.Count!=0)
                    foreach (Link link in workitem.Links)
                        RelatedLink relatedLink = link as RelatedLink;
                        if (relatedLink != null)
                            Console.WriteLine(relatedLink.RelatedWorkItemId);
    You can create your custom work item query to return all the parent work items, then save this query as a .wiq file in local path, then open this .wiq file and you will find the wiql string in it.
    For more information about work item query TFS API, please refer to:
    https://msdn.microsoft.com/en-us/library/bb130306.aspx.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Terminating Event Terminating all work items

    System : Solution Manager
    Business object : BUS2000116
    1. I have multiline container element for Agent.Agents are Dynamic not static.Approval from all agents is required.
    2. Work flow desing
    a.Defination of Agent : ABAP Dictionary type SWP_AGENT with Multiline
    b. FORK with two steps , One step Required
    c. One part of FORK has WAIT FOR EVENT "REJECTED" Event and other has Activity with Agent "_underline []Agent()Index of: Agent _underline"
    d. Under the Miscellaneous tab Multiline line element Agent.
    e. Terminating event for this activitiy is APPROVED Event, which I have defined in business object.
    Let say in Program [Custom tab for standard transaction CRMD_ORDER] I have three agents I am getting Three work item in the workflow log with different Agent.
    PROBLEM:
    When any user open the workitem from SAP Inbox and APPROVE it[ Custom button on standard screen CRMD_ORDER], Program raises Event APPROVED by using Function Module "SWE_EVENT_CREATE". But it set other two work items also in Completed status.
    concatenate 'US' sy-uname into v_creator.
            call function 'SWE_EVENT_CREATE'
              exporting
                objtype                       = c_objtype    "BUS2000116
                objkey                        = objectkey    "Key field Which is GUID from CRMD_ORDERADM_H  table
                event                         = gs_event      "APPROVE"
               creator                       = v_creator
                take_workitem_requester       = 'X'
              START_WITH_DELAY              = ' '
              START_RECFB_SYNCHRON          = ' '
              NO_COMMIT_FOR_QUEUE           = ' '
              DEBUG_FLAG                    = ' '
              NO_LOGGING                    = ' '
              IDENT                         =
             importing
               event_id                      = v_eventid
               receiver_count                = v_count
            TABLES
              EVENT_CONTAINER               =
             exceptions
               objtype_not_found             = 1
               others                        = 2
            if sy-subrc <> 0.
              message id sy-msgid type sy-msgty number sy-msgno
                      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            endif.
    Please let me know what could be the reason?
    Thanks in Advance.

    I think instead of using a event you can use a container element. You want to make sure that the users performs the approving action properly. If the user does that inside your code you set this container element as X. You pu the approval step inside a loop that checks whether the container element is X. Also another important thing you need to put the parallel approval step along with the loop inside a subworkflow.
    Thanks
    Arghadip

  • Error:Work item 000000001099:Object FLOWITEM method EXECUTE cannot be execu

    Hello experts,
    I have created a Sales order workflow whr after creation sales order will go to 1 person inbox and he will check the SO thoroughly and thn i hv added a user decision step for APPROVED or REJECTED for same person.
    Now after creation of sales order it goin to the person inbox for checkin SO but when he is saving it thn decision screen with button APPROVED or REJCTED is not coming and m getting error :Work item 000000001099: Object FLOWITEM method EXECUTE cannot be executed. and error: Error when processing node '0000000024' (ParForEach index 000000)
    i checked the agent mapping for both step....and thr is no error in agent mappin...in both steps i have mapped same rule with responsibility IDs
    PLz suggest urgently wht can be cause of error.
    Regards
    Nitin

    Hi Nitin,
    I think this seems to be an agent assignment issue.
    To debug this issue go to the workflow log and check if the agents are correctly being picked by the rule or not. Simulate the rule and check for the agents being picked.
    In the workflow log, check the agent for the User Decision step. If there is no agent found then there might be some issue with the data passed to rule.
    Hope this helps!
    Regards,
    Saumya

  • Work item deletion

    Hi Team,
    when ever a PO orPR is created, based on the release strategy  appropriate person will get the work item, then they have to execute the work item from their SAP inbox , then it will go to next release person ,
    But they are releasing from transaction ME29n or ME54n directly, in this case they want to disappear the work item from their SAP inbox. How it is possible, can you please guide me? Ex. if 1st person releases PO/PR from ME29N or ME54N without executing work item from SAP Inbox, it has to disappear from their inbox and the remaining process as do as i developed in my workflow. Can you please help me.
    I observed the function module SAP_WAPI_FORWARD_WORKITEM, but how can we pass the work item id to the above F.M based the PO or PR number or other possibilities.
    Please guide me
    Regards,
    Surya.

    Hello,
    You can use a parallel step and wait activity in that step with the Release event and you need to pass the PO or PR number as respectively with Workitem completion option.
    By, this if a PO or PR gets released by any option the workitem will be completed and will disappear from the user's inbox.
    Thnx,
    Sudhir.

Maybe you are looking for

  • Variavel de sistema em PLD

    Prezados, Estou desenvolvendo um layout em PLD, infelizmente não posso fazer esse relatório em Crystal, pois a venda do projeto foi feita com PLD. Ao configurar o documento de pedido de venda, estou inserindo a variável de sistema para o a alíquota d

  • Cant make manual backup i cloud

    i want to make manual back in icloud but the bottom for icloud backup is not activate i cant activate it and i have 5 GB space  

  • Error: Enter numeric values

    Dear All,   I am creating a company code in ECC5 IDES, but shows an error the error message is :enter numeric value only what can be the problem, please guide me

  • JDBC driver for SQL Developer

    Hi I was wondering where does SQL Developer gets the JDBC driver from? How does SQL Developer knows which version of database I am using since different version of database needs different version of driver? I have written a java application to write

  • Pie chart query

    I have a table with a column that will always be Y or N. I am wanting to use a pie chart to show how many of each there are. I tried doing a union all and it works if the Y and the N both have values but if one is 100% the chart goes postal... Here i