How to update the service order status at meter level

Hi
I need to fetch one open service order and update the retrieved open service order status at meter level.
I am trying to do it through BAPI_ALM_ORDER_MAITAIN but i am not able to do it.
Please let  me know the process how to update.
Thanks & Regards
Pallavi

Hi,
Check if this code works ...
REPORT zbapi .
DATA t_meth TYPE TABLE OF bapi_alm_order_method.
**Internal table for Operation (BAPI)
DATA t_oper TYPE TABLE OF bapi_alm_order_operation.
DATA t_comp TYPE TABLE OF bapi_alm_order_component.
**Internal Table for Opertaions UP (BAPI)
DATA t_comp_up TYPE TABLE OF bapi_alm_order_component_up.
**Internal table for BAPI Return code
DATA t_ret TYPE TABLE OF bapiret2.
***WORK AREA DECLARATIONS
**Work Area for Hedaer
DATA:wa_header TYPE caufvdb,
wa_meth TYPE bapi_alm_order_method,
wa_op TYPE afvgb,
wa_comp TYPE resbb,
wa_comp1 TYPE bapi_alm_order_component,
wa_comp_up TYPE bapi_alm_order_component_up,
wa_oper TYPE bapi_alm_order_operation.
PARAMETERS:TEST.
****Fill Method Internal table
CLEAR wa_meth.
wa_meth-method = 'SAVE'.
APPEND wa_meth TO t_meth.
wa_meth-refnumber = sy-tabix.
wa_meth-objecttype = 'COMPONENT'.
wa_meth-method = 'CHANGE'.
wa_meth-objectkey(12) = '000004000104'.
wa_meth-objectkey+12(4) = '0010'.
wa_meth-objectkey+16(4) = '0010'.
APPEND wa_meth TO t_meth.
**Component Internal table
wa_comp1-reserv_no = '0000001072'.
wa_comp1-res_item = '0001'.
wa_comp1-activity = '0010'.
wa_comp1-item_number = '0010'.
wa_comp1-special_stock = 'B'.
wa_comp1-requirement_quantity = '15'.
wa_comp1-stge_loc = '0001'.
wa_comp1-backflush = 'X'.
APPEND wa_comp1 TO t_comp.
**Component Update Internal table
wa_comp_up-special_stock = 'X'.
wa_comp_up-backflush = 'X'.
wa_comp_up-requirement_quantity = 'X'.
wa_comp_up-stge_loc = 'X'.
APPEND wa_comp_up TO t_comp_up.
**Call Bapi
BREAK-POINT.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = t_meth
it_component = t_comp
it_component_up = t_comp_up
return = t_ret.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.   <--- Hope u r using this too
regards,
Naveen
Edited by: Naveen Deva on Apr 16, 2009 9:12 AM

