發表文章

目前顯示的是 4月, 2018的文章

cancel PO by api & temp table

-- maintain temp table data  delete from sncus.phil_test_temp01 ; select * from sncus.phil_test_temp01 for update; -- check data SELECT a.segment1           po_num           ,b.line_num           po_line_num           ,c.shipment_num       po_shipment_num           ,e.temp1              quot_price           ,b.po_header_id           ,b.po_line_id           ,c.line_location_id           ,b.unit_price         pl_unit_price           ,b.quantity           line_qty           ,d.segment1           ,c.quantity          ...

submit request output eamil to user

declare  l_conc_id     number;  l_boolean     boolean := TRUE;  e_add_del     exception;  e_add_layout  exception;  e_set_option  exception;  e_set_repeat  exception;  begin     -- intialize the apps.    -- fnd_global.apps_initialize (10275, 52373, 222);      fnd_global.apps_initialize (10275, 51953, 222);     -- Adding delivery option to send the request output as email     l_boolean := fnd_request.add_delivery_option                     (type => 'E' -- this one to speciy the delivery option as email                     ,p_argument1 => 'Delivery Option Test' -- subject for the mail                     ,p_argument2 => '100385@senao.com' -- from address   ...

CANCEL PO API

DECLARE l_return_status VARCHAR2 (10); CURSOR C_PO_CANCEL is SELECT pha.po_header_id, pha.org_id, pha.segment1 po_number, pha.type_lookup_code, pha.cancel_flag, pha.closed_code FROM po_headers_all pha WHERE 1=1 AND pha.segment1 = '340777'  AND nvl(pha.closed_code,'OPEN') = 'OPEN' AND nvl(pha.cancel_flag, 'N') = 'N' AND approved_flag = 'Y'; BEGIN fnd_global.apps_initialize (user_id =>10275, resp_id => 20707, resp_appl_id => 201); FOR i IN c_po_cancel LOOP mo_global.init ('PO'); mo_global.set_policy_context ('S',i.org_id ); DBMS_OUTPUT.PUT_LINE ('Calling API PO_DOCUMENT_CONTROL_PUB.CONTROL_DOCUMENT For Cancelling Documents'); po_document_control_pub.control_document (p_api_version => 1.0, -- p_api_version p_init_msg_list => fnd_api.g_true, -- p_init_msg_list p_commit => fnd_api.g_true, -- p_commit x_return_status => l_return_status, -- x_return_status p_doc_ty...

PO Workflow Error Check

1. select * from wf_item_activity_statuses where ITEM_TYPE in ('POAPPRV') and ACTIVITY_STATUS ='&activity_status' order by item_key ACTIVITY_STATUS  ---------------  SUSPEND          COMPLETE         NOTIFIED         ERROR            ACTIVE           WAITING          DEFERRED   PROMPT **** Attribute Values SELECT NAME attr_name,        NVL (text_value,             NVL (TO_CHAR (number_value), TO_CHAR (date_value))            ) VALUE   FROM wf_item_attribute_values  WHERE item_type = UPPER ('&item_type')    AND item_key = NVL ('&item_key', item_key) / --Count of all workflow deferred activities based SELECT   COUNT (1), was.item_type   ...