How to change user status

Hi
I want to change the user status from  X - > Y - > Z  - > X based on config... so in doing that my system status would be set to released.
I am doing the updation each time from X--> Y and calling  crm_order_maintain, crm_order_save, commit work and save , wait up to 20 seconds, crm_order_initialize.
Without doing wait up to 20 seconds, i am getting an error "Order cannot be changed" when i am updating the user status from Y->Z next time for same guid object ( contract item ).
My questions are
1. How do we identify whether we can change contract, for next user status using any FM.  It says contract cannot be changed as "Transferring not completed". I used FM "CRM_ORDER_CHECK_CHANGE_ALLOWED" , but it always gives message "in transferring in middleware". Is there any other way to avoid wait up to 20 seconds , instead determine whether the contract can be changeable.
2. Can we update X>Y>Z--->X in single crm_order_maintain.. can system track this changes that contract item has gone through various user status. When i checked it only keeps Y status.  I am passing all user status as active. Can we pass in any other manner?..
3. When i call order initialize after each update of status , the lock is getting released and for next status chnage when i call order maintain, if some other user opens same contract in that time... lock error comes..  when i pass Keep lock in order initialize it is not working.. does that work and why does its not working....
Regards,
D

Deepthi,
Dont pass all the statuses at once to CRM_ORDER_MAINTAIN,
For eg :
To get to status Z  from X->Y->Z , you can follow below procedure
take staus - X
fill it_status and it_inputfields with a record each corresponding to status X.
Call CRM_ORDER_MAINTAIN
take staus - Y
fill it_status and it_inputfields with a record each corresponding to status Y.
Call CRM_ORDER_MAINTAIN
take staus - Z
fill it_status and it_inputfields with a record each corresponding to status Z.
Call CRM_ORDER_MAINTAIN
After reching Z , call ORDER_SAVE and COMMIT.
Please use a internal table for all your status and place the order_maintain in loop , so that each status gets maintained while you navigate to next status.
Regards,
Nithish
Edited by: nithish P on May 17, 2011 8:15 AM