Similar Messages

  • IMP: How to delete the service order

    Hey Experts,
    Can you tell me how to delete the service order which was created in IW31..? or we have any Functions Module to delete the service order?
    and one more question is I have more than 100 service order in the table ,but it will display only 50 order when i execute this Functions Module BAPI_ALM_ORDERHEAD_GET_LIST
    can you tell me how to solve this problem...?
    Thanking you in advance,
    Regards
    J Sarathi

    This is what the BAPI_ALM_ORDERHEAD_GET_LIST documentation says
    "You can use this method to determine a list of orders according to a list of selection criteria. The number of hits that are produced for the person calling up the list, can be specifically reduced; without further parameter transfers, the first 50 hits are displayed. A complete list of the hits is stored internally. If you call up the selection again within a Logical Unit of Work (LUW) without changing the selection parameters, but with other refurbishment parameters, then you receive further partial quantities of the selection result, as specified by you."
    and for deletion
    check whether you can set any deletion status through the fm BAPI_ALM_ORDER_MAINTAIN
    Also check the business objects BUS2007, BUS2088

  • User Exit or BADI to update the service order  in R/3

    Hi,
    When creating a service order the following fields need to be populated automatically using an user exit or badi.
    1. Planner Group
    2. PMActType – Plant maintenance activity type
    3. Cost/Profit Centre
    4. WBS element
    5. Work center
    so my requirement is there any function module or Badi or user exit to update the service order details when service order is created / changed.
    Pls do the needful.
    Reg
    Ramana

    Hi Ramana,
    Go to SPRO Transaction and follow the below path
    Customer relationship management>Transactions>Settings for Service Processes>Business Add-Ins and you will find 8 BADI's.
    Check these BADI's useful for you.
    Regards,
    Lijo Joseph

  • User Exit or BADI  to update the  service order

    hi,
    When creating a service order the following fields need to be populated automatically using an user exit or badi.
    1.     Planner Group
    2.     PMActType – Plant maintenance activity type
    3.     Cost/Profit Centre
    4.     WBS element
    5.     Work center
    so my requirement is there any function module or  Badi or user exit to update the service order details when service order is created / changed.
    Pls do the needful.
    Reg
    Ram
    Message was edited by:
            RAMANA MYLAPALLI

    Best Possible way is.
    go to se24 -> type in CL_EXITHANDLER -> Go to get_instance method.
    Put a breakpoint on CALL METHOD cl_exithandler=>get_class_name_by_interface.
    Now run the transaction and check which all BADI and user exits are invoked when u call the transaction.
    Idenitfy the BADI which can be useful to you.
    Reward if u find it useful.
    Thanks
    Kartavya

  • Need to update the sales order status

    Hi Friends,
    I have one query.
    we are doing archiving of sales documents.during the preprocessing we have identified that there are some non-archivable documents due to status check.
    Example:As per Sales order schedule line category "CT" is relevant for delivery. Now we had a talk with business and removed the "item relevant for delivery indiacaotor" from schedule line category.
    This config changes will apply for newly created sales orders.
    Now the requirement is to update the status of old sales orders with this new config change to make these non archivable data to be ARCHIVED.
    can any one help me out by providing relevant SAP note or by sending me the program name which will update the old order status with the new config changes.
    Thanks & regards,
    Shaik Hussain

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

  • How to find the Service order and its status..

    Hello,
    How see the status of the service order...
    i have to search for all the service orders where all of them completed once....
    which tables, fields are useful.
    Please help to solve this issue.
    thanks for yoru cooperation

    Hello Gun,
    How to see the status desciption for example
    I1005
    I1004
    I1002...etc
    waht I1005 means. I have to display status of each service order in the list , here i can not display I1005 is the status, instad i have to diplay I1005's desciption.

  • How to refer the work order status value from a different transaction in the step handler?

    Hi All,
    I have a requirement to check the status of the work order from a different transaction before doing some logic in the current transaction. The following transactions are done to replicate the issue
    1)changing the status to ONSITE to edit the work order (transaction 1)
    2)Adding some information which will do some logic (transaction 2)
    3)Completing the work order (transaction 3)
    The transaction 2 will have some logic and will be executed only if the status is COMP but even though the status is COMP now (transaction 3) my condition check in the logic is showing as ONSITE status(transaction.status=ONSITE) and it fails. How can i get the latest status of the work order in the device? Please advice

    Hi Jason,
    The CompleteWorkOrderFinish sub action does have Apply action (screenshot 1) and the transaction definition (screenshot 2)of CompleteWorkOrderFix transaction with the only property Status which has the following settings (screenshot 3)
    Also I am trying to add a status property in EditMeterFitDetaisl transaction and update this value with the current status of the work order using object collections filtering with key value. Please let me know if that approach can be followed. Thanks

  • How to update the Sent Idoc Status based on the Response From Webservice

    Hi All,
    I have to develop Idoc--SOAP Sync Process Scenario Using BPM .
    I have configured every thing using BPM and mapped
    MATMAS----SOAP Request
    SOAP Resp----STATUS.SYSTAT01
    In R/3  the Main Idoc Number(MATMAS) Status needs to be update , but it is creating the new Idoc with STATUS.SYSTAT01.
    I have used STATUS.SYSTAT01 Idoc to Update the status of the Original idoc based on the Response that is coming from webservice .
    I was posted the same thread a days ago and there Bhavesh suggested me some sugessions.
    How can we make the status of the Idoc based on some response Text
    iam unable to follow OR not able to clear my self on this.
    Please suggest me or give some over view kind of thing on this
    Regards

    Hi Suman,
    It is clearly mentioned in SAP help that "SAP Intermediate Documents (IDOCS) are EDI like documents that are asynchronous in nature."
    So Your Scenario is Asynch(receive) - Synch(WS call) -Transformation (Multimapping)- Asynch(Send to R/3).
    now go in this way:
    you can develop all the message Interfaces  of  Abstract catagory (not manditory )
    MI_AA_MATMAS   -> Abstract Asynchronous message    interface for your Matmas IDOC
    MI_AS_SOAP_ReqandResp  -> Abstarct Syncronous MI for SOAP request and response.
    MI_AA_STATUS ->Abstract Asyncronous MI for Status Idoc
    MI_AA_SOAP_Req ->  Abstarct Asyncronous MI for SOAP request .
    MI_AA_SOAP_Res ->  Abstarct Asyncronous MI for SOAP response .
    Thats all in Message interface.
    your first reciever :
    (This will receive the message asynchronously from R/3)
    create a conatainer varaiable (say preceive) and assign it message interface MI_AA_MATMAS
    Now in thw Propert TAB of this step: give this message name.
    Step2: Synchronous call :
    create container Variable psoaprequest and psoapresponse  give abstract message interface MI_AA_SOAP_Req and MI_AA_SOAP_Req  resp.
    Now in thw Propert TAB of this step:
    Synchronous Interface : MI_AS_SOAP_ReqandResp
    Request Message : psoaprequest
    Response Message: psoapresponse
    Transformation Step :
    Here you will specify Interface Mapping that will conatain Multimapping between Synch Response - MATMAs and STATUS
    Let's name it as IM_ResandMatmasToStatus
    create a container variable as pstatus and assign it abstract interface MI_AA_STATUS.
    In Property pan of this step :
    Interface mapping :IM_ResandMatmasToStatus
    Source Message :psoapresponse
                                preceive
    (IT will ask you for two source messages as IM selected in this transformation has 2 source messages)
    Target Message :pstatus
    Send step:
    Select a message as pstatus.
    thats all in IR.
    If have doubt in ID just let me know.
    Thanks
    Sunil Singh

  • How to create the service order using CRMXIF_ORDER_SAVE

    Hi Friends,
    I want to create service order using thsis function module
    CRMXIF_ORDER_SAVE and quantity also in this service order transaction.
    Any body please explain the above question

    Hi Friends,
    I want to create service order using thsis function module
    CRMXIF_ORDER_SAVE and quantity also in this service order transaction.
    Any body please explain the above question

  • How to update the sales order header & item data in TM system

    Hi Experts,
    Greetings!
    I need your help,I have a one requirement sales order data came from ECC these sales order data need to update in TM Sales order header table as well as item table also these fields are additional fields.
    Can anyone please guide me I am very new in TLM .
    Thanks in advance.
    Thanks&Regards,
    Siva.

    Hi Siva
      "/SCMTMS/TRQ~ROOT" is for sales order header and "/SCMTMS/TRQ~ITEM" is for details.
      I assume you need to
    enhance the structures for these nodes to hold your add. fields;
    and do the same for the input parameter of service TransportationRequestRequest_In (which is used to create OTR) from PI side;
    Pass the add. fields during service call (impelment in ERP system);
    Map the fields from service paremeter to node attribute (implement in TM system, BAdI   /SCMTMS/TRQ_SE_TPNRQ_REQ~CHANGE_MODIFICATION create modification table for the input parameter).
    I cannot find source code for all of that; hope it helps.
    Sensen

  • Unique constraint ERROR How to update the task order customly?

    I am using DAC to load data from Siebel database into Oracle Business Analytic Data Warehouse for BI Apps. Now we encounter a question. I need some help.
    When I run current execute plan, the Custom_shyy_SIL_ActivityFact is failured.Beause the *'unique constraint (SHYY_OLAP_DEV.W_ACTIVITY_F_U1) violated'* ORA_00001 ERROR. I analyse this question.At last, I think this question is caused with some below reason.
    My custom execute plan include some Update Dimension from Dimension tasks. They are SIL_EmployeeDimension_SCDUpdate and SIL_ProductDimension_SCDUpdate and so no. that tasks that marked Update Dimension from Dimension run before the Custom_shyy_SIL_ActivityFact. And, in the w_product_d one integration_id corresponding with two records, but the curent_flag ='Y' recored is only. Now ,I Think the SDCU Task is run before the Load fact tack. I discoved it does't work. please help me !

    Hey
    When Doing a full Load through DAC it drops all the unique indexes and then inserts the data and recreates the indexes again.The Index Creation fails if there are duplicate rows (Rows with same integration_id).
    So start Checking the Data right from the Source Level.
    First check the Source (do this using the integration_id thats repeating,Go through the informatica Mappings(ETL Mappings).
    If its Fine there Come to the Staging Level and Check for Duplicate Columns.
    Then Check in the final Table for Duplicate records.
    My Guess is that you are having duplicate rows at the Source level.
    If your are using informatica try using distinct for the SQL in the Source Qualifier(think that should block any duplicate records).
    Update here If you are able to solve this.
    Thanks
    Hemanth

  • Update Service order status based on Sales order billing status

    Hi All,
    Pls give some suggestions for below scenario.
    Sales order will be created from Service order.
    Service order should get completed once the sales order is billed fully.
    Billing status is available in Sales order header. When ever billing is created, sales order status get updated.
    Where I need to have the trigger (User exit etc...) to update the service order status w.r.t sales order billing status.
    Rgds,
    Senni.B

    Hi,
    As standard the system update service status, maybe some config is missing. Please check the copy control conditions in SD.
    Hope this help.
    Regards.

  • How to update the condition price in the sales order for all the items

    Hi,
    How to update the condition price for all the itmes in the sales order to carry out the new price automatically through a stand alone program, for all the orders in the billing due list table?
    Thanks,
    Balaram

    Hi,
    There is a change in the requirement.
    Scenario:
    I have created a sales order with some 4 condition types, in that 2 condition types are of class A & B and the other two is of class C. Here I need to update the condition price of class A & B only and the remaining condition types should not get update even though there is an updated price is available.
    For the above scenario, I need to write a standalone program. Do we have any function modules to update the price of the single condition in the sales order? Please tell me how we can update the sales order at item condition level.
    Thanks.
    Balaram

  • Service Order status  Not Changing From Resloved to Closed status

    The service order Status not automatically moving from Resolved to closed after 30days.
    Observation
    We Revived program Z program ,seems to be fine.
    I am set the program in debugging mode for testing the Service orders by  reduce the time duraion for staus resolved to closed, am getting the getting the Error Test determination procedure is not evaluated . 
    Point of dout
    1) Is there any relation between Test Determination Procedure and Z program.
    2) while am checking for Text Customing for Consistency I found an error Log.
    3) While creating Service Order Test field was Mandatory
                      for that have dout about is there any relation between for this program
    Thanks in Advance
    Regards
    Raju.........

    Solved ...
    BD75  (RBDMOIND ) is T-Code and report name ...
    need to schedule ...

  • Query on ZCOMP (Service Order Status) transaction

    Hi,
    While working with ZCOMP transaction (used to generate the Service Order Status Report), is it possible to enter multiple Service Orders at one go and obtain the ZCOMP download data for all the Service Orders together in one spreadsheet?
    Edited by: Ben Harris on Dec 26, 2010 4:12 PM

    Ben,
    When the experts tell you that it is a customer report, they mean that the report was created by your company.  No-one here in these forums knows anything about this particular report.
    You need to approach people in your own company to find out what, if any, authorizations are needed to run this report.  The report may be an ABAP report (ABAP is the SAP proprietary programming language that is the foundation of all SAP programs, whether created by SAP or created by your company).  If it is, to change the report code you would have to be a programmer with an SAP developer's key.
    It is not clear what 'settings' you need to change in the report.  Standard reports within SAP (and most custom reports as well) have one or more selection screen.  In these screens, you can sometimes filter or expand the suite of data that is extracted and displayed in the report.  In most (but not all) reports, anyone allowed to run the report also has the ability to change selection criteria in the selection screen.  I suggest that before you consult with a local developer, you experiment with running the report yourself, using changed selection parameters from the default.  Such experiments are usually conducted in a test system (which I am sure that your company has).
    Your manager should be able to tell you the procedure used by your company to investigate this question.
    Good Luck & Best Regards,
    DB49

Maybe you are looking for

  • Acrobat 9 Pro Forms Tracker

    Hi, I have distributed forms via AA9 using my local email and have used the Forms Tracker to monitor responses. I recently required a rebuild of my user profile and since then Tracker has lost its link to the distributed forms files so I am no longer

  • ERROR- Robohelp crashing  - HELP!

    Using TCS2 on Window 7, 64 bit. I am experiencing a new and very distrubing problem. When I update by RH main topic (with all my subtopics included) RH freezes, and then crashes. Consistently. I am getting the error: An error occurred while trying to

  • Search for a reversed material document

    Hi all,           how can I find if a material document is reversed? thank you                     Gino Bonfiglioli

  • JSP, tags or beans or what?

    Hi, I have not used jsp's for almost 3 years now but need to return to them. Can anyone advise what the best/most modern way to include POJO output code in a JSP. I am confused as to all the different terminologies. In my mind simplicity is best so l

  • Should I format an OS8 drive with journaling?

    Hello, I have two separate hard drives on my G3; one 250 GIG drive with OS10.4.6 Tiger and another smaller 12 GIG drive that I plan to install OS 8.6 onto. (The 250 GIG drive for Tiger is formatted with journaling.) Now, I am about to format the 12 G