Work orders and updating user status (via IW32)

Hello All,
I was given a design to create a program that will retrieve all open work orders. The program needs to check on all the purchase orders for that work order to check if order quantity matches the received quantity and the invoice quantity. If it matches, I will do an IW32 to change the user status to 'AIP' (All Invoices Paid). If there are no invoices or purchase orders, I will again, do an IW32 to change the user status to 'AIP'.
And since this is my first time to work on a PM ticket, I'm not very familiar with the tables being used. I've tried looking for a list of PM tables. One table I got is AUFK (Order Master Data). I searched through the table and it has the fields for Sales Order Number (KDAUF) and Item Number (KDPOS). Is this the Purchase Order related to the work order? Also, is there a way I can see or verify it through a transaction? I tried looking into transaction IW33 but I couldn't find any Purchase Order Number there. Also, how do you know if a work order is open or not? Is there a field that indicates it?
I was thinking if there are any BAPI's I can use to change a work order's user status instead of doing a CALL TRANSACTION 'IW32'? I saw a function module, RFC_CHANGE_PM_ORDER, that does a remote function call to IW32 but this has dialogs. I'd appreciate any input.
Many thanks in advance!
Regards,
Kristine

Hi
You can use the BAPI - BAPI_ALM_ORDER_MAINTAIN to maintain orders.
Given below few order related tables
AUFK     -Production order headers
AFIH     -Maintenance order header
AUFM     -Goods movement for prod. order
AFKO     -Order header data PP orders
AFPO     -Order item
RESB     -Order componenten
AFVC     -Order operations
AFVV     -Quantities/dates/values in the operation
AFVU     -User fields of the operation
AFFL     -Work order sequence
AFFH     -PRT assignment data for the work order(routing)
JSTO     -Status profile
JEST     -Object status
AFRU     -Order completion confirmations
This may help you.
Thanks & Regards,
Govind.

