Change status profile of Service order

Hi,
we like to harmonize all status profile of all incident process types  we have in our system. This means we like to create one status profile and assign this to 5 different process types. The problem is, we have in our system round about 20000 incidents and ( open and closed). This incidents have to be migrated. I think we have to change E-Status and Status profile and change documents. Are there any experiences with this task. I found nothing what really works (change status profile) in this time. I checked CRM_STATUS_PROFILE_CHANGE but dosn't work for me.
Could anyone give some hints how to handle this problem?
Kind regards Stefan

Hi Stefan,
You can try the below code to change the status and status profile
ls_status_com-ref_guid = lv_guid."document guid
        ls_status_com-ref_kind = 'A'.
        ls_status_com-user_stat_proc = 'CRMACTIV'. " status profile
        ls_status_com-activate = 'X'.
        APPEND ls_status_com TO lt_status_com.
        ls_input_fields-ref_guid = ls_status_com-ref_guid.
        ls_input_fields-ref_kind = 'A'.
        ls_input_fields-objectname = 'STATUS'.
        CONCATENATE ls_status_com-status ls_status_com-user_stat_proc INTO ls_input_fields-logical_key.
        ls_fieldname-fieldname = 'ACTIVATE'.
        INSERT ls_fieldname INTO TABLE ls_input_fields-field_names.
        INSERT ls_input_fields INTO TABLE lt_input_fields.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_status         = lt_status_com
        CHANGING
          ct_input_fields   = lt_input_fields
        EXCEPTIONS
          error_occurred    = 1
          document_locked   = 2
          no_change_allowed = 3
          no_authority      = 4
          OTHERS            = 5.
      IF sy-subrc EQ 0.
        INSERT lv_guid INTO TABLE lt_guids.
        CALL FUNCTION 'CRM_ORDER_SAVE'
          EXPORTING
            it_objects_to_save = lt_guids
          EXCEPTIONS
            document_not_saved = 1
            OTHERS             = 2.
        IF sy-subrc IS INITIAL.
          COMMIT WORK AND WAIT.
     endif.
Best Regards,
Dharmakasi

