Skip to main content

Posts

Submit & Monitor Concurrent Programs Through Self-Service (OAF) Pages

We typically use the Standard Request Submission (SRS) form to submit and monitor concurrent programs. However, there is an alternative approach to using Self-Service Pages for these tasks. With Self-Service Pages, users can initiate and monitor programs through a web interface, eliminating the need for access to Oracle.   Using a Form Function , we can call the standard Concurrent Program Submission region to access a specific Concurrent Program Submission Page.   Define Function: Navigation:  System Administrator -> Application -> Function Properties:  SSWA jsp function Web HTML Call: To submit any concurrent program:   OA.jsp?akRegionApplicationId=0&akRegionCode=FNDCPPROGRAMPAGE&scheduleRegion=Hide&notifyRegion=Hide&printRegion=Hide   To Submit Particular Concurrent Program   OA.jsp?akRegionApplicationId=0&akRegionCode=FNDCPPROGRAMPAGE&programApplName=XXCUST&programName=XXSALES_...

Identify the line number where an exception was thrown

To identify the line number where an exception was thrown in PL/SQL, you can use the  DBMS_UTILITY.FORMAT_ERROR_BACKTRACE  function. This function provides a backtrace that includes the line number(s) in the PL/SQL block, procedure, or function where the error occurred, making it easier to pinpoint the location of the problem. EXCEPTION WHEN OTHERS THEN  DBMS_OUTPUT.PUT_LINE('Error Message: ' || SQLERRM);  END; Output: ORA-06502: PL/SQL: numeric or value error: character string buffer too small The above Example will throw the Erro r "ORA-06502: PL/SQL: numeric or value error: character string buffer too small" but we cannot find which line causing the issue without debugging the entire program. Here We can use DBMS_UTILITY.FORMAT_ERROR_BACKTRACE to identify the line number of the code which causing the issue. EXCEPTION WHEN OTHERS THEN...

