Urgent: change/read HU user status

Hi people,
I'm required to read and change the user status on handling units. I've been looking into the  STATUS_* function modules (fgroup BSVA) but they don't seem to pick up the status I'm looking for.
I also can't find where the status is saved in the database (it isn't in table JSTO where I'd expected it would be).
Help would be appreciated (will reward points)
Thanks,
Rob

Hi Rob Smeets,
                       below is the code to get the status number....
data:   v_stonr like TJ30-STONR.
  CLEAR : v_stonr.
  CALL FUNCTION 'STATUS_TEXT_EDIT'
    EXPORTING
     client                  = sy-mandt
     flg_user_stat           = 'I'
     objnr                   = vbak-objnr
     only_active             = 'X'
     spras                   = sy-langu
*   BYPASS_BUFFER           = ' '
IMPORTING
*   ANW_STAT_EXISTING       =
   E_STSMA                 =     GV_USERSTATUS
*   line                    =     v_flag2
*   USER_LINE               =     v_user1
    stonr                   =     v_stonr
EXCEPTIONS
   object_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.
below is the code with function modules to select the status to change the user status....
        CALL FUNCTION 'I_STATUS_SELECT'
          EXPORTING
            OBJNR                     = vbak-objnr
            SENT_USER_STATUS          = 'RJCT'
          IMPORTING
            SELECTED                  = E_SELECT
            CURRENT_USER_STATUS       = E_CUR_STUS
            NEXT_USER_STATUS          = E_NEX_STUS
            USER_STATUS_PROFILE       = E_USR_PROF
          TABLES
            SYST_STATUS_INCL          = SYS_ISTATUS_RANGE1
            SYST_STATUS_EXCL          = SYS_ISTATUS_RANGE2
            USER_STATUS_INCL          = USR_ISTATUS_RANGE1
            USER_STATUS_EXCL          = USR_ISTATUS_RANGE2
         CALL FUNCTION 'I_CHANGE_STATUS'
           EXPORTING
             OBJNR                = vbak-objnr
             ESTAT_INACTIVE       = E_CUR_STUS
             ESTAT_ACTIVE         = E_NEX_STUS
             STSMA                = E_USR_PROF
           EXCEPTIONS
             CANNOT_UPDATE        = 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.
         CLEAR : E_SELECT,
                 E_CUR_STUS,
                 E_NEX_STUS,
                 E_USR_PROF.
This logic I have used in UserExit MV45AFZZ to change the user status to "REJECTed" when Net Selling Price is less than Cost......
In this first I am getting the active user status number.....
for Created = 10,
for approved = 20,
and for rejected = 30..
based on this I am changing the status if net price is lower then cost price to Rejected......And if the the user or approval authorithy apporves the same then it he have to maintain a text in the header text for approval...
If any other help please let me know.....
Reward the point...
Cheers,
Enjoy,
Sagun Desai.....