Similar Messages

  • Status profile in Service orders.

    i have requirement for which i  have created status profile(ZZPSCS03) and assign the  user profile ZCAT(preventing the time reporting ) with object type PM/ PP Order header. Now if i am creating the service order and assigning the user profile ZCAT at the service order header that is not preventing the time reporting at the operational level. can u help me out.
    Regards.

    Thanks Rohit,
    "Have u given control to ur user profile zcat to prevent time reporting.
    If not then go to ur user profile details tab and give the controls by selecting appropiate radio buttons"
    Could you please explain  what does it mean by giving control to user profile.
    Advance Thanks.

  • How to use the selection profile and status profile for production order?

    Hi expert,
       I want to know how to use the selection profile and status profile for production order. what's the usage for these two selection profile and status profile ?
      Please help me.
      thanks in advance.
      george.shi

    Hi George,
    There are are two types of statuses.One is system status and second one is user status.These statuses will tell us current situation of an order.
    We can't change system statuses.But we can create our own statuses through status profile.With this profile we can control user statuses.
    In this status profile,
    1.We define the sequence in which user statuses can be activated,
    2.We define initial statuses
    3. Allow or prohibit certain business transactions.
    Selection profiles are used to select the objects (say production orders) with different status combinations.We assign status profiles to selection profiles in BS42 T-Code.
    Regards,
    Raja.
    Edited by: Rajarao on Oct 30, 2008 6:21 AM
    Edited by: Rajarao on Oct 30, 2008 6:22 AM

  • How to change the Partner in Service Order

    Dear Experts,
      I am working in SAP CRM 5.0.I want to change the Partners of Service Order Using the Function Module 'BAPI_ACTIVITYCRM_CHANGEMULTI'.Can anyone give me the Sample code for Changing the Partners.It is very Urgent Requirement.Please help me.
    Thanks & Regards,
    Ashok.

    Hi,
        Following is the code for changing partner: Please go through it:
    "fill the details of partner which is
              "to be added as main partner or in place of Interaction Agent
              wa_partner_new-ref_guid = w_guid_ref.
              wa_partner_new-ref_handle = '0000000000'.
              wa_partner_new-ref_kind = 'A'.
              wa_partner_new-kind_of_entry = wa_partner-kind_of_entry.
              wa_partner_new-ref_partner_handle = '0000'.
              wa_partner_new-ref_partner_fct = 'Z_IA'. "
              wa_partner_new-ref_partner_no = wa_partner-partner_no.
              wa_partner_new-ref_no_type = wa_partner-ref_no_type.
              wa_partner_new-ref_display_type = wa_partner-ref_display_type.
              wa_partner_new-display_type = 'BP'.
              wa_partner_new-no_type = 'BP'.
              wa_partner_new-partner_fct = 'Z_IA'.
              wa_partner_new-partner_no = w_partner_no.
              wa_partner_new-mainpartner = 'X'.
              INSERT wa_partner_new INTO TABLE it_partner_new.
              wa_partner_newx-display_type = 'X'.
              wa_partner_newx-no_type = 'X'.
              wa_partner_newx-partner_fct = 'X'.
              wa_partner_newx-partner_no = 'X'.
              wa_partner_newx-mainpartner = 'X'.
              INSERT wa_partner_newx INTO TABLE it_partner_newx.
               IF it_partner_new[] IS NOT INITIAL AND it_partner_newx[] IS NOT INITIAL.
        "maintain all changes to be done
        CALL FUNCTION 'BAPI_ACTIVITYCRM_CHANGEMULTI'
          TABLES
            partner  = it_partner_new
            partnerx = it_partner_newx.
        CLEAR : wa_guid1.
        REFRESH : it_guid1.
        wa_guid1-guid = w_guid_ref.
        APPEND wa_guid1 TO it_guid1.
        "save the changes
        CALL FUNCTION 'BAPI_ACTIVITYCRM_SAVE'
          TABLES
            objects_to_save = it_guid1.
        "commit the transaction
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDIF.
    Please reply if anything else os required.
    Please reward points if useful.
    Regards,
    Ashlesha

  • Change WBS in CJ20N - Service Order change log

    Hi PS experts
    Scenario.
    Service order 1 has WBS element A.
    User goes into CJ20N and changes the WBS ID/ name to A2.
    Service order 1 now automatically has WBS element A2. However, if you look at the change logs on the service order, there isn't one for the allocation of this WBS change. Is there a way of updating the change order log for the service order? When saving in CJ20N it must update the service order through the back door.
    Thanks for looking.

    System stores the WBS element using external and internal numbers. What the user has changed in your case is only the external number and the internal number (which is system generated) would remain the same.
    That's the reason the external ID is updated in SO. Don't think you can get his logged in change log of order. Is change document activated for the order type? Even if checked I really doubt if this would be logged using standard.
    Let's see other views on this.
    Regards
    Sreenivas

  • Changing Status Profile for WBS Element

    Hi Freinds,
      How can we change the Status Profile for the WBS Elements.
    say for Eg : need to chage status Profile Z0000005 to Z0000008
    where they reflect in DB Table JSTO for OBJNR in filed STSMA
    Please suggest me the function modules or BAPIs
    Thanks in Advance,
    Ganesh

    hi,
    try the below given link
    [Changing Status Profile for WBS Element|Update WBS element;
    hope this helps
    Regards
    RItesh J

  • To change user status profile on sales order at run time.

    Hi Experts,
    We have defined status profile for Sales returns ( Doc type RE) which blocks the  return order on creation. There are two statuses here which are to remove the delivery block and to remove the billing block by authorised users.
    The requirement is now to have a three level block ( three statuses ) on the same document. We can create a new status profile and assign it to a new return sales order tpye  but we want to avoid creating new document types. Since this document type is used across various companies in the group we can not assign a new profile on the existing RE document as well.
    My question to all experts is
    Is it possible to dynamically change the status profile assigned to the document type based on characterstics like sales org or company code etc? If any body has done this please let me know the user exit , function module, BADI etc where the necessary coding has been done.
    Helpful answers will be rewarded with points.
    I look forward to your co operation.
    Regards,
    Kartik Shah

    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 *********

  • Change in status profile of internal order

    I've changed the status profile assigned to an order type because of new requirements for disallowed transactions.  The new profile settings/ user status worked for new IO master data created.  However, for existing IO master data, the user status was not updated with the new status profile.  What's the transaction to reconstruct/correct the user status of old IO master data?

    Hi,
    Once you assign the sttus profile for an order type,this should work for all the orders assigned to that specific ord-type.
    create a new session and work.The orders will respond to the new status profile.
    Hope this helps.
    Regards,
    Ramesh

  • How to restrict status profile for sales order.

    Dear Friends,
    Pl suggest me for follwoing scenario
    ►     As per business process for tender/ institutional sales and exports, the order is complete once the complete delivery and invoicing for the same has been performed.
    ►     It was also observed that a sales order may be modified (material, quantity, price etc) even after complete invoicing of the same has been performed in SAP.
         The requirement is  Possibility to enable a control to restrict any amendments to the sales order after complete delivery and invoicing will be explored as per business requirements.
    Is there any solution above scenario without writing any code.
    Regards,
    Atul
    Edited by: atul thakur on Oct 28, 2009 5:09 AM

    Mr Atul,
    My understanding is, you don't want your user to be able to change the pricing and order quantity once the order is complete, i.e Delivered and Shipped.
    The status profile will not help you in the above scenario, Price/Quantity changes will not come up as Business transactions that can be controlled at Status profile.
    Standard SAP restricts the price changes to a completed item of the order, so no need to worry about this.
    But order quantity can be increased any time.
    So to restrict the user to increase the order quantity you need to use the User-Exits that SAP provided.
    Use the MV45AFZB user-exit program and form  FORM userexit_check_vbap to code this.
    Hope this helps you.
    Regards,
    Aj.

  • Status profiles for sales order

    Dear all:
      I use  status profiles to do sales order approve(BS02)
    who can tell me which business transaction can settle Sales Order can or not make to MD04?
    the standard business transcation:
    Acct. assignment order/project
    Activate final billing doc.
    Actual activity allocation
    Actual overhead (periodic)
    Actual settlement
    Automat. WIP/results analysis
    Change configuration data
    Complete
    Confirm order
    Create billing document
    Create changeable copy
    Create delivery
    Create inquiry
    Thanks a lot .

    hi,Imran  and rohit rathi
    thank you very much for you help,
    maybe I have't depict the problem,
    I use user status profiles to do sales order approve, i have defined a status profiles and assigned it to sales document type ,  i have defined two statuses  A00 and B00 in the  status profiles .
    I hope if the sales order in status A00,it'can make to MD04,when the sales order approved to status B00,It can make to MD04.
    but I don't know which business transaction  shoud I choose when defining the profiles' status A00 by t-code BS02.
    thanks and Best wishes.
    zeng
    Edited by: zeng zeng on May 31, 2008 11:37 AM

  • Status profile in sales order

    Dear All,
    I have a requirement  as below
    In status profile  maintained 5 statuses in the sales order when the user  releases 4th status system should not allow to change the sales order .

    Hi
    Your requirement can be fulfilled through a User exit.
    You write the logic as below, All the data related to statuses are stored in JCDS and JEST tables.
    So you can pass the OBJNR from VBAK to JCDS table there you have to get the status for the fourth profile and look for the fields
    INACT and CHIND,  if for the fouth status if the CHIND is U then there should not be nay modifications
    regards
    Prashanth

  • Status profile in sales order  Re Release

    Hi Experts,
    Scenario is like this
    Iam using status profile ZETO1 in T.Code [BS02] for releasing sales order once Sales team person creates a sales order VA01. After this Fiance person will release through sales order  status in header (i have created status profile and authorisation key
    which will be with Finance person)
    I have status profile  like this step 10 and 20 in T.Code [BS02]
    10. created (initail status)
    20. released by finance
    once finace person release this delivery can happen.(i have used user exit for this)
    the problem is if sales team member again make changes in sales order then status of sales order again should go to step 10 then it should be again released by finance person.
    whether it is possible to re realese in status profile concept in SD???
    please help
    Thanks and Regards,
    kedar

    Hi
    Your requirement can be fulfilled through a User exit.
    You write the logic as below, All the data related to statuses are stored in JCDS and JEST tables.
    So you can pass the OBJNR from VBAK to JCDS table there you have to get the status for the fourth profile and look for the fields
    INACT and CHIND,  if for the fouth status if the CHIND is U then there should not be nay modifications
    regards
    Prashanth

  • Status Update of Service Order From Billing Document

    Dear Experts,
    I am told to change the User status of Service Order once the Billing Document is Generated.
    Here we are in CRM 2007 and i have done the status update of previous document but here
    Billing document is not possible to read through CRM_ORDER_READ (function module).
    Do any one have any idea how do i proceed.
    Thanks,
    SA

    hi sa
    to change the service order user status , when biling document is generated
    make an implementation of bill_acc_if  bai and in the method ENRICH_ACC_DOCUMENT
    read order data using crm_order_read  and change the status using
    CRM_STATUS_CHANGE_EXTERN
    thnks
    sam

  • Change log for CRM service order

    Dear Experts,
      I've created log profile in CRM under IMG path Customer Relationship Management->Basic Functions-> Change log with protocolo " Changed document "  & segment " PRICING_I ". This log profile is attached to transaction type service order.
    Basic idea is to capture the changes made on the pricing in service order. Now with this setup where can i see the trace of changes done in service order. Is there any table that fills with the log  ? 
    Basically i'm trying to find log DB table for pricing with this setup.Can anyone pls suggest me to resolve the issue.
    Regards
    Devika.S

    Hi,
    there are no change logs for CUMULAT_H object because this is only a temporary object in CRM Order buffer. Check for example the function module CRM_CUMULAT_H_READ_OB. You will find out the this module does not read the CUMULATE_H from the DB cumulates the values by reading the item values.  Because of that you will also see that in view CRMV_OBJECTS the change document relevance is not maintained for this object.
    So you will not a change entry for CUMULAT_H in CDHDR/CDPOS. As a workaround for your requirement you can read the changes of CRMD_PRICING_I-NET_VALUE from the change document tables or write a change entry on save into a customer field and/or table.
    Regards
    Nicolai

  • Automtic User Status updation in Service Order

    Hello ,
    Whenever I do "TECO" of service order , User status should automatically change."TECO" is a business transaction
    Do anyone have done this . Which exit is user to achieve above.
    Regards,

    Hi,
    Check the below FMs :-
    STATUS_CHANGE_EXTERN : This is used to set or delete User Status
    STATUS_CHANGE_INTERN :This is used to set or delete System Status
    STATUS_READ : This is used to read system status or user status
    First check up via User status , with proper status numbers
    If ur having many different than better u can go for user exit : IWO10009 PM Order: Customer Check for 'Save' Event. to check at save and set status accordingly ...
    For reading latest status - u may have to read from structure i think ..
    Tables :- JEST, TJ02T,TJ20 etc
    regards
    pushpa

Maybe you are looking for

  • Weblogic server error

    Hi i'm getting this error while starting the weblogic server <Dec 31, 2012 9:51:41 AM IST> <Error> <Server> <BEA-002606> <Unable to create a server socket for listening on channel "Default[3]". The address fe80:0:0:0 4637:e6ff:fe44:6118 might be inco

  • Enter text in field causes movieclip to change size can it be done?

    I have 3 textfields called A, B, and C. If the user places text in one of the textfields I want movieclip Z to be at about size 160. If they place type in 2 of the textfields I want movieclip Z to be at 130, and if they put text in all three textfiel

  • Is there a way to disable nepomukindexer completely?

    I have some large pdfs which trigger some nepomukindexer processes every time I open their containing folder with dolphin. I have already disabled everything related to nepomuk in systemsettings but these nepomukindexer processes continue to show up.

  • " � Kit contains a" Why do I get odd characters on web pages?

    I've noticed that different web pages display non-alpha characters. The above example was on Amanzon; other pages on discovery channel pages.

  • Where is our App Data?

    App data, for example, saved game information. How does this get backed up? During a sync? Or only during a backup? For example, I synced my phone one night and started playing texas hold'em. The phone locked up on me. Which it does about twice a wee