Applying AR Credit Memo to AR Invoice using AR_CM_API_PUB.APPLY_ON_ACCOUNT

  In Oracle Apps R12, the process of applying on-account credits to customer invoices can be complex. Oracle provides the AR_CM_API_PUB.APPLY_ON_ACCOUNT API to facilitate this process. This API is particularly useful when there is a need for programmatic application of credit memos (CM) to invoices. API: AR_CM_API_PUB.APPLY_ON_ACCOUNT API Staging Table Design: CREATE TABLE XX_AR_CM_STG (    TRANSACTION_ID      NUMBER,     OPERATING_UNIT    VARCHAR2(240),    ORG_ID    NUMBER,     CM_NUMBER           VARCHAR2(50),  -- Credit Memo Number    INVOICE_NUMBER      VARCHAR2(50),  -- Invoice Number    APPLIED_AMOUNT      NUMBER,  -- Amount to be applied    APPLIED_DATE    DATE,    CT_REFERENCE    VARCHAR2(240),    CUSTOMER_NUMBER     VARC...

LDT Commands in Oracle Apps

 Oracle Applications (Oracle E-Business Suite) use Loader Data files (LDT files) for migrating application configurations and data between instances. What are LDT Files? LDT files are plain text files used by the FNDLOAD utility in Oracle E-Business Suite to upload or download data from the database. They are commonly used for migrating setups, such as concurrent programs, value sets, and lookups, across different environments. LDT Commands: 1.        Download Data to LDT File FNDLOAD apps/apps_pwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct output_file.ldt FND_PROGRAM APPLICATION_SHORT_NAME="Application_Short_Name" CONCURRENT_PROGRAM_NAME="Program_Name" 2.        Upload Data from LDT File FNDLOAD apps/apps_pwd 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct input_file.ldt Key Parameters apps/apps_pwd : The username and password for the Oracle Apps database. 0 Y...

How to Display Active URLs from XML Output in an RTF Template

  Adding Hyperlink (URL) to XML Publisher   When working with XML output, you might encounter fields that contain URL data. In many cases, it's not enough to simply display these URLs as plain text; you need to make them active links that users can click. Below will show you process of converting a URL field into an active hyperlink within an RTF (Rich Text Format) template, specifically for the field "CF_COURIER_URL". We the column name is " CF_COURIER_URL" which contains the active url. Create a form field in RTF for CF_COURIER_URL Edit the form field and use the below command   <?if@inlines: CF_COURIER_URL!='N/A'?><fo:basic-link external-destination="{.//CF_COURIER_URL}"   color="blue" text-decoration="underline">External Url</fo:basic-link><?end if?>   Output:

Query to Get Current Onhand Qty & Cost of Inventory Items

On-hand quantity represents the actual quantity of an item available in inventory at a specific location and point in time. SELECT     ood.organization_id,     ood.organization_code,     msi.inventory_item_id,     msi.segment1 item_code,     msi.description,     msi.primary_uom_code,     msi.creation_date item_creation_date,     nvl(SUM(moq.primary_transaction_quantity),0) onhand_qty,     (         SELECT             item_cost         FROM             cst_item_costs cst         WHERE                 cst.cost_type_id = 2             AND msi.inventory_item_id = cst.inventory_item_id             AND ood.organization_id = cst.organization_id     )        ...

Vendor Site Update API

 Sample API to update supplier site liability account DECLARE    lc_return_status       varchar2 (2000);    ln_msg_count           number;    ll_msg_data            long;    ln_vendor_id           number;    ln_vendor_site_id      number;    ln_message_int         number;    ln_party_id            number;    lrec_vendor_site_rec   ap_vendor_pub_pkg.r_vendor_site_rec_type;    CURSOR c_vendorsites    IS       SELECT   xv.vendor_id,                vendor_site_id,                xv.VENDOR_NO,                xv.SITE_NO         FROM  ...

Query to Get Item Onhand Quantity as on date

Item On-Hand Quantity For A Specific Date  SELECT   qslt.organization_id, qslt.inventory_item_id, as_of_date_on_hand   FROM   (  SELECT   organization_id,                      inventory_item_id,                      SUM (qty) AS as_of_date_on_hand               FROM   (  SELECT   organization_id,                                  inventory_item_id,                                  SUM (transaction_quantity) qty                           FROM   mtl_onhand_quantities_detail                   ...

Uninvoiced Receipts Query Oracle r12

Uninvoiced Receipts: SELECT   pha.segment1 po_number,          TO_CHAR (pha.creation_date, 'DD-MON-RRRR') po_date,          (SELECT   vendor_name             FROM   ap_suppliers ap            WHERE   ap.vendor_id = pha.vendor_id)             supplier_name,          pla.quantity,          pla.unit_price,          pla.quantity * pla.unit_price AS line_amount,          (SELECT   concatenated_segments             FROM   gl_code_combinations_kfv gcc            WHERE   gcc.code_combination_id = pda.code_combination_id)             charge_account,          rsh...

SQLCODE & SQLERRM Function

The SQLCODE function returns the error number associated with the most recently raised error exception. This function should only be used within the Exception Handling section of your code. The SQLERRM function returns the error message associated with the most recently raised error exception. This function should only be used within the Exception Handling section of your code. You could use the SQLCODE & SQLERRM  function to raise an error as follows: EXCEPTION WHEN OTHERS THEN raise_application_error(-20001,'Error - '||SQLCODE||' -ERROR- '||SQLERRM); END; Or you could log the error to a table using the SQLCODE & SQLERRM function as follows: EXCEPTION WHEN OTHERS THEN ERR_CODE := SQLCODE; ERR_MSG := SUBSTR(SQLERRM, 1, 200); INSERT INTO XXERROR_TABLE (ERROR_CODE, ERROR_MSG) VALUES (ERR_CODE, ERR_MSG); END;

Delete a Concurrent Program in Oracle apps

Through the Application front end, we cannot delete a concurrent program, You can either enable or disable a concurrent program. But from the backend, we can delete it using fnd_program. begin fnd_program.delete_program('PROGRAM_SHORT_NAME','Application Name'); fnd_program.delete_executable('EXECUTABLE_SHORT_NAME','Application Name'); end;

Matching Approval Level In Supplier Table

That one field is actually controlled by the interaction of two columns, AP_SUPPLIERS . Receipt_Required_Flag and AP_SUPPLIERS . Inspection_Required_Flag . If both columns are NULL or "N", that is 2-Way matching. If AP_SUPPLIERS.Receipt_Required_Flag is "Y" and AP_SUPPLIERS.Inspection_Required_Flag is NULL or "N", that is 3-Way matching. If both columns are "Y", that is 4-Way matching. AP_SUPPLIERS.Receipt_Required_Flag = NULL or "N" and AP_SUPPLIERS.Inspection_Required_Flag = "Y" is undefined. This SQL can be used ... SELECT DECODE (NVL(APS.receipt_required_flag, 'N'),                'Y', DECODE(NVL(APS.inspection_required_flag, 'N'),                            'Y', '4-Way',                            '3-Way'),                 '2-Way') matching_Level ...

Barcode Report in XML Publisher

XML Publisher 5.6 has a new tab: Administration. This replaces the xdo.cfg configuration file. Now fonts can be uploaded and stored in the database instead of stored on the file system. Under the Administration tab are sub tabs: Configuration, Font Mappings and Font Files and Currencies. Download 3of9-barcode font. To install a font requires only a few steps. Font Family is the exact same name you see in Word under Fonts. If you don't use the same name the font will not be picked up at run time. Log in as XML Publisher Administrator. Navigate to Administration->Font Files->Create Font File Fields are Font Name and File. Fields are Font Name and File. For Font Name choose any descriptive name like below. Navigate to Font Mappings->Create Font Mapping Set Mapping name is the name you will give to a set of fonts. Mapping code is the internal name you will give...

Data With Arabic Characters In XML Format

Issue: "The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- An invalid character was found in text content. Error processing resource 'http://4i.test.com:8000/OA_CGI/FNDWRR..." In the source code of the XML (View > Source) for the Arabic characters you found the following junk characters : "<FILE_DATA>¿¿¿ ¿¿ ¿¿ ¿¿ ¿¿ ¿¿¿¿¿·¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿ ¿¿¿¿ ¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿ </FILE_DATA>" which can not be interpreted by XML parser. Solution: The issue will be resolved with the following settings: 1. Uncheck the "Allow Native Client Encoding" from the System Administrator > Install > Viewer Options  for the XML text/xml mime type 2. Set the profile option  "FND:Native Client Encoding" to WE8MSWIN1252. 3. Change the prolog value to <?xml ...

API to Create & Update Price Adjustment and Order Lines

Important Tables: select header_id from oe_order_headers_all; select line_id from oe_order_lines_all; select list_header_id from qp_list_headers_all; select list_line_id from qp_list_lines; CREATE OR REPLACE PROCEDURE apps.xxapply_discount (p_header_id number) IS    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   ...