Similar Messages

  • Work order and P.requisition

    Hi Gurus,
    Can we create a Purchase Requisition from a Work order? If yes, then please help.

    My dear
    in a every company work order should be available in manually only,  so pls see that work order and update in PR ok.
    Sri

  • 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

  • User Exit to update user status at VA01/VA02

    Hi Expert
    Please help identify any User Exit to update User Status stored in tables (JSTO/JEST), at time of sales order (Business Object 2032) creation / change.
    Requirement is to set check mark on a specific user status in case of a material master is missing HTS code.
    Regards-Aamir

    Hi,
    If your requirement is to set the check the HTS field in the material master, you can make the field as Mandatory without which the  Material cant be saved
    You can make this field mandatory in OMS9 transaction code with field status as 89 and the field is MARC-STAWN
    Please revert if you need more details
    regards,
    santosh

  • STATUS_UPDATE error to update USER STATUS - Update termination error

    Hi All,
    I am using status_update FM in sales order user exit MV45AFZZ in a perform routine for updating user status in line item for sales order. There are 4 custom statuses created for the sales order line item. 1,2 3, and 4 by configuration. My job is to select one of those based on user selection.
    Scenario: During change order process using  VA02, I have to change the existing status to a third status when user selects the second one. That is for example, in VA02, user selects status 4 from previous status 3, and save, I have to make the status 4 inactive and save the new status 2 instead of 3 though user selected 3. How do I achieve this.?  ????Any programming example is really appreciated. Thanks!!!
    I am right now using STATUS_READ and reading the existing status 4. Then making it inactive using status_update FM. And updating the new status 2 as active one and 3 as inactive again. Two inactive updates and one active update is throwing an update termination error while saving the sales order.
    Any help is really appreciated. 
    Thanks
    Ricky

    Hi ricky,
    For saving any changes you need to have a Z-table.
    In programs we can't store the user selection. In your case you can create a z-table and store the status there and delete the last status. The process would be faster as you will always have one record in the table.
    . One more advantage is you can even track the changes through the Z-table(User who is changing it.)
    Hope this solution will surely help you.
    Cheers
    Suvi

  • Exact difference between System status and the user status

    Hi,
    Please tell me the exact difference between System status and the user status .
    how we customize the both in the system
    Thanks & Regards
    Prajith P
    Moderation: Locked. Please, try to find an answer first. See rules of engagement
    Edited by: Joaquin Fornas on Feb 23, 2012 11:14 AM

    Hi,
    As you mentioned there are 2 status can be maintained for documents like Equipment Master, Notification, Maintenance Order & other important business documents.
    In case, client feels that system status is not enough to capture the details of the object, then user status can be used.
    System statuses will be updated automatically based on business transactions which will be done on SAP.
    For example, once the equipment is created, System status would CRTD (Created). If you install the same to some superior equipment or FL, then status would be INST (Installed).
    If you keeping that equipment in Spare, then for that, you have to maintain separate User Status like AVLB (Available in Stock / Spare) so that through IH08, by using User status, you can the report which is available as spare.
    These user status as per the name, should be updated by the user manually.
    Regards,
    Maheswaran.

  • Reset order item's user status

    Hi,
    I would like to reset an order item's user status to original after user change the user status. What function module can I use? CRM_ORDER_MAINTAIN will give me recursive short dump. Tried CRM_STATUS_MAINTAIN_OW and CRM_ORDER_CHANGE_STATUS.
    Thks.

    Hello,
    Could you please explain a little bit more what is the requirement.
    Why do you allow a user to change the user status if you want to reset it afterwards?
    Regards,
    Frédéric

  • Oracle EBS drill link targets for EAM Work Order and Asset

    Hi All - I am running Oracle EBS 12.1.3 and OBIEE 11g and I'm trying to link from OBIEE to EBS, but struggling to find the target functions / parameters to provide a direct URL link to EBS EAM Work Order and Asset. I have successfully linked to a Purchase Order View page, I would like to find the similar for EAM Asset and Work Order.
    I can see some parameters in WorkOrderDetailsPGCO but can't seem to work out how to get to the page from a URL.
    For reference MOS Note 555254.1 has some details, but not for EAM.
    Has anyone provided users in any reporting system with a link to EAM Work Order or Asset page and if so how were the links generated?
    Thanks,
    Gareth

    I am giving this a bump as I really need some help with this. Is I run the SQL with TOAD or SQLPlus it seems to consistently runs fine, The problem seems to only be from APEX. I think it has do to with the non-persistent state.

  • Mass Printing of Works Orders and Related Documentation

    Hi everyone,
    I have a very peculiar problem, and any pointers in the right direction will be appreciated.
    If this is not the right forum, please point me into the right direction.
    The problem that I have is this:
    I print multiple Works Orders (Plant Maintenance) at a time.
    Linked to these work orders are Equipments etc. and linked to the Equipments, SAP DMS documents. When priting the Work Orders, the sequence of the related information (e.g. documents) are random, i.e. a user will need to sort the prints to match the Work Order with it's relevant documents.
    Essentially, what I need is: print #1 W/O with attached docs, then print #2 W/O with attached docs, then print #3 W/O with attached docs
    Any ideas at what I need to look at?
    You can imagine if I print 400 works orders and all the documents related to it and it in not collated.
    Thanks.

    Can you let me know what transaction / process which you are using to print work orders, In case if you are using any transaction then we will check for user exits / badis so that we may enhance the standard functionality.
    One more suggestion is you can post in the forum: [click here|SAP ERP - Logistics Materials Management (SAP MM);
    Thanks
    Satyasuresh

  • PM Order Display Double User Status

    Dear PM Gurus,
    In PM we have define User Status for our Approval process, were a certain status must be set before the other can be set until to the last User Status which are about 10 user status that must be set before the order can be approved.
    The problem we have is that for some other reason one PM Order on the User Status display field displays two user status, and when accessing the PM Order for any changes the system give a termination error "While preparing the screen**
    **"SAPLBSVA" 0302 for screen display, it was detected that in a group of radio buttons, there is more than one field set.
    Your assistance in the regard will be highly appreciated.
    Thanks
    Elphaas Mgiba u2013 SAP PM Specialist

    Dear All,
    This problem has been fixed, actually the is a SAP Note that can be implimented to solve this problem.
    Below see the SAP Notes details:
    SAP Note        371659
    SAP Report     ZSTSEQNR
    This report will enable you to select a statuses that you would like to delete.
    Thanks,
    Elphaas
    Edited by: Elphaas on Jun 23, 2010 3:22 PM

  • How to use KAUF_AUFNR_CHANGE  to change Process order and Update a field

    Hello ,
    I am working on 4.6C system and I hve a requirement to change Process order and Update a field value passed from a ABAP Program. I am looking for suitable Function modules or Bapi ( available in 4.6c) .
    I have come across FM KAUF_AUFNR_CHANGE . Would appreciate any guidance on how to use the FM in my program and Update a field in the Process order.
    Many Thanks!

    All the importing parameters of this function module have a striaght structure of the transperent tables...
    i have checked the code and it has a modify statement based on the importing parameter..
    pick one record in databas and pass it to the importing parameters, with some values changed...
    i think that should work
    what values  to pass the import values of FM -KAUF_AUFNR_CHANGE.
    Edited by: ssm on Aug 4, 2011 7:19 PM

  • Different service costs in work order and purchase order

    When I add a service in a works order and later on add the vendor I get an incorrect planned cost in the order. A recalculation is not performed based on vendor price. A manual recalculation is possible but it should be done automatically on order save. Anybody familiair with his problem, and more importantly: Anybody got a solution for this?

    The service master / activity 123 has a specific price of 25,- For vendor XYZ the service master /activity has a price of 20,- When I create a work order and add service master / activity 123 first the price of 25,- appears. When I add the vendor XYZ in the work order and create a purchase requisition I presume the price of the vendor xyz (20,-) will appear in the PR. When I create a purchase order from the PR the price is still 25,- instead of 20,-. I get the same result when I manually change the price of the service master / activity. The price in the PR stays the same (20,-).

  • Why when i update my status via iphone 4s on facebook they appear that i updated it via mobile not via iphone .. whyyyyyyyyy

    why when i update my status via iphone 4s on facebook they appear that i updated it via mobile not via iphone .. whyyyyyyyyy

    From an older post...
    Facebook changed their mobile site so that it's the same for other mobile devices as it is iOS devices. The result is, if you post using the mobile website, it no longer labels what device you used, just that it was the mobile website.

  • WebView to refresh and update user when the site is updated?

    Anyone know if its possible for WebView to automatically refresh and update user when the site is updated?

    Not without help. WebView is just a brower. You would need to poll or use an asynchronous notification mechanism.

  • 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

Maybe you are looking for

  • Slide effect - change dinamically from to

    Hi, i try to build a slide effect (v1.5) for change dinamically the options 'from' and 'to', the scope is obtain a graphic interface for domotics application (eg. open sliding-windows to 25%) i used this sample code, but the value in the effect not c

  • Relationship between ekko&konp

    i want to fetch the condition types& their condition values  which are in me22n---->invoice---->taxes tab.these condition types are present in KONP table but not in KONV table.KNUMV  field in EKKO table and KNUMH field in KONP table are not same ,ple

  • Revenue dummy cost centre

    Hi experts, I am doing a rollout for another company.  The config are copied from another copy and should be the exact.  However, I face a problem with Billing and it always look for revenue dummy cost centre.  I can't find any config in OKB9 Default

  • One  credit  note  with reference to several invoices??

    Hello, my  customer  came  up  with  specia  requirement , Is  it  possible  to  have  One  credit  note request  with reference to several invoices?? I  never  seen  but  your  input  would  be  helpful. Points  will  be  added  for  helpful  answer

  • ORA-24777 when trying to call multiple Oracle SPs...

    I had a SP in Oracle that called another SP in a SQL Server DB via DBLink. I was calling the Oracle SP from VB.NET (3.5) and because of transaction commiting I was not able to do this, so I removed the SQL SERVER SP call from inside the Oracle SP. Ho