详解EBS接口开发之库存事务处理采购接收的方法还可以用一下方法,不同之处在于带有批次和序列控制的时候实现方式不同
The script will load records into the tables
RCV_HEADERS_INTERFACE,
RCV_TRANSACTIONS_INTERFACE,
MTL_TRANSACTION_LOTS_INTERFACE
MTL_SERIAL_NUMBERS_INTERFACE
If the item is only a standard item, only the records into RCV_HEADERS_INTERFACE and RCV_TRANSACTIONS_INTERFACE tables have to be created.
SETUP
0) Ensure to apply the patches listed in Document 367396.1 Recommended Patches for Enhanced Receiving Validation after upgrade to or install of 11.5.10 (or 11i.SCM_PF.J) and For Release 12 see Document 423541.1
1) Purchasing / Purchase Orders / Purchase Orders
Standard Purchase Order number 10084 is entered
Vendor F-Supplier
One line / shipment line/ distribution line for
Item=F-Lot-Serial-Controlled-4
Quantity=10
Destination Org=M2
Ship To=M2-Boston
Receipt Routing=Direct Delivery
2) Item 'F-Lot-Serial-Controlled-4' is a lot and serial controlled Item in Destination Organization
SQL> Select mp.organization_id Org_Id, mp.organization_code Org_Code,
msi.inventory_item_id, msi.segment1, decode(to_char(msi.lot_control_code),
'2','Y',
'1','N') LOT_CONTROL,
decode(to_char(msi.serial_number_control_code),
'1','None',
'2','Predefined',
'5','Dynamic at INV receipt',
'6','Dynamic at SO issue') SERIAL_CONTROL
from mtl_system_items_b msi,mtl_parameters mp
where msi.segment1 like '&item' and msi.organization_id=mp.organization_id;
For item=F-Lot-Serial-Controlled-4 , inventory_item_id=378856 and LOT_CONTROL='Y' and SERIAL_CONTROL='Dynamic at INV receipt'
3) In Purchasing Responsibility
Receiving/Receipts
In org M2 Boston
Find expected receipts
Source Type =Supplier
Purchase Order = 10084
-> Ensure 1 line is available to be receipted
Order type = Standard
Order = 10084
Routing = Direct Delivery
4) Run the following scripts so to find the necessary information to insert into the RCV_TRANSACTIONS_INTERFACE table:
Select * from PO_HEADERS_ALL where SEGMENT1 = '&p