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

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.

  • The possibility to hide for displaying a user status in work order

    Hello gurus,
    I have following issue:
    It is possible to hide only for displaying a user status in a work order when it's active?
    br,
    Laurentiu

    See my [recent post|https://forums.sdn.sap.com/click.jspa?searchID=25309331&messageID=7376021] which references user-exit STATTEXT.
    PeteA

  • IDOC for changing user status to 'HIST' on Functional Location

    Hi.
    Can anyone please support me with an inbound IDOC for changing status on existing Functional Location?
    Thanks.

    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

  • Detect change user status on sales order

    Hi,
    I have a requirement that a custom program must start when a user puts a certain user status on a sales order.
    Problem is that I cannot detect on which event I can trigger this custom when the user status is changed. There seems not to be an entry in the change documents table, or an event triggered,...
    Does someone has already encountered such an issue ?
    thanks in advance !
    kind regards,
    Björn

    Hi Carl and Shiromani,
    thank you for your fast reply!
    I guess I will give it a try to do this with functions if I just can get it running with the cl_crm_mktpl_appl_base-class.
    As you suggested Shiromani the Save_and_commit gets an error in the assignment checks in the check_attributes-method.
    So I probably have to take a closer look why this method is returning an error-flag. Unfortunately I am not getting an error message - only an error flag is set.
    I will take a closer look at it today and keep you informed if I find out anything useful.
    Cheers,
    Dennis

  • User exit for Release Strategy in PM Work Order

    Dear all,
    Please help me with the following issue:
    My client want to change the approval route of the release strategy of the Work Order. The release is based on the PM Activity Type. Now, I am brand new on the project, I have no documentation and I have no access to CMOD so I don't know where to find the cusomised release strategy for change it.
    Please, can you advise on this?
    Thank you very much.
    Sorin

    Dear,
    to have release strategy based on "PM ACTIVITY TYPE", i suggest you two ways
    Option-1:
    1) Have permit system with classification as per the approval hierarchy.Create permits as per approval levels.
    2) Once maintenance order is created, system will assign the permits to that maintenance order at the time of saving.
    3) Now approvers will approve the permit with respect to Maintenance order PM activity type.
    Note: If your client wants to have mailing functionality to their out look or other mails, put logic in save exit after assignment of permits to maintenance order, with the help of ABAPER and also the sequence of approving the permits.
    Option-2:
    1) Create user status profile as per approval hierarchy with number assignment.
    2) Create "Authorization code" for the user status number.
    3) Provide "Authorization code" to the SAP user ids as per approval hierarchy.
    or
    If you have only one app rover, provide authorization of creating order to one user  and "Releasing" the order to other user.
    Regards,
    pardhu

  • 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

  • BAPI for transaction IW31 (creating a work order)

    Hi all,
    I need to be able to create a work order ( IW31) using ABAP code and was wondering if any knew if there was a BAPI that should be used for this functionality.
    Thanks in advance
    Mart

    hi,
    You can use
    BAPI_ALM_ORDER_MAINTAIN.
    Have a look at the following documentation.
    FU BAPI_ALM_ORDER_MAINTAIN
    Text
    Process Maintenance-/Service Order
    Functionality
    This Business Application Programming Interface (BAPI) is used for changing maintenance- or service orders and their lower-level objects. The following objects of an order can be processed (for restrictions, see the note at the end of the documentation):
    Order header
    Partner
    User status
    Order operations
    Relationships
    Components
    Long texts for order header, operations, and components
    Function
    Calling up this BAPI once allows you to perform all the operations. For this the system supplies the function module with a method table containing the methods to be performed. The entries in the method table refer to data records in the optionally filled-out data tables. All the methods from the method table are performed. Alternatively, just lower- level objects from existing orders can be changed.
    You can process the transferred data with the Business Add-In (BAdI) IBAPI_ALM_ORD_MODIFY to, for example, merge data from the external system with data from the R/3 system. The BAdI is called up as soon as the transferred data is converted into the internal format. The tests then take place after this.
    Construction of Method Table
    REFNUMBER Reference number for linking object methods - attributes
    The reference number is the line of the database which contains the corresponding data. The data table is determined by the object type.
    OBJECTTYPE Object category
    The object category specifies which object from the order should be processed. The key words listed here are not language-dependent and must be transferred exactly as they are. The following objects exist:
    HEADER Order header
    PARTNER Partner data
    USERSTATUS User status
    OPERATION Operation data
    RELATION Relationships
    COMPONENT Components
    TEXT Long texts
    (empty) ,General BAPI functions (save)
    METHOD Methods
    The methods with which the data should be processed. The following functions exist:
    CREATE Create objects
    CHANGE Change objects
    DELETE Delete objects
    RELEASE Release
    TECHNICALCOMPLETE Technically complete
    ATPCHECK Availability check
    CALCULATE Calculate
    SCHEDULE Schedule
    DELELTEDSEX Delete the status for external scheduling at operation level
    SAVE Save all data
    DIALOG Call-up dialog. See explanation below.
    TRACE Write trace file in the specified file to the frontend
    OBJECTKEY SAP external object key
    This key is for assigning the lower-level objects correctly to the corresponding objects, as there is always just one key in the data table. The key must have the following structure:
    1-12 Order number
    When creating orders with internal number assignment, a reference number beginning with % must be entered here. The BAPI then returns this number and the number actually assigned.
    13-16 Operation number
    17-20 Sub-operation number
    For relationships, the key is structured as follows:
    1-12 ,Order number from
    13-16 Operation number from
    17-28 Order number to
    29-32 Operation number to
    The following methods are permissible for the individual objects:
    HEADER:
    CREATE, CHANGE, RELEASE, TECHNICALCOMPLETE, ATPCHECK, CALCUALTE, SCHEDULE
    OPERATION
    CREATE, CHANGE, DELETE, DELETEDSEX
    PARTNER, RELATION, COMPONENT, USERSTATUS, TEXT:
    CREATE, CHANGE, DELETE
    (empty):
    SAVE, DIALOG, TRACE
    Data tables and update tables
    The objects have one or more data tables. For some objects you can specify which of the fields specified in the structure should be changed. For this you must set the field in the corresponding table to X as in the data table. If no update-table is transferred, then only those fields are set that have a value that is not initial. This simplifies the transfer data. However, this means it is not possible to delete fields. If an update structure should only be specified for some data records, the table with the update fields must nonetheless have the same amount of lines as the data table. The empty lines are then treated as if no update structure was transferred. The objects "Partner", "User Status", and "Text" have no update tables. The whole data record is always copied here.
    References
    The objects use the field REFNUMBER from the method table to refer to the lines in the data table. Counting always begins with 1. In doing this, REFNUMBER also refers to the update table. However, in the method table there is a second reference to higher-level objects for lower-levels objects. The field OBJECTKEY must be filled with order number, operation number, and sub-operation number, as specified above. If lower-level objects of a newly-created order should be changed, then you must enter a temporary order number that must begin with %. Several orders can be numbered serially, for example, with %00000000001, %00000000002 ... .
    The following objects have special treatment for REFNUMBER:
    Partner
    Texts
    Partners have an order number in the data table. During processing of the method table, all those entries in the data table are processed which have an order number that is the same as that in the line to which the method refers. Thus, through just one entry in the method table, several partners can be changed.
    Texts are composed of two tables. The first table (IT_TEXT) is made up of the header data of the text. Here you must specify the object and the first and last line of the text table (respectively inclusive, counting from 1). Through this, a line segment is specified in the text line table (IT_TEXT_LINES).
    Peculiarities in processing
    The BAPI processes the transferred methods in a particular sequence, which must not correspond to the sequence in the methods table.
    Write trace file
    Change user status time period 1
    Delete objects (dependent first)
    Create new objects
    Change existing or newly-created objects
    Change user status time period 2
    Status change of order
    Save data
    The methods are performed such that lower-level objects can also be assigned to newly-created objects. For example, first the operations are created, and then the components. Long texts can also be created for the objects.
    Components have an exceptional position. Components are created through the assignment to an operation, that is, using the "key" order/ operation (item number). However, as this is not the unique component key, you can only access the components to change them, delete them, or add long texts by using the reservation number/-item, which is only given after saving. This means that, for example, you cannot create a long text when you create the component.
    User status changes can take place at two different time points. Time point 1 is before the object changes, time point 2 is after the object changes and before the status change of the system. These time points should be defined in the transfer table in the field CHANGE_EVENT. The field documentation contains the possible values.
    The external scheduling is offered by the BAPI as a special function. THe BAPI can set the date field directly at the operation level, and select the operation with the status DSEX "Date set by external system". This status prevents any further scheduling of the operation, it keeps the transferred dates. For this, set the category 'X' in the restriction categories. When reading the operation, this category is also returned, independent of the category of restriction set in the dialog. To delete the status, you can call up the method DELETEDSEX for the object operation. The external scheduling cannot be influenced in the dialog. All changes to the scheduling restrictions in the dialog are saved as normal, but are not relevant for the scheduling as long as the status DSEX is active.
    Every time the BAPI is called up, a SAVE or DIALOG method must be transferred. Normally, calling up a BAPI is seen as a transaction. All data that is changed in the BAPI should be saved to the database immediately. The BAPI checks whether a SAVE method exists, otherwise it terminates processing. A test run of the BAPI is composed of a normal call-up using the SAVE method and a subsequent BAPI_TRANSACTION_ROLLBACK. To call up the BAPI without the SAVE method, for example, to realize dialog transactions, the BAPI can be called up with the DIALOG method. This switches off the check for the SAVE method. The processor must then ensure that later either a SAVE method or a BAPI_TRANSACTION_ROLLBACK is called up.
    A BAPI_TRANSACTION_COMMIT without SAVE method terminates processing in the update to ensure that no inconsistent data is written to the database. The processor who called up the BAPI does not receive any confirmation for the termination of the update in the target system. This logic is necessary as the order data was flagged for updating with BAPI_TRANSACTION_COMMIT through the SAVE method. However, the status information was already flagged for updating when the BAPI was called up. A BAPI_TRANSACTION_COMMIT without SAVE method then just saves the status information and would generate inconsistent orders, if the updating was not terminated.
    Customer Enhancement
    The BAdI IBAPI_ALM_ORD_MODIFY can be used to change the transferred data. The BAdI is called up after the conversion of the transfer structure into the structures used internally. Additional data can be transferred using the table EXTENSION_IN. Only then is the data checked.
    Example
    The following examples should clarify the use.
    Creating an order
    OBJECTKEY should be filled with a temporary key. The BAPI returns this key together with the assigned order number in the return table ET_NUMBERS . The order number in the HEADER table should also be filled with the number. For external number assignment, the external number should be specified. The update structure can be transferred if necessary.
    Methods table
    REFNUMBER OBJECTTYPE METHOD OBJECTKEY
    1 HEADER CREATE %00000000001
    IT_HEADER
    ORDERID ORDER_TYPE PLANPLANT ...
    %00000000001 PM01 1000 ...
    Creating an order with operation and long text
    Methods table
    REFNUMBER OBJECTTYPE METHOD OBJECTKEY
    1 HEADER CREATE %00000000001
    1 OPERATION CREATE %00000000001
    1 TEXT CREATE %000000000010010
    IT_HEADER
    ORDERID ORDER_TYPE PLANPLANT ...
    %00000000001 PM01 1000 ...
    IT_OPERATION
    ACTIVITY SUB_ACTIVITY CONTROL_KEY WRK_CNTR ...
    10 PM01 MECHANIC ...
    IT_TEXT
    ACTIVITY ... TEXTSTART TEXTEND
    10 ... 1 2
    IT_TEXT_LINES
    TDFORMAT TDLINE
    Longtext for operation 10, line 1
    Line 2 of the long text
    Notes
    Using the BAPI to process the order data cannot support all the functions of the transaction. This applies in particular for the following functions:
    Order header data
    The object list cannot be processed.
    Refurbishment orders are not supported.
    The estimated costs cannot be processed - only the estimated overall costs of the order.
    Notification data cannot be processed with the order BAPI. Even if the settings in Customizing are such that the orders and notifications can be maintained on one screen, no notification is created for the order.
    Permits cannot be processed.
    The order addresses cannot be processed.
    Individual partner addresses cannot be maintained.
    The settlement rule cannot be maintained.
    Order functions
    Printing the papers is not possible.
    Locking and unlocking the order is not possible.
    Accepting and rejecting quotations is not possible.
    Business completion is not possible.
    Flagging for deletion is not possible.
    The log cannot be displayed.
    User default values are not used.
    The field selection is not checked.
    The Customer Exits/BAdIs are not executed completely.
    Joint ventures are not supported.
    Funds Management is not supported.
    Investment orders are not supported.
    No integration of service products with task lists possible.
    No integration of configurable service products possible.
    Assignment of sales document items with service products in accordance with the aforementioned conditions.
    Operation data
    A change of the control key in the operation is not possible, if this leads to a change of the processing type (internal-/external processing)
    User status change not possible.
    Production resources and tools cannot be processed.
    Service lines cannot be processed.
    Task list integration is not supported.
    Linking operations with object list is not supported.
    Component data
    User status change not possible.
    BOM data cannot be processed.
    The delivery address cannot be processed.
    Further Information
    See also the documentation for the individual transfer tables.
    Parameters
    IT_METHODS
    IT_HEADER
    IT_HEADER_UP
    IT_HEADER_SRV
    IT_HEADER_SRV_UP
    IT_USERSTATUS
    IT_PARTNER
    IT_PARTNER_UP
    IT_OPERATION
    IT_OPERATION_UP
    IT_RELATION
    IT_RELATION_UP
    IT_COMPONENT
    IT_COMPONENT_UP
    IT_TEXT
    IT_TEXT_LINES
    EXTENSION_IN
    RETURN
    ET_NUMBERS
    Exceptions
    Function Group
    IBAPI_ALM_ORDER
    ~~Guduri

  • Set User status of Maintenance order

    Dear All ,
    I m trying to update the user status of Maintenance order via a report .I m using the BAPI "BAPI_ISUSMORDER_USERSTATUSSET" for it.
    Code details are as follows :
    USR_STATUS-STATUS_INT  = 'E0006'      "TJ30T-ESTAT
    USR_STATUS-STATUS_EXT = 'WIPR'        "TJ30T-TXT04
    USR_STATUS-LANGU           = 'EN'.
    CALL FUNCTION 'BAPI_ISUSMORDER_USERSTATUSSET'
                EXPORTING
                  NUMBER   = WA_FINAL-AUFNR
                  STATUS   = USR_STATUS
                  INACTIVE = 'X'
                IMPORTING
                  RETURN   = WA_RETURN.
    Bapi is executing successfully but it is not updating the status when I check it from IW33 .
    Suggest me for it....
    Thanks
    Alok

    Thanks SARAVANAN ,
    I have done the bapi commit . But it have some other problem and now I have done it.
    Thanks  for ur suggestion.

  • Release strategy for PREQs created from PM work order

    Hi All,
    I have an issue with determining  release strategy for purchase requisition for external services created via PM work order (iw31 transaction).
    We have activated release strategy for Purchase requisition based on the following characteristics:
    CEBAN_PLANT
    CEBAN_COST_CENTER_GROUP
    CEBAN_MANUAL
    Characteristic CEBAN_COST_CENTER_GROUP is defined via user exit based on the cost center used in the PREQ and a z table which contains all cost centers mapped to the corresponding  cost center goups.
    In the user exit we have consider to cases:
    The first one is when a purchase requisition is created with account assignment K (cost center) then system is checking the z table and determines the right cost center group.
    The second case is when a purchase requisition is created with account assignment F (internal order) then based on the order type and number the cost center in the order is defined and based on it the corresponding entry in the z table cost center group is assigned.
    The third case is when purchase requisition for services is created automatically from PM work order. In this case the PREQ is again with account assignment F, but at the time when user exit is checking the input parameters the real number of the work order does not exist and system can not defined the other parameters.
    We have defined  for this requisitions in the release strategy for characteristic CEBAN_MANUAL creation indicator " F".
    Has anybody of you defined release strategy for PREQs created out of work order before. How did you manage to trigger the release strategy?
    Best Regards,
    Desislava

    Hi,
    For PM order find the costcenter in the settlement rule of the order or else find the costcenter in the Location tab of the order.
    Consider this filed from order & write in the Z program to pick up the costcenter from there to find out the cost center group.
    Regards,
    Raj

  • 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...

  • Unable to change the status of Internal order.......

    Hi,
        I am trying to change the status of Internal order from Technically completed to Release. But i am getting an error that ---Status REL is not allowed (order 4564564).
    We have created this order and till now zero value is used of actual budget means we not used even single amount till now for this order and we want to change the status of order from Tech to REL again.
    Is it possible.
    Please suggest.
    Regards,
    R.

    Hello,
    You can release the Order by the following method:
    Go to KO02
    Enter the Internal Order name
    Go to Control Data Tab
    There we have one screen area as Status: there we have one push button(like); click it and from there you can set the staus of the internal order to Released(or you can also change the current status of the internal order)
    Please let me know if you I am missing something in my reply.
    Thanks,
    Anurag Singh Rathore

  • No authorization for activating user status PLIM

    Dear Gurus,
    I'm a newbie to SAP. Currently i'm facing the problem with Tcode KO01 while i'mtrying to create Internal Order. I can initialize the program but after i entered the Order type and pressed enter. Error msg "No authorization for activationg user status PLIM" pop-up. Pls help on this urgently.
    Thanks.

    Dear Payal,
    I checked /nSU53 just after i got the error msg. It said authorization check failed. Authorizaton object B_USERST_T status management: Set/Delete User Status using Transaction.
    Activity:01
    Authorization key: <Dummy>
    Object Catagory: ORC
    Status Profile: 00000002
    What should i do after this???

  • BAPI_ALM_ORDER_MAINTAIN - Change User Status in Operation u00BF?

    IT´S POSSIBLE CHANGE USER STATUS OF THE OPERATION?
    I SEE THAT FILL IT_METHODS AND IT_USERSTATUS BUT ONLY CHANGE THE USER STATUS OF HEADER ORDER.
    ANY CAN HELP ME?
    THANKS IN ADVANCE.

    Hi,
    Use the FM "ALM_ME_ORDER_CHANGE"
    There you can change the operation details including the User status.
    Hope this may help you.
    Regards,
    Smart Varghese

  • Chance user status in sales order VA02

    hi all,
    have any FM or BAPI is available to change (block / release) the user status in sales order change,
    pls note me about this,
    Regards
    Usman

    Hi Aditya,
    thanks,,
    which table and which field need to import in this FM "BAPI_SALESORDER_CHANGE" to change User status (Release / Block) in Sales order.
    Regards
    Usman

Maybe you are looking for