06-09-2005 7:43 AM
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
06-09-2005 8:14 AM
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.
06-09-2005 8:14 AM
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.
08-03-2005 10:15 AM
Hi Govind
I have the same problem but for me I want to create a service order from a legacy system. So is there any BAPI which will create the order. BAPI_ALM_ORDER_MAINTAIN will only change the order I believe. Kindly give suggestions
12-05-2005 5:13 PM
You can use the function BAPI_ALM_ORDER_MAINTAIN to create the SM/PM order and use the method (as defined in the table parameter BAPI_ALM_ORDER_METHOD) to define the action (Create/Chnage etc.)
06-09-2005 8:19 AM
Probably you can use EBKN table to link MM document with CS document.
If your R/3 release is less than 4.7, do not exsist BAPI standard to modify CS document: you must use batch-input technology to modify it.
Look at VIAUFKS and AUFM table if can help you.
Gianluca
06-10-2005 3:05 AM
Hi Govind,
Thanks! The BAPI 'BAPI_ALM_ORDER_MAINTAIN' worked perfectly. Here's some points for you!
Regards,
Kristine