發放訂單API

lflyingfox發表於2007-09-06

發放訂單API

[@more@]

PL/SQL Developer Test script 3.0
98
declare

l_rowid varchar2(20);
l_batch_id number;
l_customer_id number;
l_order_header_id number;
l_Ship_Set_ID number;
l_Inventory_Item_Id number;
l_Order_Type_Id number;
l_pick_grouping_rule_id number :=1006;
l_pick_sequence_rule_id number :=1006;

l_Organization_Id number;
l_org_id number;
l_name varchar2(20);
l_user_id number;
l_request_id number;


l_req_quantity number;

p_userid number :=1057;
p_Pick_From_Subinventory varchar2(20) :='庫';
p_Pick_to_Subinventory varchar2(20):='PT';
p_Delivery_id number :=152497;
--p_order_num number :=63005548;

begin


fnd_global.apps_initialize(1057,50212,660);
WSH_PICKING_BATCHES_PKG.Insert_Row(
X_Rowid => l_Rowid,
X_Batch_Id => l_batch_id,
P_Creation_Date => sysdate-30,
P_Created_By => p_userid,
P_Last_Update_Date => sysdate,
P_Last_Updated_By => p_userid,
P_Last_Update_Login => null,
X_Name => l_name,
P_Backorders_Only_Flag => 'I',
P_Document_Set_Id => null,
P_Existing_Rsvs_Only_Flag => 'N',
P_Shipment_Priority_Code=> null,
P_Ship_Method_Code => null,
P_Customer_Id => l_Customer_Id,
P_Order_Header_Id => l_Order_Header_Id,
P_Ship_Set_Number => l_Ship_Set_ID,
P_Inventory_Item_Id => l_Inventory_Item_Id,
P_Order_Type_Id => l_Order_Type_Id,
P_From_Requested_Date => null,
P_To_Requested_Date => null,
P_From_Scheduled_Ship_Date => null,
P_To_Scheduled_Ship_Date => null,
P_Ship_To_Location_Id => null,
P_Ship_From_Location_Id => null,
P_Trip_Id => null,
P_Delivery_Id => p_Delivery_id,
P_Include_Planned_Lines => 'N',
P_Pick_Grouping_Rule_Id => l_pick_grouping_rule_id,
P_pick_sequence_rule_id => l_pick_sequence_rule_id,
P_Autocreate_Delivery_Flag => 'N',
P_Attribute_Category => null,
P_Attribute1 => null,
P_Attribute2 => null,
P_Attribute3 => null,
P_Attribute4 => null,
P_Attribute5 => null,
P_Attribute6 => null,
P_Attribute7 => null,
P_Attribute8 => null,
P_Attribute9 => null,
P_Attribute10 => null,
P_Attribute11 => null,
P_Attribute12 => null,
P_Attribute13 => null,
P_Attribute14 => null,
P_Attribute15 => null,
P_Autodetail_Pr_Flag => 'Y',
P_Carrier_Id => null,
P_Trip_Stop_Id => null,
P_Default_stage_subinventory => p_Pick_to_Subinventory,
P_Default_stage_locator_id => null,
P_Pick_from_subinventory => p_Pick_From_Subinventory,
P_Pick_from_locator_id => null,
P_Auto_pick_confirm_flag => 'Y' ,
P_Delivery_Detail_Id =>null,
P_Project_Id => null,
P_Task_Id => null,
P_Organization_Id => l_Organization_Id);

l_request_id := WSH_PICKING_BATCHES_PKG.Submit_Release_Request(l_BATCH_ID,null);
dbms_output.put_line(l_request_id);
end;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/132092/viewspace-968155/,如需轉載,請註明出處,否則將追究法律責任。

相關文章