Posts

Showing posts from April, 2018

Graph Setting in Oracle Report Builder

<rw:graph id="CT_1" src="G_DATE" groups="PDATE" dataValues="CF_WT_AVG_EFFPerG_DATE"> <!-- <?xml version="1.0" ?> <Graph version="3.2.0.22" markerTooltipType="MTT_NONE" markerDisplayed="false" graphType="LINE_VERT_ABS"> <LegendArea visible="false"/> <MarkerText visible="true"> <GraphFont fontColor="#99"/> </MarkerText> <O1TickLabel tickLabelSkipMode="TLS_NOSKIP"/> <PlotArea borderColor="#0" borderTransparent="false"/> <SeriesItems> <Series id="0" color="#0"/> </SeriesItems> <Title text="Efficiency %" visible="true"> <GraphFont size="14" fontColor="#0" underline="true"/> </Title> <Y1Axis scaledLogarithmic="false" logarithmicBase="2.0" axisAut

API To Create Journal Voucher in oracle

/* Formatted on 2018/04/06 16:45 (Formatter Plus v4.8.8) */ /*CREATE OR REPLACE PROCEDURE ge_pro30 (errbuf OUT VARCHAR2, retcode OUT VARCHAR2) IS*/    -- cursor declaration DECLARE   CURSOR gl_cur    IS     /* Formatted on 2018/04/09 16:00 (Formatter Plus v4.8.8) */ SELECT   TO_CHAR (com_det.sob) set_of_books_id,          SUM (com_det.amount_sale) entered, com_ac.entered_dr,          com_ac.entered_cr, com_ac.accounted_dr, com_ac.accounted_cr,          com_det.currency, 'Adjustment' CATEGORY, 14654 created_by,          NULL GROUP_ID, com_ac.segment1, com_ac.segment2, com_ac.segment3,          com_ac.segment4, com_ac.segment5, com_ac.segment6, com_ac.segment7,          com_ac.segment8, 'User' curr_conversion, 'Manual' SOURCE,          'A' actual_flag, date_to date_created,          Date_to accounting_date, 'NEW' status, com_ac.agent_id,          com_hd.ac_id,          stm_cust.cust_agent_invoice_con (com_hd.ac_id, agent_id) invo

API To update Oracle Items

