Thursday, 24 April 2025

Item Update API in Oracle APPs R12

 /*API to Update Segment1 of Item Code In oracle APPs R12*/

DECLARE
    l_item_tbl_typ      ego_item_pub.item_tbl_type;
    x_item_table        ego_item_pub.item_tbl_type;
    x_inventory_item_id mtl_system_items_b.inventory_item_id%TYPE;
    x_organization_id   mtl_system_items_b.organization_id%TYPE;
    x_return_status     VARCHAR2 (1);
    x_msg_count         NUMBER (10);
    x_msg_data          VARCHAR2 (1000);
    x_message_list      error_handler.error_tbl_type;
    CURSOR c1 IS
      SELECT MSI.inventory_item_id,
             MSI.organization_id,
             MSI.last_update_date,
             msi.segment1 ITEM_CODE,
             msi.description
      FROM   mtl_system_items_b msi
      WHERE  1 = 1
             AND msi.segment1 LIKE 'DG SYNC%%ETHERNET%' --11317029,11317030
      --and msi.organization_id=395
      ;
BEGIN
    FOR i IN c1 LOOP
        fnd_global.Apps_initialize(user_id => 0, resp_id => 50916,
        resp_appl_id => 401);

        L_item_tbl_typ (1).transaction_type := 'UPDATE';
        -- Replace this with 'UPDATE' for update transaction.

        L_item_tbl_typ (1).inventory_item_id := i.inventory_item_id;

        L_item_tbl_typ (1).organization_id := i.organization_id;

        L_item_tbl_typ (1).segment1 := 'DG SYNC RELAY CD5.0 RS485/ETHERNET';

        ego_item_pub.Process_items (p_api_version => 1.0,
        p_init_msg_list => fnd_api.g_true, p_commit => fnd_api.g_true,
        p_item_tbl => l_item_tbl_typ, x_item_tbl => x_item_table,
        x_return_status => x_return_status, x_msg_count => x_msg_count);

        --DBMS_OUTPUT.put_line ('==================================');
        --DBMS_OUTPUT.put_line ('Return Status ==>' || x_return_status);
        IF ( x_return_status = fnd_api.g_ret_sts_success ) THEN
          FOR i IN 1 .. x_item_table.count LOOP
              dbms_output.Put_line ('Inventory Item Id :'
                                    || To_char (X_item_table
                                                (i).inventory_item_id)
                                    ||','
                                    -- ||'Lead Time :'||x_item_table (i).FULL_LEAD_TIME||','
                                    --   ||'SPQ :'||x_item_table (i).FIXED_LOT_MULTIPLIER||','
                                    ||'PLANNER_CODE :'
                                    ||X_item_table (i).planner_code);
          --DBMS_OUTPUT.put_line ('Organization Id   :' || TO_CHAR (x_item_table (i).organization_id));
          END LOOP;
        ELSE
          dbms_output.Put_line ('Error Messages :');

          error_handler.Get_message_list (x_message_list => x_message_list);

          FOR i IN 1 .. x_message_list.count LOOP
              dbms_output.Put_line (X_message_list (i).message_text);
          END LOOP;
        END IF;
    --DBMS_OUTPUT.put_line ('==================================');
    END LOOP;

    COMMIT;
EXCEPTION
    WHEN OTHERS THEN
      dbms_output.Put_line ('Exception Occured :');

      dbms_output.Put_line (SQLCODE
                            || ':'
                            || SQLERRM);

      dbms_output.Put_line ('=====================================');
END; 

Tuesday, 15 April 2025

Oracle APPS R12 APIs

 