Similar Messages

  • Change sales order user status

    Hello experts,
    I'm trying to update the user status with the following code without success:
    DATA : LIT_STATUS_COMT       TYPE CRMT_STATUS_COMT,
           WA_STATUS_COMT        LIKE LINE OF LIT_STATUS_COMT,
           LIT_FIELD_NAMES       TYPE CRMT_INPUT_FIELD_NAMES_TAB,
           WA_INPUT_FIELD_NAMES  LIKE LINE OF LIT_FIELD_NAMES.
    SELECTION-SCREEN BEGIN OF BLOCK AAA.
    PARAMETERS: P_GUID  TYPE CRMT_STATUS_COM-REF_GUID,
                P_STAT TYPE   CRMT_STATUS_COM-STATUS.
    SELECTION-SCREEN END OF BLOCK AAA.
    CLEAR WA_STATUS_COMT.
    WA_STATUS_COMT-REF_GUID       = P_GUID.
    WA_STATUS_COMT-REF_KIND       = 'A' .
    WA_STATUS_COMT-STATUS         = P_STAT. " Pass the user status
    WA_STATUS_COMT-USER_STAT_PROC = 'ZOR00001'. " Value for the User Status Profile.
    WA_STATUS_COMT-ACTIVATE       = 'X'.
    INSERT WA_STATUS_COMT INTO TABLE LIT_STATUS_COMT.
    WA_INPUT_FIELD_NAMES-FIELDNAME = 'ACTIVATE'.
    APPEND WA_INPUT_FIELD_NAMES TO LIT_FIELD_NAMES.
      CALL FUNCTION 'CRM_STATUS_MAINTAIN_OW'
        EXPORTING
          IT_STATUS_COM        = LIT_STATUS_COMT
        CHANGING
          CT_INPUT_FIELD_NAMES = LIT_FIELD_NAMES
        EXCEPTIONS
          NOT_ALLOWED          = 1
          ERROR_OCCURRED       = 2
          WARNING_OCCURRED     = 3
          OTHERS               = 4.
      DATA: LT_OBJECTS_TO_SAVE  TYPE  CRMT_OBJECT_GUID_TAB,
            LS_OBJECTS_TO_SAVE  LIKE LINE OF LT_OBJECTS_TO_SAVE.
      LS_OBJECTS_TO_SAVE = P_GUID.
      APPEND LS_OBJECTS_TO_SAVE TO LT_OBJECTS_TO_SAVE.
      CALL FUNCTION 'CRM_STATUS_SAVE_OW'
       EXPORTING
         IT_HEADER_GUID           = LT_OBJECTS_TO_SAVE
    best regards,
    Ronen.

    R.R,
    I already tried that without success:
    INCLUDE CRM_STATUS_CON.
    INCLUDE CRM_LOG_STATES_CON.
    SELECTION-SCREEN BEGIN OF BLOCK AAA.
      PARAMETERS: P_OBJNR  TYPE CRM_JSTO-OBJNR,
                  P_STAT TYPE   CRM_JEST-STAT.
      SELECTION-SCREEN END OF BLOCK AAA.
    START-OF-SELECTION.
    CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'
      EXPORTING
    *   CHECK_ONLY                = ' '
        OBJNR                     = P_OBJNR
        USER_STATUS               = P_STAT
    *   SET_INACT                 = ' '
    *   IV_REF_KIND               =
    *   IV_OBJECT_TYPE            =
    *   IV_NO_1O_MAINTAIN         =
    * IMPORTING
    *   STONR                     =
    * EXCEPTIONS
    *   OBJECT_NOT_FOUND          = 1
    *   STATUS_INCONSISTENT       = 2
    *   STATUS_NOT_ALLOWED        = 3
    *   OTHERS                    = 4
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    * IMPORTING
    *   RETURN        =
    any other suggestions?
    Ronen.

  • Function module for changing Work order user status in IW32

    Hi,
    I want to change the work order user status in IW32 using ABAP.
    Is there any function module to do so or any other way? I have tried using BDC but this does not work.
    Please suggest.
    Regards,
    Naba
    Edited by: n. saha on Nov 5, 2008 6:46 AM

    I am getting Same Problem.
    fi_methods-method = 'SAVE'.
    APPEND fi_methods.
    fi_methods-refnumber = 1.
    fi_methods-objecttype = 'USERSTATUS'.
    fi_methods-method = 'CHANGE'.
    fi_methods-objectkey = '002000002453'.
    APPEND fi_methods.
    fi_userstatus-user_st_text = 'COMM'.
    fi_userstatus-user_langu   = 'EN'.
    fi_userstatus-CHANGE_EVENT = ' 01 '.
    APPEND fi_userstatus.
    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
      TABLES
        it_methods    = fi_methods
        it_userstatus = fi_userstatus
        return        = fi_return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Above code I am using and there the message comes like
    T ID                   NUM           MESSAGE
    S IW                   080           Order saved with number 2000002453
    S IWO_BAPI2     110           BAPI control was ended
    can any on know what is wrong in this? please help if having knowledge.
    Thank You,
    Jahnavee Trivedi

  • BAPI for changing Work order user status in IW32

    Hello Experts,
    I am getting Same Problem in updating status via BAPI, BAPI_ALM_ORDER_MAINTAIN.  Its not giving any error but even not update status.
    I know i can use this for changing the user status also but not sure how to carry out things.
    I used this code.
    fi_methods-method = 'SAVE'.
    APPEND fi_methods.
    fi_methods-refnumber = 1.
    fi_methods-objecttype = 'USERSTATUS'.
    fi_methods-method = 'CHANGE'.
    fi_methods-objectkey = '002000002453'.
    APPEND fi_methods.
    fi_userstatus-user_st_text = 'COMM'.
    fi_userstatus-user_langu   = 'EN'.
    fi_userstatus-change_event = ' 01 '.
    APPEND fi_userstatus.
    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
      TABLES
        it_methods    = fi_methods
        it_userstatus = fi_userstatus
        return        = fi_return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Above code I am using and there the message comes like
    T ID                   NUM           MESSAGE
    S IW                   080           Order saved with number 2000002453
    S IWO_BAPI2     110           BAPI control was ended
    can any on know what is wrong in this? please help if having knowledge.
    Thank You,
    Jahnavee Trivedi

    I am getting Same Problem.
    fi_methods-method = 'SAVE'.
    APPEND fi_methods.
    fi_methods-refnumber = 1.
    fi_methods-objecttype = 'USERSTATUS'.
    fi_methods-method = 'CHANGE'.
    fi_methods-objectkey = '002000002453'.
    APPEND fi_methods.
    fi_userstatus-user_st_text = 'COMM'.
    fi_userstatus-user_langu   = 'EN'.
    fi_userstatus-CHANGE_EVENT = ' 01 '.
    APPEND fi_userstatus.
    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
      TABLES
        it_methods    = fi_methods
        it_userstatus = fi_userstatus
        return        = fi_return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Above code I am using and there the message comes like
    T ID                   NUM           MESSAGE
    S IW                   080           Order saved with number 2000002453
    S IWO_BAPI2     110           BAPI control was ended
    can any on know what is wrong in this? please help if having knowledge.
    Thank You,
    Jahnavee Trivedi

  • How to Change Handling Unit User Status

    Hi All,
    I am trying to change the HU Status using FM 'STATUS_CHANGE_EXTERN' but its not working.
                 lx_huheader-hu_id  is the Internal Handling unit number.
                CONCATENATE 'HU'
                            lx_huheader-hu_id INTO
                            lv_objnr.           
                CALL FUNCTION 'STATUS_CHANGE_EXTERN'
                  EXPORTING
                    client              = sy-mandt
                    objnr               = lv_objnr
                    user_status         = 'E0002'
                  EXCEPTIONS
                    object_not_found    = 1
                    status_inconsistent = 2
                    status_not_allowed  = 3
                    OTHERS              = 4.
    Please guide me.
    Thanks
    Srinath

    HI...
    add this Export parameter in the call of function module,
               SET_CHGKZ                 = 'X'
    after chef id the objnr is correct.........remember to call the commit work, or BAPI_TRANSACTION_COMMIT after the status change.
    Marco

  • Cannot set status of Urgent Change after manual transport

    Hi all,
    We are usng CHARM in Solution Manager 7.1 for import to the SAP ECC (EHP6) systems.
    I cannot set the status of the Urgent Change document (ZMHF) to status "To be Tested" after the transports were manually released and manually imported to the ECC QA system.
    When I use action "Pass Urgent Change to Test", the system stopped with error "Not all task are yet released" and will not change the status .
    Based, on the Task List log, the system started the release process although no transports were released.
    Is there any way that I can update the status of the Urgent Change document to "To be Tested"?
    I tried program CRM_SOCM_SERVICE_REPORT but still did not change the status.
    Any suggestion?
    Thanks,
    Tess

    Hi Venu,
    have a look under System Administration - System Configuration -- Knowledge Management -- Configuration --Content Management -- User Interface -- Commands -- UI Command Groups -- StatemanagementGroup.
    See Java class: com.sapportals.wcm.rendering.uicommand.cm.UIStatemanagementGroupCommand. Take the class and decompile this and everything needed around to understand how this class works.
    Then you can choose to extend this CommandGroup to also have a command "Resubmit for Approval" or you can implement your own UI Command only for resubmitting (you will also have to activate your command (group) by settings within the configuration).
    On the other hand, if all this is completely new to you, I'm a bit sceptical if the task isn't a bit too big as a first task on KM implementation topics...?
    Hope it helps
    Detlev

  • User exit/BADI for tracing change of User Status in IW22

    Hello,
    I am looking for a user exit or BADI that triggers whenever ther's a change made to User status field.
    eg. changing user status to APTC(Approved to be executed)
    I then need the exit/badi to trigger my workflow to send mails to list of reviewers. I can handle that but I am not able to find the suitable exit.
    I have seen BADI IQS0_STATUS_MAINTAIN, but no use.
    Can anyone help?

    Hi..
    Transaction Code - IW22                     Change PM Notification
    Enhancement/ Business Add-in            Description
    Enhancement
    IWO10026                                User check on setting status 'Do not perform'
    IWO10027                                User exit: Generate user-defined settlement rule
    IWOC0001                                Create PM/SM notification: Determine reference object
    IWOC0002                                PM/SM notification: Check whether status change is allowed
    IWOC0003                                PM/SM authorization check of ref. object and planner group
    IWOC0004                                Change single-level list editing PM/QM/SM ALV settings
      Business Add-in
    WOC_FL_DETERMINE                        Determine Date for Determining Installation Loc. Equi.
    NOTIF_AUTHORITY_01                      Additional Authorization Checks for the Notification
    IWOC_OBJECTINFO_CHNG                    Changes to Data of Object Info Screen
    IWOC_LIST_TUNING                        Performance Tuning for Lists in PM/CS
    IWO1_SUBSCREEN_0170                     Display Additional Data on Object Screen 0170 PhysicalSample
    IQS_MASS_CHANGE                         BadI for Mass Changes to Notifications
    IQS0_STATUS_MAINTAIN                    Control of Changeability of User Status
    No.of Exits:          6
    No.of BADis:          7
    Arunima

  • Change User Status in the sales Order

    Hello Experts,
    I hope that somebody can help me.
    I search to change the field User Status in the sales Order in the transaction VA02 before that the order be displayed.
    I have searched in the UE MV45AFZZ, but i didn't found any form that i can use for my issue.
    I found one form 'USEREXIT_FIELD_MODIFICATION '  by what the program pass when i press enter in the transaction VA02.  but the problem that the status is changed in the data base only and not in the screen. In the screen i have always the same status as what was before, to have the new statut i must leave the transaction and execute it another time.
    I don't want use forms for saving.  What I want is the new status will be set when i press enter in the transaction VA02.
    If doesn't exit one form that can resolve my problem, Can i use the Profile Parameters? In this case How use them?
    Thank you very much.

    Hi,
    U can choose ur status in change status profile. Go to IMG-CRMTransactionsBasic SettingsStatus ManagementChange Status Profile for User Status.
    Here u hv to define ur new status for the transacxtion and assign it to ur transactio. If u r not clear tell.
    Reward points.
    Thanx
    Chinmaya

  • User Status change date

    Dear All
    For an ABAP report , i need to find the table names for date and time of change in the User Status for the Maintenance Order. ( for example from INPR to RETN)
    I have tried JEST and CRM_JEST tables but couldn't found the correct result.
    Pl advice.
    thanks in advance
    Regards
    Manish Bansal

    Take the object number OBJNR and go to table JCDS
    Field Status STAT starting with 'E' i.e., your user status.
    You also have time/date fields there.
    Regards
    Sreenivas

  • Issue with CRM_STATUS_CHANGE_EXTERN - Not updating user status immediately

    Hi Everyone,
    I need to set a user header status in CRM based on the delivery block selected in ECC sales order. for example, If the delivery block is A2 then user status should be E0008(Image review) etc. For this to happen in the transaction CRMD_ORDER, in save userexit I am reading the shipping data and based on the delivery block, I set the user status using FM "CRM_STATUS_CHANGE_EXTERN".
    When I open the sales order again using CRMD_ORDER, I could see the old status still remaining but when I go to change mode, the user status is reflecting correctly. Can someone pls help me how I can fix this i.e status should change to correct one soon after I open the sales order in CRMD_ORDER.
    Thanks,
    Dharmendra G

    After call of CRM_STATUS_CHANGE_EXTERN you need to call BAPI_TRANSACTION_COMMIT.
    call function 'CRM_STATUS_CHANGE_EXTERN'
        exporting
            objnr               = iv_guid
            user_status         = iv_status
        exceptions
            OBJECT_NOT_FOUND    = 1
            STATUS_INCONSISTENT = 2
            STATUS_NOT_ALLOWED  = 3
            OTHERS              = 4
    if ( sy-subrc = 0 ).
        call function 'BAPI_TRANSACTION_COMMIT'
            exporting
                wait  = ABAP_TRUE
    else.
        "!+ Handle error
    endif.
    Best regards,
    Tomas.

  • Changing  a crm order status

    Hi!!! I wrote a post some weeks ago but i didn't solve my problem... I need to make a change in a crm badi (ORDER_SAVE) to get the following results: when i create a new order it is created by default with status "open" and i want it to become "in process" so that it is created automatically in R/3..
    In this badi i have tried some things, like using function CRM_ORDER_MAINTAIN, CRM_STATUS_CHANGE_INTERN_VB.. but i it doesn't work..
    Has anyone any idea to do this ??
    thanks in advance !!

    ok, my source code is the following...
      LOOP AT i_crmd_orderadm_h.
        CLEAR: str_stat, lv_stat, ti_crm_jest.
        REFRESH: ti_crm_jest.
        SELECT *
          FROM crm_jest
            INTO TABLE ti_crm_jest
              WHERE objnr = i_crmd_orderadm_h-guid.
        LOOP AT ti_crm_jest.
          str_stat-stat   = ti_crm_jest-STAT.
          str_stat-inact  = 'X'.
          APPEND str_stat TO lv_stat.
          CLEAR str_stat.
        ENDLOOP.
        ls_input_fields-ref_guid         = i_crmd_orderadm_h-guid.
        ls_input_fields-ref_kind         = 'A'.
        ls_input_fields-objectname       = 'STATUS'.
        ls_input_field_names-fieldname   = 'ACTIVATE'.
        INSERT ls_input_field_names
                       INTO TABLE ls_input_fields-field_names.
        INSERT ls_input_fields INTO TABLE lt_input_fields.
        CLEAR ls_status.
        REFRESH lt_status.
        ls_status-ref_guid = i_crmd_orderadm_h-guid.
        ls_status-ref_kind = 'A'.
        ls_status-status   = 'E0002'.
        ls_status-activate = ' '.
        APPEND ls_status TO lt_status.
        CALL FUNCTION 'CRM_ORDER_MAINTAIN'
          EXPORTING
            IT_STATUS         = lt_status
          CHANGING
            CT_INPUT_FIELDS   = lt_input_fields
          EXCEPTIONS
            ERROR_OCCURRED    = 1
            DOCUMENT_LOCKED   = 2
            NO_CHANGE_ALLOWED = 3
            NO_AUTHORITY      = 4
            OTHERS            = 5.
        CLEAR ls_status.
        REFRESH lt_status.
        ls_status-ref_guid = i_crmd_orderadm_h-guid.
        ls_status-ref_kind = 'A'.
        ls_status-status   = 'E0003'.
        ls_status-activate = 'X'.
        APPEND ls_status TO lt_status.
        CALL FUNCTION 'CRM_ORDER_MAINTAIN'
          EXPORTING
            IT_STATUS         = lt_status
          CHANGING
            CT_INPUT_FIELDS   = lt_input_fields
          EXCEPTIONS
            ERROR_OCCURRED    = 1
            DOCUMENT_LOCKED   = 2
            NO_CHANGE_ALLOWED = 3
            NO_AUTHORITY      = 4
            OTHERS            = 5.
        CALL FUNCTION 'CRM_STATUS_CHANGE_INTERN_VB'
          EXPORTING
            OBJNR  = i_crmd_orderadm_h-guid
          TABLES
            STATUS = lv_stat.
        clear lv_stat.
        str_stat-stat = 'I1054'.
        str_stat-inact = 'X'.
        APPEND str_stat TO lv_stat.
        CLEAR str_stat.
        str_stat-stat = 'I1003'.
        str_stat-inact = ' '.
        APPEND str_stat TO lv_stat.
        CLEAR str_stat.
        CALL FUNCTION 'CRM_STATUS_CHANGE_INTERN_VB'
          EXPORTING
            OBJNR  = ti_crm_jest-objnr
          TABLES
            STATUS = lv_stat.
        data: lt_basket_guid       TYPE  crmt_object_guid_tab.
        INSERT i_crmd_orderadm_h-guid INTO TABLE lt_basket_guid.
        CALL FUNCTION 'CRM_ORDER_SAVE'
          EXPORTING
            IT_OBJECTS_TO_SAVE   = lt_basket_guid
            iv_update_task_local = 'X'
          IMPORTING
            et_saved_objects     = lt_saved_objects
          EXCEPTIONS
            DOCUMENT_NOT_SAVED   = 1
            OTHERS               = 2.
        IF NOT lt_saved_objects IS INITIAL.
          COMMIT WORK.
        endif.
      ENDLOOP.
    Yes.. i know it's a little "dirty" code, but it's the only way to make the report work well... my problem is that the order is replicated in R/3 but when i check the order in CRM the system status has changed but the user status no...

  • User Status update on Sales Order Header

    Hi all,
    I need to update the "User Status" on sales order header when a sales order is saved. As user status reside in JEST, what available user exits are there to change/insert new user statuses? I don't believe the common exits like MV45AFZZ would do.
    To clarify, to get to these user statuses, you go to the header of the sales order, select on the 'Status' tab, then click on the "Object Status" pushbutton.
    Any help would be greatly appreciated in the form of points!
    Thank you.
    Liam

    Hi Liam,
    In the Program MV45AFZZ in the FORM userexit_save_document
    you use the following fn module to change the user status
    'STATUS_CHANGE_EXTERN'
    Example
    IF t180-trtyp = 'H'.  "Only creation time
      READ TABLE xvbap WITH KEY matnr = c_matnr.
      IF sy-subrc = 0.  "If above material exist then change status
        LOOP AT xvbap WHERE cuobj NE space
                       AND  matnr =  c_matnr.
          l_objnr = xvbap-objnr.
          CALL FUNCTION 'STATUS_CHANGE_EXTERN'
            EXPORTING
              objnr               = l_objnr
              user_status         = 'E0013'  "Send ej IDOC
              set_chgkz           = 'X'
            EXCEPTIONS
              object_not_found    = 1
              status_inconsistent = 2
              status_not_allowed  = 3
              OTHERS              = 4.
        ENDLOOP.
      ENDIF.
      sy-subrc = 0.  "Restore the previous condition
    ENDIF.
    Reward if helpful *********

  • Is the Sales Order Item User Status available in user exit MV45AFZZ

    Hello,
    Does anyone know if a sales order line item user status is available within user exit MV45AFZZ (USEREXIT_SAVE_DOCUMENT)?
    I need to send an email when the status changes from one specific value to another specific value but I don't seem to have access to what the latest value is in this user exit.
    I have found a table XTVSTAT which cntains some user status' but it's not clear which status maps to which line item.
    If anyone has any suggestion please let me know.
    Thanks,
    Ruby

    Hi,
    I do need to access the values as I need to check for a specific change to the user status from value A to value B.
    I have already tried debugging the user exit and searching through the available variables but the status information doesn't seem to be available.
    I guess I will have to try the output determination route. Can you explain this in a bit more detail please.
    Thanks,
    Ruby

  • Notifying a user that an Urgent Change Request has been Approved, or Denied

    Trying to figure out the best way to have an email go back to a user after a Change Request has been updated with either an Approved or Deny
    What we do now is after a user creates an Urgent Change Request, and email goes out to all of our Managers. One of them will reply all to the email with either an [approval] or [deny] in the message body so Service Manager gets the email and acts on
    it and the other Managers know it was acted on.
    Problem is, if the Manager forgets to add in the Change Requester in the email, they don't know it was acted on. I tried using WorkFlows for Change Request to update the Change Requester of an update but there is nothing in there for  Approval or Deny.
    I then resorted to subscriptions but can't figure out how to configure the subscription so that only the Change Requester gets the email. We can configure different email templates based on the whether the change was approved or denied. Just need to figure
    out how to configure the Recipient.

    I suggest you read this
    which is very close to what you want to do.
    I've checked the link and found it working. Of course, it works only if the RA is a direct child of work item itself (so for RAs encapsulated in SA or PA it doesn't work).
    Below the XML code of the management pack I used. You can engage that, just copy to Notepad and save as ManagementPack.ef9b0adf354c4afe92ede323c9427879.xml
    It might require to customize a mail template cause I made a very simple one.
    <ManagementPack ContentReadable="true" SchemaVersion="2.0" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <Manifest>
    <Identity>
    <ID>ManagementPack.ef9b0adf354c4afe92ede323c9427879</ID>
    <Version>7.5.2905.0</Version>
    </Identity>
    <Name>RA notify affected user MP</Name>
    <References>
    <Reference Alias="EnterpriseManagement">
    <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
    <Version>7.5.2905.179</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    <Reference Alias="CustomSystem_Notifications_Library">
    <ID>System.Notifications.Library</ID>
    <Version>7.5.2905.0</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    <Reference Alias="CustomSystem_WorkItem_Library">
    <ID>System.WorkItem.Library</ID>
    <Version>7.5.2905.0</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    <Reference Alias="CustomSystem_WorkItem_Activity_Library">
    <ID>System.WorkItem.Activity.Library</ID>
    <Version>7.5.2905.0</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    <Reference Alias="CustomSystem_Library">
    <ID>System.Library</ID>
    <Version>7.5.8501.0</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    <Reference Alias="SystemCenter">
    <ID>Microsoft.SystemCenter.Library</ID>
    <Version>7.0.8432.0</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    <Reference Alias="SystemCenter1">
    <ID>Microsoft.SystemCenter.Subscriptions</ID>
    <Version>7.5.2905.0</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    <Reference Alias="EnterpriseManagement1">
    <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Administration</ID>
    <Version>7.5.2905.179</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    </References>
    </Manifest>
    <Categories>
    <Category ID="Category.6f4a3832d9c3488fa2c31d1d662dceef" Value="EnterpriseManagement!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack">
    <ManagementPackName>ManagementPack.ef9b0adf354c4afe92ede323c9427879</ManagementPackName>
    <ManagementPackVersion>7.5.2905.0</ManagementPackVersion>
    </Category>
    <Category ID="ServiceManager.Console.NotificationManagement.NotificationTemplates.Enumeration6fce0865_32d8_435d_ad64_7c48439649ab.Category" Target="Template_50a8eac21da94bb2a340858b71c931d3" Value="EnterpriseManagement1!ServiceManager.Console.NotificationManagement.NotificationTemplates.Enumeration" />
    <Category ID="Category.804f621f7a2b4e0490c82413cd6479d9" Target="NotificationSubscription_da1aa98f_40c3_4dd5_a227_de3e7f20601e" Value="EnterpriseManagement1!Microsoft.EnterpriseManagement.ServiceManager.Rules.WorkflowSubscriptions" />
    </Categories>
    <Monitoring>
    <Rules>
    <Rule ID="NotificationSubscription_da1aa98f_40c3_4dd5_a227_de3e7f20601e" Enabled="true" Target="SystemCenter!Microsoft.SystemCenter.SubscriptionWorkflowTarget" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
    <Category>System</Category>
    <DataSources>
    <DataSource ID="DS" TypeID="SystemCenter1!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule">
    <Subscription>
    <InstanceSubscription Type="bfd90aaa-80dd-0fbb-6eaf-65d92c1d8e36">
    <UpdateInstance>
    <Criteria>
    <Expression>
    <And>
    <Expression>
    <Or>
    <Expression>
    <SimpleExpression>
    <ValueExpression>
    <Property State="Pre">$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
    </ValueExpression>
    <Operator>NotEqual</Operator>
    <ValueExpression>
    <Value>{9de908a1-d8f1-477e-c6a2-62697042b8d9}</Value>
    </ValueExpression>
    </SimpleExpression>
    </Expression>
    <Expression>
    <SimpleExpression>
    <ValueExpression>
    <Property State="Pre">$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
    </ValueExpression>
    <Operator>NotEqual</Operator>
    <ValueExpression>
    <Value>{144bcd52-a710-2778-2a6e-c62e0c8aae74}</Value>
    </ValueExpression>
    </SimpleExpression>
    </Expression>
    </Or>
    </Expression>
    <Expression>
    <Or>
    <Expression>
    <SimpleExpression>
    <ValueExpression>
    <Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
    </ValueExpression>
    <Operator>Equal</Operator>
    <ValueExpression>
    <Value>{9de908a1-d8f1-477e-c6a2-62697042b8d9}</Value>
    </ValueExpression>
    </SimpleExpression>
    </Expression>
    <Expression>
    <SimpleExpression>
    <ValueExpression>
    <Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
    </ValueExpression>
    <Operator>Equal</Operator>
    <ValueExpression>
    <Value>{144bcd52-a710-2778-2a6e-c62e0c8aae74}</Value>
    </ValueExpression>
    </SimpleExpression>
    </Expression>
    </Or>
    </Expression>
    </And>
    </Expression>
    </Criteria>
    </UpdateInstance>
    </InstanceSubscription>
    <PollingIntervalInSeconds>60</PollingIntervalInSeconds>
    <BatchSize>100</BatchSize>
    </Subscription>
    </DataSource>
    </DataSources>
    <WriteActions>
    <WriteAction ID="WA" TypeID="SystemCenter1!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
    <Subscription>
    <VisibleWorkflowStatusUi>true</VisibleWorkflowStatusUi>
    <EnableBatchProcessing>true</EnableBatchProcessing>
    <WindowsWorkflowConfiguration>
    <AssemblyName>Microsoft.EnterpriseManagement.Notifications.Workflows</AssemblyName>
    <WorkflowTypeName>Microsoft.EnterpriseManagement.Notifications.Workflows.SendNotificationsActivity</WorkflowTypeName>
    <WorkflowParameters>
    <WorkflowParameter Name="SubscriptionId" Type="guid">$MPElement$</WorkflowParameter>
    <WorkflowArrayParameter Name="DataItems" Type="string">
    <Item>$Data/.$</Item>
    </WorkflowArrayParameter>
    <WorkflowArrayParameter Name="InstanceIds" Type="string">
    <Item>$Data/BaseManagedEntityId$</Item>
    </WorkflowArrayParameter>
    <WorkflowArrayParameter Name="TemplateIds" Type="string">
    <Item>f7785299-c026-a870-e350-d02b65a1f3b3</Item>
    </WorkflowArrayParameter>
    <WorkflowArrayParameter Name="PrimaryUserRelationships" Type="string">
    <Item>$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='CustomSystem_Library!System.User']$</Item>
    </WorkflowArrayParameter>
    </WorkflowParameters>
    <RetryExceptions />
    <RetryDelaySeconds>60</RetryDelaySeconds>
    <MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
    </WindowsWorkflowConfiguration>
    </Subscription>
    </WriteAction>
    </WriteActions>
    </Rule>
    </Rules>
    </Monitoring>
    <Templates>
    <ObjectTemplate ID="Template_50a8eac21da94bb2a340858b71c931d3" TypeID="CustomSystem_Notifications_Library!System.Notification.Template.SMTP">
    <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/Subject$">&lt;1033&gt;$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$ is completed&lt;/1033&gt;</Property>
    <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/Priority$">2</Property>
    <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/IsBodyHtml$">False</Property>
    <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Content$">&lt;1033&gt;$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$ is completed&lt;/1033&gt;</Property>
    <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Encoding$">utf-8</Property>
    <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/SeedClass$">System.WorkItem.Activity.ReviewActivity$bfd90aaa-80dd-0fbb-6eaf-65d92c1d8e36</Property>
    <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Protocol$">SMTP</Property>
    </ObjectTemplate>
    </Templates>
    <LanguagePacks>
    <LanguagePack ID="ENU" IsDefault="true">
    <DisplayStrings>
    <DisplayString ElementID="ManagementPack.ef9b0adf354c4afe92ede323c9427879">
    <Name>RA notify affected user MP</Name>
    </DisplayString>
    <DisplayString ElementID="Template_50a8eac21da94bb2a340858b71c931d3">
    <Name>RA notify affected user mail template</Name>
    </DisplayString>
    <DisplayString ElementID="NotificationSubscription_da1aa98f_40c3_4dd5_a227_de3e7f20601e">
    <Name>RA notify affected user</Name>
    </DisplayString>
    </DisplayStrings>
    </LanguagePack>
    </LanguagePacks>
    </ManagementPack>
    Cheers,
    Marat
    Site: www.scutils.com 
    Twitter: LinkedIn:
    Graveyard:
    It does work even if it is within a PA or SA or even deeper, you "just" have to follow the path to the CR from there. But then you would need a subscription for each RA depending on where it is in the flow. Try to make your users understand that :D
    http://codebeaver.blogspot.dk/

  • Changing Portal Role after the status change of user status at the CRM end.

    Hi,
    I have Portal with Java database as the default and CRM is connected to it using SSO.The database in both the case in separate.The users that are created in Portal will have a BP status in CRM sytsem.
    Now my requirement is that if the status of the BP gets changed at the backend simultaneoulsy its Portal role should also gets changed.How shall i facilitate this procedure of changing the Portal Role?
    Is there any RFC ,BAPi or Webservices required for this?
    Regards,
    Amarys
    Edited by: amarys on Sep 13, 2011 11:20 AM

    Hello,
    Since the status has no number it will appear under statuses W/O number bottom right in status overview window.
    These status will appear as additional text beside current user status. For example if user staus is BUG and status without number is DFL and sets when deletion flag is set and gets deleted when it is revoked than user status will appear as
    BUG DFL -
    Deletion flag set.
    BUG -
    When deletion flag revoked.
    You have to live with it. I don't think there is a way out for that.
    Thanks
    Saikishore Ganga.

Maybe you are looking for

  • How to hide left frame on iSupport help pages?

    Hi friends, [Apps: 11.5.10.2  -   DB: 10g] I'm trying to hide the left frame on iSupport help pages. I've seen that this is directly in relation with a profile option named: HELP_TREE_ROOT (Root Help System) But the funcionallity is veru peculiar: If

  • How do I connect my goole chromebook to my hp3510 printer

    hi, can you please help me, with my questions

  • Can you download DVDs to itunes

    Is it possible to move movies and tv shows on DVD to itunes so you dont have to buy them?

  • Also problem read txt files into JTable

    hello, i used the following method to load a .txt file into JTable try{                     FileInputStream fin = new FileInputStream(filename);                     InputStreamReader isr = new InputStreamReader(fin);                     BufferedReade

  • Easily identify Exchange Invites?

    I have switched over to using Mail in Snow Leopard with my companies Exchange 2007 server from Entourage. Overall I am MUCH happier, but there are a few things I am still trying to work out. One of them is how to easily identify meeting invites. When