1.
INSERT INTO apps.bom_inventory_comps_interface
(component_sequence_id,
wip_supply_type,
process_flag,
transaction_type,
batch_id)
SELECT component_sequence_id,
6,
1,
'UPDATE',
-1
FROM bom_inventory_components
WHERE .... (通常有條件)
2. 送出請求
DECLARE
vOrganizationId NUMBER := 00;
vBatchId NUMBER := -1;
vDescriptionOfRequest VARCHAR2(200) := 'Mass Update';
vRequestId NUMBER;
BEGIN
fnd_global.apps_initialize(00, 00, 702);
vRequestId := apps.fnd_request.submit_request ('BOM', -- applicaiton short name
'BMCOIN', -- concurrent program short name
vDescriptionOfRequest, -- description of the request
'', --request start running time
false, -- sub_request
vOrganizationId, -- from here, are the bmcoin parameters. organization id
1, --all org flag (1:yes / 2:no)
2, --import routings (1:yes / 2 :no)
1, --import bills of material (1:yes / 2:no)
1, --delete processed rows (1:yes / 2:no)
vBatchId --batch id
);
dbms_output.put_line(vRequestId);
END;
沒有留言:
張貼留言