Similar Messages

  • How to change user status in maintenence order

    Hi all,
    I want to change system status in maintenence order by customizing kindly share how we can change it.

    Once you print the order, system status will get changed automatically to PRT.
    What else you are expecting to change?? You can't change the system status by any business transaction as per your wish. System status changes have been defined by SAP directly.

  • How to change the status of test cases in Test Plan from Design to Ready using Excel VBA

    HI,
    How to change the status of test cases in Test Plan from Design to Ready using Excel VBA

    Thanks Florin,
    Your piece of code has worked alot, and it was very helpful in changing the Status of the Workitem to "READY" for all the Users fo the workitem.
    Points have been rewarded for your help.
    Process: We have acheived this using the "Work Item Exits", Usng "AFTER_EXECUTION" Method.
    Note: The Exit will be executed if "exit_cancelled"  statement is present/used in the work item method. if not it is not taking to the exit code. I'm unable to find the reason for it. Florin can u please explain this point.
    Please check the link for adding the code in Work Item Exits.
    http://wiki.sdn.sap.com/wiki/display/ABAP/ProgramExitsIn+Workflow
    Please find the Code:
    method IF_SWF_IFS_WORKITEM_EXIT~EVENT_RAISED.
    Get the context of the workitem
      me->wi_context = im_workitem_context.
    After execution of the workitem call the method AFTER_EXECUTION
      if im_event_name eq swrco_event_after_execution.
        me->after_execution( ).
      endif.
    endmethod.
    METHOD AFTER_EXECUTION.
    This method acts as the Event Handler for SWRCO_EVENT_AFTER_EXECUTION
      DATA: LCL_L_WID TYPE SWW_WIID,
            L_STATUS TYPE SWR_WISTAT-STATUS,
            L_NEW_STATUS  TYPE SWR_WISTAT,
            L_SWR_MESSAG  TYPE STANDARD TABLE OF SWR_MESSAG,
            L_SWR_MSTRUC  TYPE STANDARD TABLE OF SWR_MSTRUC.
    Get work item
      CALL METHOD WI_CONTEXT->GET_WORKITEM_ID
        RECEIVING
          RE_WORKITEM = LCL_L_WID.
      L_STATUS = 'READY'.
      CALL FUNCTION 'SAP_WAPI_SET_WORKITEM_STATUS'
        EXPORTING
          WORKITEM_ID    = LCL_L_WID
          STATUS         = L_STATUS
          USER           = SY-UNAME
          LANGUAGE       = SY-LANGU
          DO_COMMIT      = 'X'
        IMPORTING
          NEW_STATUS     = L_NEW_STATUS
         RETURN_CODE    = SY-SUBRC
        TABLES
          MESSAGE_LINES  = L_SWR_MESSAG
          MESSAGE_STRUCT = L_SWR_MSTRUC.
      IF SY-SUBRC EQ 0.
      ENDIF.
    ENDMETHOD.
    Thank You Once Again,
    Ajay Kumar Chippa

  • Change User status of Task of Follow up function

    Hi All,
    Does any one of you know how to change the User status of Task through customizing or programming.
    Basically I want to change User status from 'TINI' to 'TSNT' once the email is triggered. I could send the email but I am unable to change the status.
    Thanks in advance,
    Jagadish

    Hey Thomas,
    This should solve your problem..
    CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN'
          EXPORTING
            client              = sy-mandt
            objnr               = wa_new_user_status-guid
            user_status         = wa_new_user_status-status
            no_check            = 'X'
      SET_INACT                 = ' '
      SET_CHGKZ                 =
      XNOAUTO                   =
          EXCEPTIONS
            object_not_found    = 1
            status_inconsistent = 2
            status_not_allowed  = 3
            OTHERS              = 4.
    In this FM NO_CHECK parmeter must be set to True, else u wil not be able to set the Status.....
    Sample is given above...
    Reward points for usefull answer...
    Regards,
    Anand...

  • How to update user status in the QM notifications

    Dear Experts,
    PLz tell  how to update/change user status in the QM notifications..I have maintained the user status profile and assigned the same to the notification type,but user status are not getting updated in the notifications..
    Thanks in advance
    Ankush

    Hi,
    SPRO - Quality Management - Quality Notifications - Overview of Notification Type.
    In that select the concerned notification and click on the status profile and there you can assign the status profile for the concerned notification Type.
    There will be two types,
    status profile for notifications and status profile for tasks, assign as per the requirement.
    Regards,
    Naveen.

  • How to change system status of order created in IW31

    Hello All,
    I created a maintenance order in IW31. System status of that Order is like this,
    Now i have a requirement to change the system status.
    But the BAPI : BAPI_ALM_ORDER_MAINTAIN has option to change user status. Please suggest what i have to do?
    Thanks in Advance

    EXIT_SAPLBSVA_001 will fulfill your requirement.
    Try to change your system status inside this exit.
    You will get both User status and System status.

  • How to change the status of a production order

    Dear All,
    May i know how to change the status of a production order.I want to de-active the status like OPGN (Operation generated).This status is updated as there was no routing assigned to that particular production order during its creation
    Thanks and Regards,
    Varun Siddharth

    Dear,
    When you create a production order, an operation created by the system is generated automatically if no routing is used for the creation. As a result the order header receives the status HOGAN; the operation created automatically also has this status.
    If you delete the operation created automatically and then do not have the status HOGAN.
    To avoid this maintain the Routing for the material or delete the setting of default operation from OPJG.
    Regards,
    R.Brahmankar

  • How to change the Status CRTD of the Inspection Lot?

    Dear all.
    I want to Complete an Inspection Lot 10000000005 In the T-CODE qvm2.When I select the Inspection Lot 10000000005 and press F8 to Complete the Inspection,the SAP show an error message "Status check error".
    And the detail info show that the error was cause by the Status CRTD of the Inspection Lot.I check the Status of the Inspection Lot 10000000005 and found that it's Status was CRTD CHCR SPRQ.My question was how to change the Status CRTD of the Inspection Lot?
    Regard
    Yoda

    Hi
    CRTD means ...
    In material master QM vew-inspection setup->Inspect with task list tick is there.
    Now to change status,
    Go to Qp01>create a task list for material(If not exists)>remember date of creation of task list must be prior to date to creation of inspec lot
    If task list is created/exists>go to QA02.<inspection specification -->click on Inspec Spec
    and attach task list
    go to sample tab....click on sample.
    Now save it.
    Status will change to REL
    Regards
    Sujit

  • How to change the status in the table kssk

    Hi ,
    In document management system - for a doc type pdf, I am maintaing the class (cl_xxx) in img setting. some charateristics are assigned to that class (with entry required).
    My problem is While  creating the document (cv01n). I am  not assigning the value for that char ( i.e in addition data), eventhough it is mandatory .
    In the table kssk , For that particular document , status is set to 5 . how to change the status .
    note :
    In cv04n - if i search wrt to that charateristic in the classification tab. i am not  able to get the value.
    Please help me to solv the problem.
    Regards,
    Rani.

    hi you can do like this also if it is a test server..and y had the authoridation..
    togo the table -supposekkkk-execute-select a particular record--double click it ---then it will display it in the vertical line..
    then put /h in the tcode listbox and put enter--debugg it and change this    if code = 'SHOW'  as EDIT. execute it and change it and save it..
    regards,
    venkat.

  • How to change the status of Serial number

    Hi Experts,
    Would you please help in solving this problem.
    How to change the status of Serial number?
    I have material stock in a storage location: recieved from Intercompany through outbound delivery, when PGIed material document is created when I am checking the serial numbers of the recieved ones status of the serial numbers are ESTO, I want that into AVLB.
    How can we do that?
    Regards
    Sri

    Hi,
    Go to IQ02 on Header tool bar you will find edit(2nd option on header tool bar) => edit manually=> Click from Customer=> and then to Stock you will find the expected results...
    Generally Serial number Status use to change along with the movement of material linked with that serial number... So if you are changing serial number with manual trasaction then please remove all the details from IQ02 like plant storage location Batch and master batch so that i will not provide you error while doing next transactions.
    Regards,
    Ninad Kshirsagar

  • How to change the status of updated record?

    Hi All,
    how to change the status of updated record?
    new record should be active version(X) and old version will be deleted.
    Plz suggest..
    Thanks in advance...

    Steve,
    In the actual question, you mentioned that the old record needs to be deleted and hence the solution provided.
    Now, you are talking about field. May I know which field are you talking about??
    Jst get in to ABAP Editor and try debugging the code with the solution provided and let us know if that is working fine or not.
    Also, I recommend you to take a look at the transaction ABAPDOCU. There you wil find hell lot of examples explaining all the scenarios. You will get a good idea .
    Please check that and try to implement it yourself. You will be able to make it after doing mistakes.
    If you stuck up again after many attempts, paste your code here. We will help you out
    Hope you got my concern.
    Thanks,
    Babu Kilari

  • How to change the status of IDOCS from 29 status to 53

    Guys
    how to change the status of IDOCS from 29 status to 53
    Thanks in advance

    Hi Krishna
    IDOC_STATUS_CONVERT Use this FM and reward me

  • LSMW for changing user status on work order(IW32)

    Hi All,
    I have created a LSMW for changing user status on work order using transaction IW32. It does not change the status when i run the LSMW. In the recording for the LSMW, i select the radio button on the user status i want to select.
    When i run the LSMW in the foreground, it does everything except select the correct status.
    Is there a way to fix this or is it a problem with LSMW. I'm using ECC6
    Kind Regards
    Emanuel

    Hi ,
    I am not sure whether it would work with LSMW but if your on ECC 6.00 ,Enhacement Pack 3 then you have BADIs which allow you to make collective status changes in IW38 .The below are those BADIs :-
    BADI_EAM_RIAUFK20_FCODE_CUS1 :Implement Customer Function Code in Order List
    BADI_EAM_RIAUFK20_FCODE_SAP1 :Implement SAP Function Code in Order List
    Else if your on lower version then write up a batch programme which checks the PM Order types with specific status and sets user status using FM STATUS_CHANGE_EXTERN[This is used to set or delete User Status] in SE37 ..
    regrds
    pushpa

  • I have 100 groups in planning for those 100 groups i want to build roles like interactive,view user,planner etc.for those how to change in export -import folder .xml file  in that edit  how  to change user roles in that xml it will generate automatic id.h

    I have 100 groups in planning for those 100 groups i want to build roles like interactive,view user,planner etc.for those how to change in export -import folder .xml file  in that edit  how  to change user roles in that xml it will generate automatic id.how to do that in xml file ?

    Thanks john for you are reply.
    I had tried what you sad.I open shared service in that foundation project i had export shared service.after that in import-export file.In that role.csv,user.csv,group.csv.Like this file have.When i open user file added some users after i trying save in excel it shown messgse
    I click yes and save the .csv file and import from share servie. i got error like this
    am i doing right way john.or explain clearly

  • How to Set User Status of Sales Order at item level.

    How to Set User Status of Sales Order at item level by default to 'Purchase Req Not Created' (example)while creating order. Please tell EXIT Name to be triggered & Internal table to be populated.
    Thanx,
    Srini
    Moderator message: please do your own research before asking.
    Edited by: Thomas Zloch on Feb 21, 2011 11:19 AM

    Mathew,
    Here is a document that should help you get started on enhancing 2LIS_11*
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c09d5356-d8c4-2d10-8b84-d24723fc1f0a?QuickLink=index&overridelayout=true
    Good luck!