/* Formatted on 2018/04/23 12:05 (Formatter Plus v4.8.8) */ DECLARE    v_po_qty              NUMBER;    v_so_qty              NUMBER;    v_oh_qty              NUMBER;    b_has_backlog         BOOLEAN;    v_po_number           VARCHAR2 (40);    v_po_line_num         VARCHAR2 (40);    v_so_order_number     VARCHAR2 (40);    v_so_ine_number       VARCHAR2 (40);    v_subinventory_code   VARCHAR2 (40);    x_inventory_item_id   NUMBER;    x_organization_id     NUMBER;    x_return_status       VARCHAR2 (3000);    x_msg_count           NUMBER;    x_msg_data            VARCHAR2 (4000); BEGIN    DBMS_OUTPUT.put_line (   'Organization ID'                          || ','                          || 'Item Number'                          || ','                          || 'PO'                          || ','                          || 'SO'                          || ','                          || 'ONHAND

API Procedure to inactive Items in oracle apps

--API to update the item status. /**** STEP 1) Insert data into pending interface table ****/ insert into mtl_pending_item_status           (inventory_item_id,           organization_id,           status_code,           effective_date,           implemented_date,           pending_flag,           last_update_date,           last_updated_by,           creation_date,           created_by)      values(          6760202,   -- Item Segment           114,   -- Organization Id           'Inactive',  -- status           sysdate,           sysdate,           'Y',           sysdate,           14654,           sysdate,           14654); /**** STEP 2) Call below API code to do the actual change ****/ declare  x_return_status VARCHAR2(100);  x_msg_count  NUMBER;  x_msg_data  VARCHAR2(1000); begin          inv_item_status_pub.Update_Pending_Status (                      p_api_version  => 1.0                     ,p_Org_Id   => 114  -- Organi

Query API to inactive Oracle Customer Sites

DECLARE CURSOR C IS select  CDC.CUSTOMER_ID,CDC.CUSTOMER_NAME,HCASA.* from stm_cust.CUST_DEACTIVE_CUST cdc,apps.hz_cust_accounts hca,apps.hz_cust_acct_sites_all hcasa where cdc.customer_id = hca.cust_Account_id and hca.cust_Account_id = hcasa.cust_Account_id AND HCASA.STATUS = 'A' and hcasa.org_id = 113 ORDER BY CUST_aCCT_SITE_ID; BEGIN FOR I IN C LOOP UPDATE apps.hz_cust_acct_sites_all SET STATUS = 'I' WHERE CUST_aCCT_SITE_ID = I.CUST_ACCT_SITE_ID AND ORG_ID = 113 AND CUST_ACCOUNT_ID = I.CUST_ACCOUNT_ID; COMMIT; END LOOP; END;

Workflow Important Tables

apps.WF_ITEM_TYPES apps.WF_ITEM_ATTRIBUTES APPS.WF_ACTIVITIES apps.WF_ACTIVITY_ATTRIBUTES apps.WF_MESSAGES apps.WF_MESSAGE_ATTRIBUTES apps.WF_NOTIFICATIONS apps.WF_NOTIFICATION_ATTRIBUTES apps.WF_ITEMS SELECT STA.ITEM_TYPE                ITEM_TYPE       ,  STA.ACTIVITY_RESULT_CODE     RESULT       ,  PRA.PROCESS_NAME ||':'||              PRA.INSTANCE_LABEL       PROCESS_ACTIVITY_LABEL       ,  STA.PROCESS_ACTIVITY         INSTANCE_ID       ,  STA.ITEM_KEY                 ITEM_KEY, STA.ACTIVITY_RESULT_CODE, STA.ERROR_MESSAGE, STA.ACTIVITY_STATUS, STA.BEGIN_DATE, STA.*  FROM  apps.WF_ITEM_ACTIVITY_STATUSES  STA       , apps.WF_PROCESS_ACTIVITIES      PRA  WHERE STA.ACTIVITY_STATUS     = 'ERROR'    AND STA.PROCESS_ACTIVITY    = PRA.INSTANCE_ID    AND STA.ITEM_TYPE           = 'DA_APP_5'--ITEM_TYPE_SELECTED    --AND STA.PROCESS_ACTIVITY    = ERRANT_INSTANCE_ID

API to close Oracle Sale Order (Order Management)

DECLARE v_api_version_number           NUMBER  := 1; v_return_status                VARCHAR2 (2000); v_msg_count                    NUMBER; v_msg_data                     VARCHAR2 (2000); -- IN Variables -- v_header_rec                   oe_order_pub.header_rec_type; v_line_tbl                     oe_order_pub.line_tbl_type; v_action_request_tbl           oe_order_pub.request_tbl_type; v_line_adj_tbl                 oe_order_pub.line_adj_tbl_type; -- OUT Variables -- v_header_rec_out               oe_order_pub.header_rec_type; v_header_val_rec_out           oe_order_pub.header_val_rec_type; v_header_adj_tbl_out           oe_order_pub.header_adj_tbl_type; v_header_adj_val_tbl_out       oe_order_pub.header_adj_val_tbl_type; v_header_price_att_tbl_out     oe_order_pub.header_price_att_tbl_type; v_header_adj_att_tbl_out       oe_order_pub.header_adj_att_tbl_type; v_header_adj_assoc_tbl_out     oe_order_pub.header_adj_assoc_tbl_type; v_header_scredit_tbl_out       oe_or

API to create Oracle Items Category Missing Combinations

/* Formatted on 12/7/2016 1:32:27 PM (QP5 v5.115.810.9015) */ declare l_category_rec INV_ITEM_CATEGORY_PUB.CATEGORY_REC_TYPE; l_return_status   VARCHAR2(80); l_error_code      VARCHAR2(100); l_msg_count       NUMBER; l_msg_data        VARCHAR2(80); l_out_category_id NUMBER; CURSOR c_cat IS select  * from stm_cust.MISSING_CAT_SEG ; begin FOR lc_cat IN c_cat LOOP l_category_rec := NULL; l_category_rec.structure_id := 51114; --l_category_rec.structure_code := g_cat_flex_code; l_category_rec.summary_flag := 'N'; l_category_rec.enabled_flag := 'Y'; l_category_rec.segment1 := lc_cat.segment1; l_category_rec.segment2 := lc_cat.segment2; l_category_rec.description := lc_Cat.des; --l_category_rec.segment3 := lc_cat.segment3; --l_category_rec.segment4 := lc_cat.segment4; -- -- After the category record is loaded, then call the create_category api to -- create the new mtl_categories record. Inv_Item_Category_Pub.Create_Category(p_api_version => 1.0,