Oracle APPS R12 APIs


  1. API To Find Sales Order's Subtotal,discount,charges and Tax (OE_OE_TOTALS_SUMMARY.ORDER_TOTALS)
  2. API for Cancelling the Purchase Order (PO) Document (PO_DOCUMENT_CONTROL_PUB.CONTROL_DOCUMENT)
  3. API for Deleting the category assignment to an item (INV_ITEM_CATEGORY_PUB.DELETE_CATEGORY_ASSIGNMENT)
  4. API for Updating Category Assignment of an item (INV_ITEM_CATEGORY_PUB.UPDATE_CATEGORY_ASSIGNMENT)
  5. API to Book a sales order (OE_ORDER_PUB.PROCESS_ORDER )
  6. API to Cancel a Sales Order (OE_ORDER_PUB.PROCESS_ORDER)
  7. API to Cancel an Order Line (OE_ORDER_PUB.PROCESS_ORDER)
  8. API to Check Existence of an Internal Bank R12 (CE_BANK_PUB.CHECK_BANK_EXIST)
  9. API to Create Item Specific UOM Conversion (INV_CONVERT.CREATE_UOM_CONVERSION)
  10. API to Create a Customer Account for an existing Party TCA R12 (HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCOUNT)
  11. API to Create a Customer Profile TCA R12 (HZ_CUSTOMER_PROFILE_V2PUB.CREATE_CUSTOMER_PROFILE)
  12. API to Create a Customer Site TCA R12 (HZ_CUST_ACCOUNT_SITE_V2PUB.CREATE_CUST_ACCT_SITE)
  13. API to Create a Customer Site Use TCA R12 (HZ_CUST_ACCOUNT_SITE_V2PUB.CREATE_CUST_SITE_USE)
  14. API to Create a Party Site TCA R12 (HZ_PARTY_SITE_V2PUB.CREATE_PARTY_SITE)
  15. API to Create a Party Site Use TCA R12 (HZ_PARTY_SITE_V2PUB.CREATE_PARTY_SITE_USE)
  16. API to Create a Phone Number (Contacts) TCA R12 (HZ_CONTACT_POINT_V2PUB.CREATE_CONTACT_POINT)
  17. API to Create an Internal Bank Account in R12 CE_BANK_PUB.CREATE_BANK_ACCT
  18. API to Create an Internal Bank Branch R12 (CE_BANK_PUB.CREATE_BANK_BRANCH)
  19. API to Delete a Sales Order (OE_ORDER_PUB.PROCESS_ORDER )
  20. API to Delete an Order Line (OE_ORDER_PUB.PROCESS_ORDER)
  21. API to End Date an Internal Bank Branch in R12 - CE_BANK_PUB.SET_BANK_BRANCH_END_DATE
  22. API to End Date an Internal Bank in R12 - CE_BANK_PUB.SET_BANK_END_DATE
  23. API to Update Customer Address in Oracle TCA R12 (HZ_LOCATION_V2PUB.UPDATE_LOCATION)
  24. API to Update Oracle Applications Password (fnd_user_pkg.updateuser)
  25. API to Update Purchase Order Document (PO) (PO_CHANGE_API1_S.UPDATE_PO)
  26. API to Update a Customer Account TCA R12 (HZ_CUST_ACCOUNT_V2PUB.UPDATE_CUST_ACCOUNT)
  27. API to Update an Internal Bank Branch R12 (CE_BANK_PUB.UPDATE_BANK_BRANCH)
  28. API to Update an Internal Bank in R12 (CE_BANK_PUB.UPDATE_BANK)
  29. API to apply hold on AP invoice in R12 (AP_HOLDS_PKG.INSERT_SINGLE_HOLD)
  30. API to cancel single AP invoice (AP_CANCEL_PKG.AP_CANCEL_SINGLE_INVOICE)
  31. API to confirm on Order Header Status (OE_HEADER_STATUS_PUB)
  32. API to confirm on Order Line Status (OE_LINE_STATUS_PUB)
  33. API to create Group in TCA R12 (HZ_PARTY_V2PUB.CREATE_GROUP)
  34. API to create Party and Customer Account in R12 (HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCOUNT)
  35. API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCOUNT)
  36. API to create customer Addresses in TCA R12 (HZ_LOCATION_V2PUB.CREATE_LOCATION)
  37. API to find AP INVOICE Status (AP_INVOICES_PKG.GET_APPROVAL_STATUS)
  38. API to get combination id based on segment info (FND_FLEX_EXT.GET_COMBINATION_ID)
  39. API to get open sales order quantity in oracle apps (OE_LINE_UTIL.GET_OPEN_QUANTITY)
  40. API to get the concatenated segment values for a code combination id (FND_FLEX_EXT.GET_SEGS)
  41. API to get the formatted contact details of a Party in oracle apps R12 (HZ_FORMAT_PHONE_V2PUB.PHONE_DISPLAY)
  42. API to get the segment delimiter for the specified key flex field structure (FND_FLEX_EXT.GET_DELIMITER)
  43. API to populate loc_id HZ_LOCATIONS R12 (HZ_TAX_ASSIGNMENT_V2PUB. CREATE_LOC_ASSIGNMENT )
  44. API to populate the Descriptive element Value of an item ( inv_item_catalog_elem_pub.process_item_descr_elements)
  45. API to release hold on AP invoice in R12 (AP_HOLDS_PKG.RELEASE_SINGLE_HOLD)
  46. API to update AR Invoice Printing Details in R12 AR_INVOICE_SQL_FUNC_PUB
  47. API to update AR Receipt in oracle apps R12 - AR_RECEIPT_UPDATE_API_PUB (UNIDENTIFIED to UNAPPLIED)
  48. API to update a Customer Account Relationship TCA R12 (HZ_CUST_ACCOUNT_V2PUB.UPDATE_CUST_ACCT_RELATE)
  49. API to update a Customer Profile TCA R12 (HZ_CUSTOMER_PROFILE_V2PUB.UPDATE_CUSTOMER_PROFILE)
  50. API to update an Internal Bank Account in Oracle Apps R12 (CE_BANK_PUB.UPDATE_BANK_ACCT)
  51. AR: Reversal of Receipt through API (ar_receipt_api_pub.REVERSE)
  52. AR: Unapplication of a Credit Memo through API (ar_cm_api_pub.unapply_on_account)
  53. AR_INVOICE_API_PUB.create_single_invoice
  54. AR_RECEIPT_API_PUB - Script to Create and Apply on account a AR Receipt
  55. AR_RECEIPT_API_PUB.Apply_on_account ( Script to apply a receipt on account )
  56. AR_RECEIPT_API_PUB.CREATE_MISC - R12 - Create Miscellaneous Cash Receipt in Oracle Apps
  57. AR_RECEIPT_API_PUB.Unapply_on_account ( Script to unapply on account a Receipt in R12)
  58. Add New Line to Existing Order Using the API (OE_ORDER_PUB.PROCESS_ORDER)
  59. Ar_receipt_api_pub.Apply
  60. Ar_receipt_api_pub.Create_and_apply
  61. Ar_receipt_api_pub.Create_cash
  62. Ar_receipt_api_pub.Unapply
  63. Assign Delivery Details to a Delivery through API ( WSH_DELIVERY_DETAILS_PUB.DETAIL_TO_DELIVERY )
  64. Assigning Category set to Category via API in Oracle Apps (INV_ITEM_CATEGORY_PUB.CREATE_VALID_CATEGORY)
  65. Assigning category to an Item using API (INV_ITEM_CATEGORY_PUB.CREATE_CATEGORY_ASSIGNMENT)
  66. Autocreate Deliveries Through API WSH_DELIVERY_DETAILS_PUB.AUTOCREATE_DELIVERIES
  67. CASH MANAGEMENT API'S (CE_BANK_PUB) IN ORACLE APPS R12
  68. CE_BANK_PUB.CHECK_BRANCH_EXISTS - API to check existence of an Internal Bank Branch in R12
  69. CE_BANK_PUB.CREATE_BANK API to Create an Internal Bank in R12
  70. CE_BANK_PUB.UPDATE_BANK_BRANCH API to Update an Internal Bank Branch R12
  71. Create Credit Card in Oracle Payments using API (IBY_FNDCPT_SETUP_PUB.CREATE_CARD)
  72. Create Party of type Organization in Oracle TCA using API hz_party_v2pub.create_organization
  73. Create a Customer Account Relationship API HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCT_RELATE
  74. Create and Release Pciking Batch via API (wsh_picking_batches_pub.create_batch and wsh_picking_batches_pub.Release_batch)
  75. Credit Memo Creation via API ( ar_credit_memo_api_pub.create_request )
  76. FND_PROGRAM : Add Concurrent Program to Request Group via API
  77. FND_PROGRAM : Delete Concurrent Program Definition via API
  78. FND_PROGRAM : Delete Concurrent Program Executable via API
  79. FND_PROGRAM : Delete Concurrent Program Parameter via API
  80. FND_PROGRAM : Register Concurrent Program parameters via API
  81. FND_PROGRAM : Register Concurrent Program via API
  82. FND_PROGRAM : Remove Concurrent Program from Request Group via API
  83. FND_PROGRAM : Create Concurrent Executable via API
  84. FND_REQUEST.SUBMIT_REQUEST in R12
  85. FND_USER_PKG.CREATEUSER ( Create Applications User via PLSQL)
  86. GET ONHAND QUANTITIES THROUGH API in Oracle Apps R12 (INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES)
  87. Generation of a LOT number for an Inventory item via API in R12
  88. How to apply invoice in detail against the receipt through api (AR_RECEIPT_API_PUB.Apply_In_Detail)
  89. How to attach documents from backend? ( fnd_webattch.add_attachment )
  90. How to delete a attachment from backend (fnd_attached_documents2_pkg.delete_attachments)
  91. How to do UOM Conversions through api? ( inv_convert.inv_um_convert_new )
  92. How to get the Description of the Item based on Item catalog group using API (invicgds.inv_get_icg_desc)
  93. How to get timezone based on ZIP code? (HZ_TIMEZONE_PUB.GET_TIMEZONE_ID)
  94. How to set context and profile values from backend in R12 Oracle apps
  95. IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK – R12 – API to Create External Bank
  96. IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK_ACCT – R12 – API to Create External Bank Account
  97. IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK_BRANCH – R12 – API to Create External Bank Branch
  98. IMPORT EXTERNAL BANK ACCOUNTS R12 ORACLE APPS
  99. Item Categories Deletion through API in Oracle Apps (INV_ITEM_CATEGORY_PUB.DELETE_CATEGORY)
  100. Item Categories Updation through API in Oracle Apps (INV_ITEM_CATEGORY_PUB.UPDATE_CATEGORY)
  101. Item categories creation through API in Oracle Apps (INV_ITEM_CATEGORY_PUB.CREATE_CATEGORY)
  102. Item categories in oracle apps R12
  103. Item import based on Item template in R12 (insert script)
  104. OE_HOLDS_PUB.APPLY_HOLDS -- Apply Hold Script
  105. OE_HOLDS_PUB.RELEASE_HOLDS -- Release Holds Script
  106. OE_ORDER_PUB.GET_ORDER -- API to collect existing sales order data in R12
  107. OE_ORDER_PUB.PROCESS_ORDER ( Sample Script for R12)
  108. OE_ORDER_PUB.PROCESS_ORDER in Oracle Apps R12
  109. OE_ORDER_PUB.PROCESS_ORDER to Apply hold on a sales order
  110. OE_ORDER_PUB.PROCESS_ORDER to Release a hold on sales order in R12
  111. ORA-01403: no data found in Package AR_RECEIPT_API_PUB Procedure Apply
  112. Picking Batch Creation Through API ( wsh_picking_batches_pub.create_batch)
  113. Price List Import via API (QP_PRICE_LIST_PUB.PROCESS_PRICE_LIST) in R12
  114. Script to Submit Item Import (INCOIN) using FND_REQUEST in Oracle Apps R12
  115. Script to get the Quantity reserved against an sales order line in oracle apps R12 (INV_RESERVATION_PUB.QUERY_RESERVATION_OM_HDR_LINE)
  116. TRADING COMMUNITY ARCHITECTURE (TCA) API’S IN R12 ORACLE APPS
  117. Unassign Delivery Details from Delivery through API ( WSH_DELIVERY_DETAILS_PUB.DETAIL_TO_DELIVERY )
  118. Update Order Header Details Using the API (OE_ORDER_PUB.PROCESS_ORDER)
  119. hz_party_contact_v2pub.create_org_contact - API to create a Contact person for an organization in Oracle TCA