Maybe you are looking for

  • Grouped objects not saved correctly

    I group objects (graphics and text), save the file, but when I open it again, grouped objects are moved, sometimes outside the slide. This seems to affect graphics dropped onto keynote, and only of they are grouped. Graphics & text produced inside ke

  • IOS 8.3 iCloud password and backup issues

    Since I upgraded my iPhone 5s to 8.3, I get a message every morning asking for my iCloud password, I sign in as requested.   I have tried signing out of iCloud and signing back in and that didn't help.  Today I noticed that my iCloud had not backed u

  • Using an old imac as a "dumb" terminal

    How do I turn on an old computer so it is a "dumb" terminal?  It is connected to the new one with firewire, but I have forgotten what keys to hold down on the startup of the old one.

  • How to make multi-line report headings?

    Hi all, By default, Apex creates a single-line report heading for each column in a report.  To minimize white space, multi-line column headings are sometimes appropriate.  How can Apex be directed to split a column heading at certain place(s)? Thanks

  • Why replay history data from NI-DAQ buffer?

    LabVIEW 8.6.1f1, NI-DAQ 8.8, Win Vista, two cDAQ chassis.  (I can't move to LV09 or LV10 for this, not yet anyway). I have a client with two cDAQ banks, each with 16 TC channels (on 4 modules) and 16 voltage channels (on 1 module), 64 channels all to