Sunteți pe pagina 1din 4

http://bharatoracleappstechnical.blogspot.com/2013/09/requisition-import-and-poaoutocreation.

html

SELECT frt.responsibility_name, frg.request_group_name,


frgu.request_unit_type,frgu.request_unit_id,
fcpt.user_concurrent_program_name
FROM fnd_Responsibility fr, fnd_responsibility_tl frt,
fnd_request_groups frg, fnd_request_group_units frgu,
fnd_concurrent_programs_tl fcpt
WHERE frt.responsibility_id = fr.responsibility_id
AND frg.request_group_id = fr.request_group_id
AND frgu.request_group_id = frg.request_group_id
AND fcpt.concurrent_program_id = frgu.request_unit_id
AND frt.LANGUAGE = USERENV('LANG')
AND fcpt.LANGUAGE = USERENV('LANG')
AND fcpt.user_concurrent_program_name = :conc_prg_name
ORDER BY 1,2,3,4

121- operating unit


181 org id
--------------------------------------------------------------------------INSERT INTO PO_REQUISITIONS_INTERFACE_ALL
(batch_id
,TRANSACTION_ID
,interface_source_code
,source_type_code
,requisition_type
,destination_type_code
,item_id
,item_description
,quantity
,authorization_status
,preparer_id
,category_id
,uom_code
,destination_organization_id
,destination_subinventory
,deliver_to_location_id
,deliver_to_requestor_id
,charge_account_id
,need_by_date
,org_id
,unit_price
,autosource_flag
,suggested_vendor_id
,suggested_vendor_site_id
,gl_date
)
values
(100
--batch_id
,PO_REQUISITIONS_INTERFACE_S.nextval --TRANSACTION_ID

,'FUTURE'
--interface_source_code
,'VENDOR'
--source_type_code
,'PURCHASE'
--requisition_type
,'EXPENSE'
--destination_type_code
,null
--item_id
,'Test Import Req R12'
--item_description
,10
--quantity
,'INCOMPLETE'
--authorization_status
,84
--preparer_id
,3128
--category_id
,'EA'
--uom_code
,181
--destination_organization_id
,null
--destination_subinventory
,242
--deliver_to_location_id
,84
--deliver_to_requestor_id
,11007
--charge_account_id
,sysdate
--need_by_date
,121
--org_id
,100
--unit_price
,NULL
--autosource_flag
,7410
--suggested_vendor_id
,7351
--suggested_vendor_site_id
,sysdate
--gl_date
);

select * from po_interface_errors


where trunc(last_update_date)=trunc(sysdate)

delete po_interface_errors
where interface_type='REQIMPORT'
select * from PO_REQUISITIONS_INTERFACE_ALL
delete PO_REQUISITIONS_INTERFACE_ALL
where transaction_id=5
========================================================
INSERT INTO PO_REQUISITIONS_INTERFACE_ALL
(batch_id
,TRANSACTION_ID
,interface_source_code
,source_type_code
,requisition_type
,destination_type_code
,item_id
,item_description
,quantity
,authorization_status
,preparer_id
,category_id
,uom_code
,destination_organization_id
,destination_subinventory

,deliver_to_location_id
,deliver_to_requestor_id
,charge_account_id
,need_by_date
,org_id
,unit_price
,autosource_flag
,suggested_vendor_id
,suggested_vendor_site_id
,gl_date
)
values
(100
--batch_id
,PO_REQUISITIONS_INTERFACE_S.nextval --TRANSACTION_ID
,'FUTURE'
--interface_source_code
,'VENDOR'
--source_type_code
,'PURCHASE'
--requisition_type
,'EXPENSE'
--destination_type_code
,null
--item_id
,'Test WF FYI Trigger Ben and shoaib'
--item_description
,10
--quantity(1)
,'APPROVED'
--authorization_status
,84
--preparer_id
,3128
--category_id
,'EA'
--uom_code
,181
--destination_organization_id fix(Check for live
)
,null
,242

--destination_subinventory
--deliver_to_location_id (department- Inv locati

on)
,84
,11007
,sysdate
,121
,100
,NULL
,7410
,7351
,sysdate
);

--deliver_to_requestor_id (employee_name)
--charge_account_id
--need_by_date
--org_id fix
--unit_price = 0
--autosource_flag
--suggested_vendor_id - null
--suggested_vendor_site_id - null
--gl_date (Business trip approve date)

select * from po_interface_errors


where trunc(last_update_date)=trunc(sysdate)

delete po_interface_errors
where interface_type='REQIMPORT'
select * from PO_REQUISITIONS_INTERFACE_ALL
delete PO_REQUISITIONS_INTERFACE_ALL
where transaction_id=2004
select * from po_requisition_headers_all

order by 1 desc
drop trigger apps.xxreq_fyi_trg
create or replace trigger xxreq_fyi_trg
after insert on PO.po_requisition_headers_all
--REFERENCING NEW AS NEW OLD AS OLD
for each row
when (new.authorization_status = 'APPROVED' and new.request_id is not null)
declare
PRAGMA AUTONOMOUS_TRANSACTION;
begin
XXsgrf_WF_NOTIF_REQFYI;
--(:new.empno, :new.ename);
end;

S-ar putea să vă placă și