Friday, 11 April 2025

API to repopulate new Tax categories in India GST shipping form of Oracle APPS R12

 /*API to repopulate new Tax categories in India GST shipping form*/

DECLARE
    lv_process_status  VARCHAR2(30);
    lv_process_message VARCHAR2(30);
BEGIN
    FOR c1 IN (SELECT a.*,
                      17305 new_tax_cat_id
               FROM   jai_tax_det_factors a
               WHERE  1 = 1
                      AND a.trx_id = 15562920
                      AND a.application_id = 707) LOOP
        jai_tax_determination_pkg.Override_tax_category_rule(
        pn_tax_rule_id => c1.tax_rule_id,
        pn_tax_category_id => c1.new_tax_cat_id,
        pn_det_factor_id => c1.det_factor_id,
        pv_process_status => lv_process_status,
        pv_process_message => lv_process_message);

        COMMIT;
    END LOOP;

    dbms_output.Put_line('lv_process_status : '||lv_process_status);
EXCEPTION
    WHEN OTHERS THEN
      dbms_output.Put_line('Error : '||SQLERRM);
END; 

Thursday, 10 April 2025

Query to find Total Receive Quantity Against PO In Oracle Apps R12

 /*Query to find Total Receive Quantity Against PO In Oracle Apps R12*/

SELECT ( (SELECT SUM (Nvl (quantity, 0))
          FROM   rcv_transactions rt
          WHERE  rt.po_header_id = p_po_header_id
          AND rt.po_line_id = p_po_line_id
          AND rt.wip_entity_id = p_wip_entity_id
          AND rt.transaction_type = 'RECEIVE') 

         - Nvl ((SELECT SUM (Nvl (quantity, 0))
                 FROM   rcv_transactions rt
                 WHERE  rt.po_header_id p_po_header_id
                 AND rt.po_line_id p_po_line_id
                 AND rt.wip_entity_id = p_wip_entity_id
                 AND rt.transaction_type = 'RETURN TO VENDOR'),0) 

         + Nvl ((SELECT SUM (Nvl (quantity, 0))
                 FROM   rcv_transactions rt
                 WHERE  rt.po_header_id = p_po_header_id
                 AND rt.po_line_id = p_po_line_id
                 AND rt.wip_entity_id = p_wip_entity_id
                 AND rt.transaction_type = 'CORRECT'
                 AND EXISTS (SELECT 1
                             FROM   rcv_transactions rt2
                             WHERE  rt2.po_header_id p_po_header_id
                             AND rt2.po_line_id p_po_line_id
                             AND rt.wip_entity_id p_wip_entity_id
                             AND rt2.transaction_type 'RECEIVE'
                             AND rt2.transaction_id rt.parent_transaction_id)),0) )
       qty
FROM   dual;