<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dev Kumar on Medium]]></title>
        <description><![CDATA[Stories by Dev Kumar on Medium]]></description>
        <link>https://medium.com/@dksingh.ops?source=rss-aed5e79be33a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KChbioe40_kR44Acc0ZdsA.png</url>
            <title>Stories by Dev Kumar on Medium</title>
            <link>https://medium.com/@dksingh.ops?source=rss-aed5e79be33a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 04:13:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dksingh.ops/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Extracting Values from XMLType Columns in Oracle SQL]]></title>
            <link>https://medium.com/@dksingh.ops/extracting-values-from-xmltype-columns-in-oracle-sql-6c294a291f25?source=rss-aed5e79be33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c294a291f25</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[oracle-fusion-technical]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Dev Kumar]]></dc:creator>
            <pubDate>Sun, 15 Nov 2026 18:02:06 GMT</pubDate>
            <atom:updated>2026-11-15T18:02:06.242Z</atom:updated>
            <content:encoded><![CDATA[<h4>Storing structured payloads inside an XMLType column is a common pattern in enterprise Oracle databases and Oracle Fusion ERP applications—whether you are working with setup metadata, subledger accounting rules, or custom integration payloads.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9aG-55ngdZT7hVmSl3LEvw.png" /></figure><p>However, when you need to query that XML alongside standard relational columns, choosing the right SQL function matters. Many legacy queries still rely on EXTRACTVALUE and EXTRACT, both of which Oracle has officially <strong>deprecated</strong>.</p><p>In this post, we will break down why those legacy functions fall short and how to cleanly shred XMLType data into relational rows and columns using XMLQUERY and XMLTABLE.</p><h3>The Setup: Sample Table and XMLType Data</h3><p>Suppose we have a warehouses table where specifications are stored in an XMLType column named warehouse_spec:</p><pre>CREATE TABLE warehouses (<br>    warehouse_id   NUMBER,<br>    warehouse_name VARCHAR2(100),<br>    warehouse_spec XMLTYPE<br>)</pre><p>A typical row in warehouse_spec looks like this:</p><pre>&lt;Warehouse&gt;<br>    &lt;Docks&gt;3&lt;/Docks&gt;<br>    &lt;WaterAccess&gt;N&lt;/WaterAccess&gt;<br>    &lt;RailAccess&gt;Y&lt;/RailAccess&gt;<br>    &lt;Inventory&gt;<br>        &lt;Item code=&quot;A101&quot;&gt;Pallet Jack&lt;/Item&gt;<br>        &lt;Item code=&quot;B205&quot;&gt;Forklift&lt;/Item&gt;<br>    &lt;/Inventory&gt;<br>&lt;/Warehouse&gt;</pre><h3>1. The Legacy Approach (And Why to Avoid It)</h3><p>Historically, developers used two functions to pull data out of XMLType:</p><ul><li><strong>EXTRACT(xml_col, &#39;xpath&#39;)</strong>: Returns an XMLType fragment with tags intact (e.g., &lt;Docks&gt;3&lt;/Docks&gt;).</li><li><strong>EXTRACTVALUE(xml_col, &#39;xpath&#39;)</strong>: Strips the tags and returns a single scalar value (VARCHAR2 by default).</li></ul><pre>-- Deprecated approach<br>SELECT warehouse_name,<br>       EXTRACTVALUE(e.warehouse_spec, &#39;/Warehouse/Docks&#39;) AS docks<br>  FROM warehouses e<br> WHERE e.warehouse_spec IS NOT NULL;</pre><h3>Why You Should Stop Using Them</h3><ul><li><strong>Official Deprecation:</strong> Oracle retains them strictly for backward compatibility; they receive no optimizer enhancements.</li><li><strong>Single-Node Failure (</strong><strong>ORA-19025):</strong> If an XPath in EXTRACTVALUE accidentally matches two sibling nodes (like &lt;Item&gt; above), the entire query fails with ORA-19025: EXTRACTVALUE returns value of only one node.</li><li><strong>Poor Multi-Column Performance:</strong> Extracting 10 fields from one XML document requires calling EXTRACTVALUE 10 separate times, forcing the database to re-evaluate the XML structure repeatedly.</li></ul><h3>2. Modern Single-Value Extraction: XMLCAST + XMLQUERY</h3><p>When you only need a <strong>single scalar value</strong> in your SELECT list, Oracle recommends pairing XMLQUERY (which evaluates the XPath/XQuery) with XMLCAST (which converts the result into a clean SQL data type).</p><pre>SELECT e.warehouse_name,<br>       XMLCAST(<br>           XMLQUERY(&#39;/Warehouse/Docks&#39; PASSING e.warehouse_spec RETURNING CONTENT)<br>           AS NUMBER<br>       ) AS docks<br>  FROM warehouses e<br> WHERE e.warehouse_spec IS NOT NULL</pre><ul><li><strong>PASSING e.warehouse_spec</strong> sets the XMLType column as the context for the XPath.</li><li><strong>XMLCAST(... AS NUMBER)</strong> safely casts the extracted text node into an explicit SQL type (NUMBER, VARCHAR2, DATE) rather than relying on implicit conversion.</li></ul><h3>3. The Production Standard: Shredding XML with XMLTABLE</h3><p>When you need <strong>multiple columns</strong> or <strong>repeating child rows</strong>, XMLTABLE is the standard solution. It parses the XMLType once and projects the result into a virtual relational table directly inside your FROM clause.</p><h3>Extracting Multiple Columns per Row</h3><pre>SELECT e.warehouse_name,<br>       xt.docks,<br>       xt.water_access,<br>       xt.rail_access<br>  FROM warehouses e,<br>       XMLTABLE(<br>           &#39;/Warehouse&#39;<br>           PASSING e.warehouse_spec<br>           COLUMNS<br>               docks        NUMBER      PATH &#39;Docks&#39;,<br>               water_access VARCHAR2(6) PATH &#39;WaterAccess&#39;,<br>               rail_access  VARCHAR2(6) PATH &#39;RailAccess&#39;<br>       ) (+) xt</pre><h3>Handling Repeating Child Nodes (1-to-Many)</h3><p>If you want one relational row per &lt;Item&gt; inside &lt;Inventory&gt;, simply point the main XQuery path to the repeating node:</p><pre>SELECT e.warehouse_name,<br>       xt.seq_num,<br>       xt.item_code,<br>       xt.item_name<br>  FROM warehouses e,<br>       XMLTABLE(<br>           &#39;/Warehouse/Inventory/Item&#39;<br>           PASSING e.warehouse_spec<br>           COLUMNS<br>               seq_num   FOR ORDINALITY,<br>               item_code VARCHAR2(20)  PATH &#39;@code&#39;,<br>               item_name VARCHAR2(100) PATH &#39;.&#39;<br>       ) (+) xt</pre><ul><li><strong>FOR ORDINALITY</strong> generates a sequential row number (1, 2, 3...) for each matching node.</li><li><strong>PATH &#39;@code&#39;</strong> extracts an XML attribute using the @ prefix.</li><li><strong>PATH &#39;.&#39;</strong> extracts the text value of the current &lt;Item&gt; element itself.</li></ul><h3>4. Three Pitfalls to Watch Out For in Production</h3><h3>1. Inner Join Behavior Dropping Rows</h3><p>Unlike EXTRACTVALUE (which returns NULL when a path does not match), XMLTABLE acts like an <strong>inner join</strong> by default. If warehouse_spec is NULL or the XPath finds zero matching nodes, the entire parent row from warehouses disappears from your result set.</p><ul><li><strong>Fix:</strong> Always outer-join your XMLTABLE using (+) (as shown in the examples above) when parent rows must be preserved.</li></ul><h3>2. Case Sensitivity in COLUMNS</h3><p>XPath is strictly case-sensitive. If you omit the PATH clause in XMLTABLE, Oracle assumes the XML tag name is <strong>all uppercase</strong> matching the column alias (COLUMNS docks NUMBER looks for &lt;DOCKS&gt;).</p><ul><li><strong>Fix:</strong> Always specify PATH &#39;ExactTagName&#39; explicitly when dealing with mixed-case or camelCase XML tags.</li></ul><h3>3. ORA-19279 (XPTY0004 Sequence Mismatch)</h3><p>If a PATH inside the COLUMNS clause resolves to more than one node for a single row (for example, PATH &#39;Inventory/Item&#39; when there are two items), Oracle throws ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence.</p><ul><li><strong>Fix:</strong> Either move the repeating node into the main row-driving XQuery path, or target a specific occurrence using an index predicate like PATH &#39;Inventory/Item[1]&#39;.</li></ul><blockquote><em>Feel free to reach out for consulting, troubleshooting, or just to chat about all things Oracle Fusion and ERP reporting!</em></blockquote><p><strong>📧 </strong><a href="/service/mailto:dksingh.ops@gmail.com"><strong>Email</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/devvkumar/"><strong>💼 LinkedIn</strong></a><strong>, </strong><a href="https://devvkumar.netlify.app/">🌐 Portfolio</a></p><blockquote><em>💬 </em><strong><em>Have a quick question?</em></strong><em> Drop a comment below this post, and I’ll do my best to get back to you with a solution!</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c294a291f25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying SQL Recursive Queries: Traversing Hierarchical Data Like a Pro]]></title>
            <link>https://medium.com/@dksingh.ops/demystifying-sql-recursive-queries-traversing-hierarchical-data-like-a-pro-d5d0f82d978f?source=rss-aed5e79be33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5d0f82d978f</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[oracle-fusion-technical]]></category>
            <category><![CDATA[advance-sql]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Dev Kumar]]></dc:creator>
            <pubDate>Tue, 11 Aug 2026 16:07:41 GMT</pubDate>
            <atom:updated>2026-08-11T16:07:41.820Z</atom:updated>
            <content:encoded><![CDATA[<h4>Relational databases excel at handling flat, tabular data. But what happens when your data naturally forms a tree or a network? Think of organizational charts, multi-level e-commerce categories, bill-of-materials assemblies, or social media connection chains.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vzv4AP71XbYVpLWfVrGPBA.png" /><figcaption>SQL Recursive Queries</figcaption></figure><p>Querying these nested structures using standard JOIN operations requires knowing the depth of the hierarchy in advance. If your organizational chart grows from 3 levels to 10, your static joins break.</p><p>This is where <strong>Recursive Queries</strong> — powered by <strong>Recursive Common Table Expressions (CTEs)</strong> — come to the rescue. They allow SQL to loop over data dynamically until a termination condition is met.</p><h3>What is a Recursive Common Table Expression (CTE)?</h3><p>A Common Table Expression (CTE) is a temporary named result set defined using the WITH clause. A <strong>Recursive CTE</strong> is a special form that references itself within its own definition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hE6khCjzS1cOqZ8c" /><figcaption>Hierarchical parent-child data structure. Source: Oleksii Bulgakov / Getty Images</figcaption></figure><p><strong>very recursive CTE consists of three core components:</strong></p><pre>WITH RECURSIVE cte_name AS (<br>    -- 1. Anchor Member: Base query that gets the root node(s)<br>    SELECT id, name, parent_id, 1 AS depth<br>    FROM category<br>    WHERE parent_id IS NULL<br><br>  UNION ALL<br><br>    -- 2. Recursive Member: Joins the CTE back to the original table<br>    SELECT c.id, c.name, c.parent_id, r.depth + 1<br>    FROM category c<br>    JOIN cte_name r ON c.parent_id = r.id<br>    -- 3. Termination: Implicitly stops when the recursive join returns no new rows<br>)<br>SELECT * FROM cte_name;</pre><h3>The Three Golden Components</h3><ul><li><strong>The Anchor Member:</strong> The foundational query executed once. It returns the initial result set (e.g., top-level managers, root product categories).</li><li><strong>The Recursive Member:</strong> Combines new rows by joining the target table with the results from the <em>previous</em> recursive step.</li><li><strong>The Termination Condition:</strong> SQL automatically stops execution as soon as an iteration returns zero new rows.</li></ul><pre>WITH RECURSIVE OrgChart AS (<br>    -- Anchor: Find the top-level CEO (manager_id is NULL)<br>    SELECT<br>        employee_id,<br>        name,<br>        job_title,<br>        manager_id,<br>        1 AS hierarchy_level,<br>        CAST(name AS VARCHAR(255)) AS management_path<br>    FROM employees<br>    WHERE manager_id IS NULL<br><br>    UNION ALL<br><br>    -- Recursive Step: Find direct reports for employees identified in the prior step<br>    SELECT <br>        e.employee_id,<br>        e.name,<br>        e.job_title,<br>        e.manager_id,<br>        o.hierarchy_level + 1,<br>        CAST(CONCAT(o.management_path, &#39; -&gt; &#39;, e.name) AS VARCHAR(255))<br>    FROM employees e<br>    INNER JOIN OrgChart o ON e.manager_id = o.employee_id<br>)<br>SELECT <br>    hierarchy_level,<br>    management_path,<br>    name,<br>    job_title<br>FROM OrgChart<br>ORDER BY hierarchy_level, name;</pre><h3>How SQL Executes the Recursive Loop Under the Hood</h3><p>To truly understand recursive CTEs, visualize how the query engine processes data iteration by iteration:</p><h3>Beyond Org Charts: Top Use Cases</h3><p><strong>1. Generating Sequential Series / Date Ranges</strong></p><p>Generate consecutive numbers or dates on the fly without dedicated calendar tables:</p><pre>WITH RECURSIVE DateSeries AS (<br>    SELECT DATE(&#39;2026-08-01&#39;) AS report_date<br>    UNION ALL<br>    SELECT report_date + INTERVAL 1 DAY<br>    FROM DateSeries<br>    WHERE report_date &lt; DATE(&#39;2026-08-07&#39;)<br>)<br>SELECT report_date FROM DateSeries;</pre><p><strong>2. E-Commerce Breadcrumb Navigation</strong></p><p>Traverse parent category trees up to the root to build breadcrumb paths like Home &gt; Electronics &gt; Audio &gt; Headphones.</p><p><strong>3. Bill of Materials (BOM) Expansion</strong></p><p>Calculate total manufacturing costs by recursively summing raw materials and intermediate sub-assemblies for complex products like vehicles or hardware.</p><h3>Preventing Infinite Loops</h3><p>If your data contains circular references, a recursive CTE will run until memory crashes or a execution timeout occurs. Modern SQL dialects offer safety limits:</p><ul><li><strong>SQL Server:</strong> Uses OPTION (MAXRECURSION 100).</li><li><strong>PostgreSQL 14+:</strong> Supports the native CYCLE clause:</li></ul><pre>CYCLE employee_id SET is_cycle USING path</pre><ul><li><strong>MySQL / MariaDB:</strong> Controlled via cte_max_recursion_depth system variable.</li></ul><h3>Key Takeaways</h3><p>Recursive CTEs turn complex, multi-pass application logic into clean, declarative SQL. By combining an <strong>Anchor Member</strong> and a <strong>Recursive Member</strong> linked with UNION ALL, you can easily traverse trees, graphs, and dynamic depth hierarchies directly within your database.</p><blockquote><em>Feel free to reach out for consulting, troubleshooting, or just to chat about all things Oracle Fusion and ERP reporting!</em></blockquote><p><strong>📧 </strong><a href="/service/mailto:dksingh.ops@gmail.com"><strong>Email</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/devvkumar/"><strong>💼 LinkedIn</strong></a><strong>, </strong><a href="https://devvkumar.netlify.app/">🌐 Portfolio</a></p><blockquote><em>💬 </em><strong><em>Have a quick question?</em></strong><em> Drop a comment below this post, and I’ll do my best to get back to you with a solution!</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5d0f82d978f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Oracle Fusion Payables: Invoice Types and End-to-End Database Table Hits]]></title>
            <link>https://medium.com/@dksingh.ops/mastering-oracle-fusion-payables-invoice-types-and-end-to-end-database-table-hits-315d64ddfde4?source=rss-aed5e79be33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/315d64ddfde4</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[accounts-payable]]></category>
            <category><![CDATA[oracle-fusion-financial]]></category>
            <category><![CDATA[invoice]]></category>
            <category><![CDATA[oracle-fusion-technical]]></category>
            <dc:creator><![CDATA[Dev Kumar]]></dc:creator>
            <pubDate>Sat, 08 Aug 2026 20:35:55 GMT</pubDate>
            <atom:updated>2026-08-08T20:35:55.316Z</atom:updated>
            <content:encoded><![CDATA[<h4>In Oracle Fusion Cloud Financials (Payables), understanding how different invoice types travel through the lifecycle — from initial creation to General Ledger (GL) posting — is essential for technical consultants, BI Publisher developers, and functional specialists.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZjzsN4rZBjdDVN6E948Qag.png" /></figure><p>Every action in Oracle Fusion Payables triggers specific underlying database table updates. This comprehensive guide breaks down the core invoice types available in Oracle Fusion AP and maps out the exact backend table hits across each stage of the invoice lifecycle.</p><h3>1. Primary Invoice Types in Oracle Fusion Payables</h3><p>Before tracking database impacts, it is critical to categorize the types of invoices you can create in Oracle Fusion AP. Each invoice type serves a distinct business process:</p><ul><li><strong>Standard Invoice:</strong> The default invoice type representing a standard vendor bill for goods or services rendered.</li><li><strong>Prepayment:</strong> An advance payment made to a supplier before goods or services are delivered. Prepayments are later applied against standard invoices.</li><li><strong>Credit Memo:</strong> Issued by a supplier to reduce the amount owed on a previously processed invoice (supplier-initiated).</li><li><strong>Debit Memo:</strong> Created by the buyer to notify a supplier that a reduction in AP balance is being taken (buyer-initiated, often due to returned goods).</li><li><strong>Payment Request:</strong> Generated from external applications or internal modules (such as HR Expense reports or Receivables refunds) to pay a party without creating a formal PO/AP invoice manually.</li><li><strong>Withholding Tax Invoice:</strong> Automatically generated by the system when tax is withheld at invoice validation or payment time, payable to the tax authority.</li><li><strong>Mixed Invoice: </strong>Can contain both positive and negative amounts, allowing matching to both purchase orders and other invoices for complex adjustments.</li></ul><h3>2. Complete Lifecycle &amp; Database Table Hits</h3><p>When an invoice moves through its primary lifecycle stages — <strong>Save/Create</strong>, <strong>Validate</strong>, <strong>Create Accounting</strong>, and <strong>Post to GL</strong> — data flows sequentially across Payables (AP), Subledger Accounting (SLA), and General Ledger (GL) tables.</p><pre>[Save / Insert] ──&gt; AP_INVOICES_ALL / AP_INVOICE_LINES_ALL / AP_INVOICE_DISTRIBUTIONS_ALL<br>       │<br>[Validate]      ──&gt; AP_PAYMENT_SCHEDULES_ALL / AP_HOLDS_ALL<br>       │<br>[Create Acct]   ──&gt; XLA_TRANSACTION_ENTRIES / XLA_AE_HEADERS / XLA_AE_LINES / XLA_DISTRIBUTION_LINKS<br>       │<br>[Post to GL]    ──&gt; GL_JE_BATCHES / GL_JE_HEADERS / GL_JE_LINES / GL_IMPORT_REFERENCES</pre><h3>Stage 1: Saving / Creating the Invoice</h3><p>When an invoice is initially saved (whether manually via the user interface, imported via FBDI, or created through REST APIs), records are inserted into the core AP header, line, and distribution tables.</p><h4>Tables Hit:</h4><ul><li>AP_INVOICES_ALL: Stores invoice header metadata (Invoice Number, Amount, Supplier ID, Currency, Payment Terms, and Approval Status).</li><li>AP_INVOICE_LINES_ALL: Stores line-level details (Line Amount, Line Type, Item Description, PO Header/Line reference, Ship-to Location).</li><li>AP_INVOICE_DISTRIBUTIONS_ALL: Stores distribution accounting specifications (Charge Account CCID, Amount, Accounting Date, Expense/Asset Classification).</li><li>AP_PAYMENT_SCHEDULES_ALL: Generates the preliminary payment schedule based on the invoice payment terms and gross amount.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IHpe86WlWXnaZe1ajWqpzQ.png" /></figure><pre>SELECT <br> aia.invoice_id,<br> aia.invoice_num,<br> aia.invoice_amount,<br> aia.invoice_date,<br> aia.source,<br> aia.invoice_type_lookup_code,<br> aila.line_number,<br> aila.accounting_date line_accounting_date,<br> aila.amount,<br> aida.accounting_Date dist_accounting_date,<br> apsa.payment_status_flag,<br> apsa.held_by,<br> apsa.hold_date,<br> apsa.payment_num,<br> apsa.amount_remaining,<br> apsa.due_date,<br> apsa.remit_to_supplier_name<br>FROM <br> ap_invoices_all aia,<br> ap_invoice_lines_all aila,<br> ap_invoice_distributions_all aida,<br> ap_payment_schedules_all apsa<br>Where 1 = 1<br>  AND aia.invoice_id = aila.invoice_id<br>  AND aia.invoice_id = aida.invoice_id<br>  AND aila.line_number = aida.invoice_line_number -- to get the distribution of exect line number according to invoice<br>  AND aia.invoice_id = apsa.invoice_id<br>  AND aia.invoice_num = &#39;Test Invoice by Dev&#39; </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hAGxGBiZqK-aKhRwRBLs8g.png" /><figcaption>Output</figcaption></figure><h3>Stage 2: Validating the Invoice</h3><p>Invoice validation checks matching tolerance (PO vs. Invoice), account combination validity, tax calculations, and hold checks.</p><h4>Database Actions &amp; Tables Hit:</h4><ul><li>AP_INVOICES_ALL: Updates APPROVAL_READY_FLAG.</li><li>AP_INVOICE_LINES_ALL &amp; AP_INVOICE_DISTRIBUTIONS_ALL: Updates tax distributions, variance amounts, and validation flags (MATCH_STATUS_FLAG set to &#39;V&#39;).</li><li>AP_HOLDS_ALL: If validation fails (e.g., amount mismatch, missing account, tolerance error), a record is inserted here detailing the HOLD_LOOKUP_CODE and HOLD_REASON.</li><li>AP_HOLD_CODES: Reference table checked for hold definitions.</li><li>AP_PAYMENT_SCHEDULES_ALL: Recalculates due dates, discount dates, and net payment balances.</li><li>ZX_LINES / ZX_REC_NREC_DIST: Tax engine tables populated with calculated recoverable and non-recoverable tax distributions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sIYIUeNgPBP5DUa1yQBRXg.png" /><figcaption>Validating Invoice</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RXqpvSRr8QfG5Vy5welOmA.png" /><figcaption>validated Invoice</figcaption></figure><pre>SELECT <br> aia.invoice_id,<br> aia.invoice_num,<br> aia.invoice_amount,<br> aia.invoice_date,<br> aia.approval_ready_flag,    <br> aia.source,<br> aia.invoice_type_lookup_code,<br> aila.line_number,<br> aida.match_status_flag,<br> aila.accounting_date line_accounting_date,<br> aila.amount,<br> aida.accounting_Date dist_accounting_date,<br> apsa.payment_status_flag,<br> apsa.payment_num,<br> apsa.amount_remaining,<br> apsa.due_date,<br> apsa.remit_to_supplier_name,<br> aha.held_by,<br> aha.hold_date,<br> hold.hold_type,<br> hold.external_description hold_desciption,<br> release.external_description release_description,<br> zl.tax<br>FROM <br> ap_invoices_all aia,<br> ap_invoice_lines_all aila,<br> ap_invoice_distributions_all aida,<br> ap_payment_schedules_all apsa,<br> ap_holds_all aha,<br> ap_hold_codes hold,<br> ap_hold_codes release,<br> zx_lines zl<br>Where 1 = 1<br>  AND aia.invoice_id = aila.invoice_id<br>  AND aia.invoice_id = aida.invoice_id<br>  AND aila.line_number = aida.invoice_line_number -- to get the distribution of exect line number according to invoice<br>  AND aia.invoice_id = apsa.invoice_id<br>  AND aia.invoice_id = aha.invoice_id<br>  AND aha.hold_lookup_code = hold.hold_lookup_code<br>  AND aha.hold_lookup_code = release.hold_lookup_code<br>  AND aia.invoice_id = zl.trx_id(+)<br>  AND aila.line_number = zl.trx_line_number(+)<br>  AND zl.application_id(+) = 200     -- for payables<br>  AND zl.entity_code(+) = &#39;AP_INVOICES&#39;    -- for AP Invoices<br>  AND aia.invoice_num = &#39;Test Invoice by Dev&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VVW60GAfdp-y5r_NayoxUg.png" /><figcaption>Output</figcaption></figure><h3>Stage 3: Creating Accounting (Subledger Accounting Engine — SLA)</h3><p>Running the <strong>Create Accounting</strong> process transfers invoice distributions into Oracle Subledger Accounting (XLA). SLA acts as the accounting rules engine before entries reach GL.</p><h4>Tables Hit:</h4><ul><li>XLA_TRANSACTION_ENTRIES: Tracks the transaction source system headers (APPLICATION_ID = 200 for Payables, VALUATION_METHOD_CODE, SOURCE_ID_INT_1 = INVOICE_ID).</li><li>XLA_EVENTS: Tracks the accounting event created during validation (e.g., EVENT_TYPE_CODE = &#39;INVOICES&#39;).</li><li>XLA_AE_HEADERS: Holds subledger journal entry headers (AE_HEADER_ID, ACCOUNTING_DATE, GL_TRANSFER_STATUS_CODE).</li><li>XLA_AE_LINES: Holds subledger journal entry lines (ACCOUNTED_DR, ACCOUNTED_CR, CODE_COMBINATION_ID).</li><li>XLA_DISTRIBUTION_LINKS: Crucial mapping table that links subledger accounting lines (XLA_AE_LINES) back to the originating AP distributions (AP_INVOICE_DISTRIBUTIONS_ALL).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RpAumQtsS4Gv6qssMP0Q7w.png" /><figcaption>Accounting Invoices</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jA0RUiVjiQsdOipxm-mV6Q.png" /><figcaption>Accounting Created</figcaption></figure><pre>SELECT <br>    aia.invoice_id,<br>    aia.invoice_num,<br>    aia.invoice_date,<br>    aia.invoice_amount,<br>    xte.entity_code,<br>    xev.event_id,<br>    xah.ae_header_id,<br>    xal.ae_line_num,<br>    xal.accounted_dr,<br>    xal.accounted_cr,<br>    xal.entered_dr,<br>    xal.entered_cr<br>FROM ap_invoices_all aia,<br>     xla_transaction_entities xte,<br>     xla_events xev,<br>     xla_ae_headers xah,<br>     xla_ae_lines xal<br>WHERE xte.source_id_int_1 = aia.invoice_id<br>  AND xte.application_id = 200           -- to retrive payables<br>  AND xte.entity_code = &#39;AP_INVOICES&#39;    -- to retrive only created for get AP Invoice<br>  AND xev.entity_id = xte.entity_id<br>  AND xev.application_id = xte.application_id<br>  AND xah.entity_id = xte.entity_id<br>  AND xah.event_id = xev.event_id<br>  AND xah.application_id = xte.application_id<br>  AND xal.ae_header_id = xah.ae_header_id<br>  AND xal.application_id = xah.application_id<br>  AND aia.invoice_num = &#39;Test Invoice by Dev&#39;  -- invoice id</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_FzkpZRq6_2xZBddEaFbeQ.png" /><figcaption>Output</figcaption></figure><h3>Stage 4: Posting to General Ledger (GL)</h3><p>When accounting entries are posted to the General Ledger (either automatically during Create Accounting with “Post to GL” enabled or via the <strong>Post Journal Entries</strong> job), journal batches are created and account balances are updated.</p><h4>Tables Hit:</h4><ul><li>GL_JE_BATCHES: Contains the General Ledger journal batch metadata.</li><li>GL_JE_HEADERS: Holds GL journal header records (JE_HEADER_ID, LEDGER_ID, PERIOD_NAME, JE_SOURCE = &#39;Payables&#39;).</li><li>GL_JE_LINES: Stores individual debit and credit journal lines posted to specific account combinations (CODE_COMBINATION_ID).</li><li>GL_IMPORT_REFERENCES: Stores line-level links connecting GL journal lines (GL_JE_LINES) back to SLA journal lines (XLA_AE_LINES) via GL_SL_LINK_ID and GL_SL_LINK_TABLE.</li><li>GL_BALANCES: Increments or decrements actual period-to-date and year-to-date account balances for reporting.</li></ul><pre>SELECT <br>    aia.invoice_num          AS &quot;Invoice Number&quot;,<br>    aia.invoice_date         AS &quot;Invoice Date&quot;,<br>    aia.invoice_amount       AS &quot;Invoice Amount&quot;,<br>    xte.transaction_number   AS &quot;SLA Transaction Number&quot;,<br>    xah.accounting_date      AS &quot;Accounting Date&quot;,<br>    xal.ae_line_num          AS &quot;SLA Line Number&quot;,<br>    xal.entered_dr           AS &quot;SLA Entered DR&quot;,<br>    xal.entered_cr           AS &quot;SLA Entered CR&quot;,<br>    gjh.name                 AS &quot;GL Journal Batch Name&quot;,<br>    gjh.je_source            AS &quot;GL Source&quot;,<br>    gjh.je_category          AS &quot;GL Category&quot;,<br>    gjl.je_line_num          AS &quot;GL Line Number&quot;,<br>    gjl.accounted_dr         AS &quot;GL Accounted DR&quot;,<br>    gjl.accounted_cr         AS &quot;GL Accounted CR&quot;,<br>    gcc.segment1 || &#39;-&#39; || gcc.segment2 || &#39;-&#39; || gcc.segment3 AS &quot;Account Combination&quot;<br>FROM <br>    ap_invoices_all aia,<br>    xla_transaction_entities xte,<br>    xla_ae_headers xah,<br>    xla_ae_lines xal,<br>    gl_import_references gir,<br>    gl_je_lines gjl,<br>    gl_je_headers gjh,<br>    gl_code_combinations gcc<br>WHERE 1 = 1<br>    AND xte.application_id = 200     -- to retrive payables<br>    AND xte.entity_code = &#39;AP_INVOICES&#39;    -- to retrive only created for get AP Invoice<br>    AND NVL(xte.source_id_int_1, -99) = aia.invoice_id<br><br>    AND xah.entity_id = xte.entity_id<br>    AND xah.application_id = xte.application_id<br><br>    AND xal.ae_header_id = xah.ae_header_id<br>    AND xal.application_id = xah.application_id<br><br>    AND gir.gl_sl_link_id = xal.gl_sl_link_id<br>    AND gir.gl_sl_link_table = xal.gl_sl_link_table<br><br>    AND gjl.je_header_id = gir.je_header_id<br>    AND gjl.je_line_num = gir.je_line_num<br><br>    AND gjh.je_header_id = gjl.je_header_id<br><br>    AND gcc.code_combination_id = xal.code_combination_id<br> AND aia.invoice_num = &#39;Test Invoice by Dev&#39;  -- invoice id<br><br>ORDER BY <br>    aia.invoice_num,<br>    xal.ae_line_num</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4fEv0kskEvowaj2kq3YEVg.png" /><figcaption>Output</figcaption></figure><h3>3. Full End-to-End SQL Query: AP Invoice to General Ledger</h3><p>This query traces an AP Invoice from its header, line, and distribution levels through Subledger Accounting (SLA) down to the General Ledger (GL) journal entry lines. You can use this as a baseline query for Oracle Fusion BI Publisher Data Models.</p><pre>WITH ap_base AS (<br>    SELECT <br>        aia.invoice_id,<br>        aia.invoice_num,<br>        aia.invoice_date,<br>        aia.invoice_amount,<br>        aia.invoice_currency_code,<br>        aia.approval_ready_flag,<br>        aia.source,<br>        aia.invoice_type_lookup_code,<br>        aila.line_number                    AS ap_line_num,<br>        aila.line_type_lookup_code          AS ap_line_type,<br>        aila.accounting_date                AS line_accounting_date,<br>        aila.amount                         AS ap_line_amount,<br>        aila.description                    AS ap_line_description,<br>        aida.invoice_distribution_id,<br>        aida.distribution_line_number       AS ap_dist_num,<br>        aida.line_type_lookup_code          AS ap_dist_type,<br>        aida.accounting_date                AS dist_accounting_date,<br>        aida.amount                         AS ap_dist_amount,<br>        aida.match_status_flag,<br>        aida.dist_code_combination_id       AS ap_dist_ccid,<br>        apsa.payment_status_flag,<br>        apsa.payment_num,<br>        apsa.amount_remaining,<br>        apsa.due_date,<br>        apsa.remit_to_supplier_name,<br>        aha.held_by,<br>        aha.hold_date,<br>        hold.hold_type,<br>        hold.external_description           AS hold_description,<br>        release_code.external_description    AS release_description,<br>        zl.tax                              AS tax_amount<br>    FROM <br>        ap_invoices_all                 aia,<br>        ap_invoice_lines_all           aila,<br>        ap_invoice_distributions_all   aida,<br>        ap_payment_schedules_all       apsa,<br>        ap_holds_all                   aha,<br>        ap_hold_codes                  hold,<br>        ap_hold_codes                  release_code,<br>        zx_lines                       zl<br>    WHERE 1 = 1<br>        -- Inner Joins<br>        AND aia.invoice_id                  = aila.invoice_id<br>        AND aila.invoice_id                 = aida.invoice_id<br>        AND aila.line_number                = aida.invoice_line_number<br>        <br>        -- Outer Joins (+)<br>        AND aia.invoice_id                  = apsa.invoice_id(+)<br>        AND aia.invoice_id                  = aha.invoice_id(+)<br>        AND aha.hold_lookup_code            = hold.hold_lookup_code(+)<br>        AND aha.release_lookup_code         = release_code.hold_lookup_code(+)<br>        AND aia.invoice_id                  = zl.trx_id(+)<br>        AND aila.line_number                = zl.trx_line_number(+)<br>        AND zl.application_id(+)            = 200<br>        AND zl.entity_code(+)               = &#39;AP_INVOICES&#39;<br>        <br>        -- Filter<br>        AND aia.invoice_num                 = &#39;Test Invoice by Dev&#39;<br>),<br><br>sla_base AS (<br>    SELECT <br>        xte.source_id_int_1                 AS invoice_id,<br>        xdl.source_distribution_id_num_1     AS invoice_distribution_id,<br>        xte.entity_code                     AS sla_entity_code,<br>        xte.transaction_number              AS sla_transaction_number,<br>        xev.event_id                        AS sla_event_id,<br>        xah.ae_header_id                    AS sla_header_id,<br>        xah.event_type_code                 AS sla_event_type,<br>        xah.accounting_date                 AS sla_accounting_date,<br>        xal.ae_line_num                     AS sla_line_num,<br>        xal.accounting_class_code           AS sla_accounting_class,<br>        xal.entered_dr                      AS sla_entered_dr,<br>        xal.entered_cr                      AS sla_entered_cr,<br>        xal.accounted_dr                    AS sla_accounted_dr,<br>        xal.accounted_cr                    AS sla_accounted_cr,<br>        xal.code_combination_id             AS sla_ccid,<br>        xal.gl_sl_link_id,<br>        xal.gl_sl_link_table<br>    FROM <br>        xla_transaction_entities       xte,<br>        xla_events                     xev,<br>        xla_ae_headers                 xah,<br>        xla_ae_lines                   xal,<br>        xla_distribution_links         xdl<br>    WHERE 1 = 1<br>        -- Inner Joins<br>        AND xte.entity_id                   = xev.entity_id<br>        AND xte.application_id              = xev.application_id<br>        AND xte.entity_id                   = xah.entity_id<br>        AND xev.event_id                    = xah.event_id<br>        AND xte.application_id              = xah.application_id<br>        AND xah.ae_header_id                = xal.ae_header_id<br>        AND xah.application_id              = xal.application_id<br>        <br>        -- Outer Joins (+)<br>        AND xal.ae_header_id                = xdl.ae_header_id(+)<br>        AND xal.ae_line_num                 = xdl.ae_line_num(+)<br>        AND xal.application_id              = xdl.application_id(+)<br>        AND xdl.source_distribution_type(+)  = &#39;AP_INV_DIST&#39;<br>        <br>        -- Filters<br>        AND xte.application_id              = 200<br>        AND xte.entity_code                 = &#39;AP_INVOICES&#39;<br>),<br><br>gl_base AS (<br>    SELECT <br>        gir.gl_sl_link_id,<br>        gir.gl_sl_link_table,<br>        gjh.period_name                     AS gl_period,<br>        gjh.je_source                       AS gl_source,<br>        gjh.je_category                     AS gl_category,<br>        gjh.name                            AS gl_journal_name,<br>        gjl.je_line_num                     AS gl_line_num,<br>        gjl.entered_dr                      AS gl_entered_dr,<br>        gjl.entered_cr                      AS gl_entered_cr,<br>        gjl.accounted_dr                    AS gl_accounted_dr,<br>        gjl.accounted_cr                    AS gl_accounted_cr,<br>        gjl.code_combination_id             AS gl_ccid,<br>        gcc.segment1 || &#39;-&#39; || gcc.segment2 || &#39;-&#39; || gcc.segment3 AS account_combination<br>    FROM <br>        gl_import_references           gir,<br>        gl_je_lines                    gjl,<br>        gl_je_headers                  gjh,<br>        gl_code_combinations           gcc<br>    WHERE 1 = 1<br>        -- Inner Joins<br>        AND gir.je_header_id                = gjl.je_header_id<br>        AND gir.je_line_num                 = gjl.je_line_num<br>        AND gjl.je_header_id                = gjh.je_header_id<br>        <br>        -- Outer Join (+)<br>        AND gjl.code_combination_id         = gcc.code_combination_id(+)<br>)<br><br>SELECT <br>    ap.*,<br>    sla.sla_entity_code,<br>    sla.sla_transaction_number,<br>    sla.sla_event_id,<br>    sla.sla_header_id,<br>    sla.sla_event_type,<br>    sla.sla_accounting_date,<br>    sla.sla_line_num,<br>    sla.sla_accounting_class,<br>    sla.sla_entered_dr,<br>    sla.sla_entered_cr,<br>    sla.sla_accounted_dr,<br>    sla.sla_accounted_cr,<br>    sla.sla_ccid,<br>    gl.gl_period,<br>    gl.gl_source,<br>    gl.gl_category,<br>    gl.gl_journal_name,<br>    gl.gl_line_num,<br>    gl.gl_entered_dr,<br>    gl.gl_entered_cr,<br>    gl.gl_accounted_dr,<br>    gl.gl_accounted_cr,<br>    gl.gl_ccid,<br>    gl.account_combination<br>FROM <br>    ap_base   ap,<br>    sla_base  sla,<br>    gl_base   gl<br>WHERE 1 = 1<br>    -- Outer Joins (+) between CTEs<br>    AND ap.invoice_id                       = sla.invoice_id(+)<br>    AND ap.invoice_distribution_id          = sla.invoice_distribution_id(+)<br>    AND sla.gl_sl_link_id                   = gl.gl_sl_link_id(+)<br>    AND sla.gl_sl_link_table                = gl.gl_sl_link_table(+)<br><br>ORDER BY <br>    ap.invoice_num, <br>    ap.ap_line_num, <br>    ap.ap_dist_num, <br>    sla.sla_line_num</pre><h3>Key Takeaways</h3><ol><li><strong>Header-to-Distribution:</strong> Every invoice type populates AP_INVOICES_ALL, AP_INVOICE_LINES_ALL, and AP_INVOICE_DISTRIBUTIONS_ALL.</li><li><strong>Validation Safeguards:</strong> Hold details populate AP_HOLDS_ALL, while successful validation flags distribution lines with MATCH_STATUS_FLAG = &#39;V&#39;.</li><li><strong>Bridge via SLA:</strong> XLA_DISTRIBUTION_LINKS serves as the single source of truth connecting Oracle Payables operational tables to SLA accounting tables.</li><li><strong>GL Traceability:</strong> GL_IMPORT_REFERENCES provides full auditability from General Ledger journal entries back to individual subledger transactions.</li></ol><blockquote><em>Feel free to reach out for consulting, troubleshooting, or just to chat about all things Oracle Fusion and ERP reporting!</em></blockquote><p><strong>📧 </strong><a href="/service/mailto:dksingh.ops@gmail.com"><strong>Email</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/devvkumar/"><strong>💼 LinkedIn</strong></a><strong>, </strong><a href="https://devvkumar.netlify.app/">🌐 Portfolio</a></p><blockquote><em>💬 </em><strong><em>Have a quick question?</em></strong><em> Drop a comment below this post, and I’ll do my best to get back to you with a solution!</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=315d64ddfde4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Common Table Expressions (CTE) in Oracle SQL: A Complete Guide with Best Practices]]></title>
            <link>https://medium.com/@dksingh.ops/common-table-expressions-cte-in-oracle-sql-a-complete-guide-with-best-practices-e89abbc6fdc4?source=rss-aed5e79be33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e89abbc6fdc4</guid>
            <dc:creator><![CDATA[Dev Kumar]]></dc:creator>
            <pubDate>Sat, 01 Aug 2026 18:24:30 GMT</pubDate>
            <atom:updated>2026-08-01T18:24:30.562Z</atom:updated>
            <content:encoded><![CDATA[<h4>In this comprehensive tutorial, we will explore what CTEs are in Oracle SQL, how they optimize query performance, why and when to use them, and their key advantages and limitations.</h4><p>When writing complex Oracle SQL queries, you often find yourself dealing with deeply nested inline views, duplicated subqueries, or massive JOIN conditions that make your code look like a mountain of spaghetti.</p><p>Enter the <strong>Common Table Expression (CTE)</strong> — defined using the WITH clause.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ps9jFgbN7InV7RQkNa9GLA.png" /><figcaption>CTE in SQL</figcaption></figure><h3>What is a CTE in SQL?</h3><p>A <strong>Common Table Expression (CTE)</strong> is a temporary, named result set that you can reference within a single SELECT, INSERT, UPDATE, or DELETE statement.</p><p>Introduced in the SQL:1999 standard and supported in Oracle SQL, a CTE acts as a readable, inline view that exists only during the execution of that specific query.</p><h3>Basic Syntax</h3><p>SQL</p><pre>WITH department_salary AS (<br>    SELECT <br>        department_id,<br>        AVG(salary) AS avg_salary,<br>        COUNT(employee_id) AS total_employees<br>    FROM employees<br>    GROUP BY department_id<br>)<br>SELECT <br>    e.employee_id,<br>    e.first_name,<br>    e.salary,<br>    ds.avg_salary<br>FROM employees e<br>JOIN department_salary ds ON e.department_id = ds.department_id<br>WHERE e.salary &gt; ds.avg_salary;</pre><h3>Why and How CTEs Optimize Queries in Oracle SQL</h3><p>A common misconception is that CTEs are purely syntactic sugar for code readability. In Oracle SQL, CTEs can significantly <strong>optimize query performance</strong> through specific Cost-Based Optimizer (CBO) behaviors:</p><h3>1. The Subquery Factoring Optimization (Materialization)</h3><p>When you reference the same subquery multiple times in a standard SQL query, the database engine often evaluates that subquery repeatedly.</p><p>Oracle treats CTEs differently using <strong>Subquery Factoring</strong>:</p><ul><li><strong>Materialization (</strong><strong>INLINE vs. </strong><strong>MATERIALIZE):</strong> Oracle can evaluate a CTE once, store the result set in a temporary table space, and re-use it across multiple parts of the main query.</li><li><strong>Cost-Based Decisions:</strong> By default, Oracle’s CBO decides whether to inline the CTE (treat it like a standard view) or materialize it based on estimated cost and how many times the CTE is referenced.</li></ul><h3>2. Manual Control via Optimizer Hints</h3><p>Oracle allows you to force how a CTE is executed using optimizer hints:</p><ul><li>/*+ MATERIALIZE */: Forces Oracle to write the CTE results to a temporary table in the TEMP tablespace once and re-use it.</li><li>/*+ INLINE */: Forces Oracle to expand the CTE inline wherever it is referenced, evaluating it multiple times if necessary.</li></ul><p>SQL</p><pre>WITH high_sales AS (<br>    SELECT /*+ MATERIALIZE */ <br>        customer_id, <br>        SUM(amount) AS total_amount<br>    FROM sales<br>    GROUP BY customer_id<br>    HAVING SUM(amount) &gt; 10000<br>)<br>SELECT hs.*, c.customer_name<br>FROM high_sales hs<br>JOIN customers c ON hs.customer_id = c.customer_id;</pre><h3>3. Avoiding Duplicated Work</h3><p>If your business logic requires doing expensive aggregation (e.g., SUM, COUNT, AVG) or complex transformations, performing those operations <strong>once</strong> inside a CTE and joining to the result set later prevents unnecessary full table scans and repeated computation.</p><h3>Why We Use CTEs: Key Use Cases</h3><h3>Use Case 1: Simplifying Complex Multi-Level Aggregations</h3><p>Instead of nesting subqueries three levels deep inside FROM clauses, you can chain CTEs sequentially.</p><p>SQL</p><pre>WITH dept_stats AS (<br>    SELECT department_id, AVG(salary) AS avg_sal<br>    FROM employees<br>    GROUP BY department_id<br>),<br>company_stats AS (<br>    SELECT AVG(avg_sal) AS overall_dept_avg<br>    FROM dept_stats<br>)<br>SELECT ds.department_id, ds.avg_sal<br>FROM dept_stats ds, company_stats cs<br>WHERE ds.avg_sal &gt; cs.overall_dept_avg;</pre><h3>Use Case 2: Hierarchical Data Traversal (Recursive CTEs)</h3><p>Oracle historically used CONNECT BY for hierarchical data (like organizational charts or bill-of-materials). However, <strong>Recursive CTEs</strong> (ANSI SQL standard) provide a cleaner, highly portable way to handle recursion.</p><p>SQL</p><pre>WITH org_chart (employee_id, manager_id, first_name, lvl) AS (<br>    -- Anchor member: Top-level manager<br>    SELECT employee_id, manager_id, first_name, 1 AS lvl<br>    FROM employees<br>    WHERE manager_id IS NULL<br>    <br>    UNION ALL<br>    <br>    -- Recursive member: Find subordinates<br>    SELECT e.employee_id, e.manager_id, e.first_name, o.lvl + 1<br>    FROM employees e<br>    JOIN org_chart o ON e.manager_id = o.employee_id<br>)<br>SELECT employee_id, manager_id, first_name, lvl<br>FROM org_chart<br>ORDER BY lvl;</pre><h3>Pros and Cons of Using CTEs</h3><h3>Pros (Advantages)</h3><ul><li><strong>Readability and Maintainability:</strong> Code flows logically from top to bottom. You break complex logic into modular “steps.”</li><li><strong>Code Reusability:</strong> Reference the same CTE multiple times within a single query without repeating subquery logic.</li><li><strong>Optimization Potential:</strong> Oracle’s MATERIALIZE hint can drastically speed up queries by executing heavy transformations once.</li><li><strong>ANSI SQL Standard:</strong> Unlike Oracle’s legacy CONNECT BY, recursive CTEs follow ANSI standards, making code more portable across database systems (PostgreSQL, SQL Server, MySQL).</li><li><strong>Easier Debugging:</strong> You can debug each CTE individually by running SELECT * FROM cte_name during query development.</li></ul><h3>Cons (Disadvantages &amp; Pitfalls)</h3><ul><li><strong>Memory and Temp Space Usage:</strong> Materialized CTEs write data to the TEMP tablespace. Large intermediate CTE datasets can consume significant temporary memory and disk I/O.</li><li><strong>Lack of Indexes on Temporary Results:</strong> Materialized CTEs do not have indexes. Joining large materialized CTE result sets to other tables can lead to unoptimized full scans or hash joins.</li><li><strong>Optimizer Miscalculations:</strong> Oracle’s CBO sometimes makes incorrect decisions about whether to inline or materialize a CTE, leading to sub-optimal execution plans.</li><li><strong>Scope Restriction:</strong> A CTE exists only for the single statement it is defined in. It cannot be referenced across multiple independent SQL statements (unlike standard Global Temporary Tables).</li></ul><h3>Best Practice Tip</h3><p>Use CTEs liberally to organize complex query logic. If you encounter performance bottlenecks with large datasets inside a CTE, check the execution plan and experiment with the /*+ INLINE */ and /*+ MATERIALIZE */ hints to see which path Oracle handles best!</p><blockquote><em>Feel free to reach out for consulting, troubleshooting, or just to chat about all things Oracle Fusion and ERP reporting!</em></blockquote><p><strong>📧 </strong><a href="/service/mailto:dksingh.ops@gmail.com"><strong>Email</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/devvkumar/"><strong>💼 LinkedIn</strong></a><strong>, </strong><a href="https://devvkumar.netlify.app/">🌐 Portfolio</a></p><blockquote><em>💬 </em><strong><em>Have a quick question?</em></strong><em> Drop a comment below this post, and I’ll do my best to get back to you with a solution!</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e89abbc6fdc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Customize a Standard Report in Oracle Fusion Cloud]]></title>
            <link>https://medium.com/@dksingh.ops/how-to-customize-a-standard-report-in-oracle-fusion-cloud-158e8149501f?source=rss-aed5e79be33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/158e8149501f</guid>
            <dc:creator><![CDATA[Dev Kumar]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 15:51:24 GMT</pubDate>
            <atom:updated>2026-07-30T15:51:24.283Z</atom:updated>
            <content:encoded><![CDATA[<h4>Customizing standard reports in Oracle Fusion Cloud is a core task for consultants and developers. Whether adding a company logo, pulling extra data attributes, or adjusting column layouts, Oracle offers a flexible framework to adapt out-of-the-box reports to your business needs.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gxR0ko6z7_H17WI9DhNFrg.png" /><figcaption>Customize Standard Report in Oracle Fusion</figcaption></figure><p>Here is a step-by-step guide to customizing standard BI Publisher (BIP) reports in Oracle Fusion without losing your changes during application upgrades.</p><h3>The Golden Rule: Never Edit Standard Reports in Place</h3><p>Before touching anything, understand Oracle Fusion’s golden rule of report customization: <strong>Always copy the standard report to the Custom folder.</strong></p><p>Modifying a standard report directly in its original /shared/ folder path is bad practice for two reasons:</p><ol><li>Oracle patch upgrades will overwrite your changes.</li><li>Oracle Fusion uses the /shared/Custom folder hierarchy to handle standard report overrides seamlessly.</li></ol><p>When you place a customized report under /Custom/[Same-Path-As-Original], Fusion automatically redirects any standard user request to your custom version.</p><h3>Step-by-Step: Customizing a Standard Report Layout</h3><p>Let’s walk through a typical customization workflow: changing the visual design or fields in an existing standard report (for example, a Purchase Order or Sales Invoice layout).</p><h3>Step 1: Locate the Standard Report in BI Catalog</h3><ol><li>Navigate to <strong>Tools &gt; Reports and Analytics</strong> or go directly to the BI Catalog (/xmlpserver).</li><li>Search for the standard report you need to customize (e.g., <em>Purchase Order PDF Report</em>).</li><li>Identify its folder path under <strong>Shared Folders</strong> (e.g., Shared Folders/Procurement/Purchasing/).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xeLi8uzEP2CBRY6Se3K7FQ.png" /><figcaption>Path of Standard Report</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3fysQlORWwkoEPiHbh_4aA.png" /><figcaption>Customize Standard Report</figcaption></figure><h3>Step 2: Use the “Customize” Action</h3><ol><li>Locate the report object under its original path.</li><li>Click <strong>More &gt; Customize</strong> under the report name.</li></ol><ul><li><strong>What happens automatically:</strong> Oracle Fusion creates a replica of the report object in the corresponding path inside the Custom folder (Shared Folders/Custom/Procurement/Purchasing/).</li><li>It leaves the original report completely intact while mapping future standard executions to your custom replica.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T7-qeweW-5jvr6bcaKANHA.png" /><figcaption>Custom Path of Standard Report</figcaption></figure><h3>Step 3: Download the Template (RTF/eText/XSL)</h3><ol><li>In the newly created report under the Custom folder, click <strong>Edit</strong>.</li><li>Select the existing layout template (usually an .rtf file) and click <strong>Download</strong>.</li><li>Save a copy of the template file to your local machine.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y5eA04o60HleYbhIYYzNNg.png" /><figcaption>edit RTF template for adding new fields</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GUmaHUN3MGnNVpZ5zZ6rfQ.png" /><figcaption>download existing template for upgrade</figcaption></figure><h3>Step 4: Make Your Changes Locally</h3><ol><li>Open the downloaded .rtf template in Microsoft Word (ensure you have installed the <strong>Oracle BI Publisher Desktop</strong> plugin).</li><li>Make your formatting or structural changes:</li></ol><ul><li><strong>Logo:</strong> Replace the default logo image with your corporate logo.</li><li><strong>Formatting:</strong> Change fonts, colors, line widths, and table borders.</li><li><strong>Adding Fields:</strong> Use the BI Publisher plugin tab in Word to insert new xml fields available in the data source.</li></ul><ol><li>Save the modified document as an .rtf file.</li></ol><h3>Step 5: Upload the Custom Layout &amp; Set Default</h3><ol><li>Go back to your report under Shared Folders/Custom/....</li><li>Click <strong>Add New Layout</strong>.</li><li>Name your layout (e.g., Custom PO Template), choose the layout type (RTF), and select your modified file.</li><li>Set your new layout as the <strong>Default Layout</strong>.</li><li>Save the report.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_DuND00T5GbZA9pFmqheTg.png" /><figcaption>deploy new changes in template</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ImEdjF9Kin_ArvFwcWiVuw.png" /><figcaption>fill RTF details and upload</figcaption></figure><h3>Customizing the Data Model (When You Need New Fields)</h3><p>If the standard layout doesn’t contain the data fields you need, you will need to customize the underlying <strong>Data Model</strong>.</p><h3>How to Safely Edit a Data Model</h3><ol><li><strong>Do NOT use the “Customize” button on Data Models.</strong> Instead, open the standard Data Model and click <strong>Save As</strong>.</li><li>Save it into the corresponding path under Shared Folders/Custom/....</li><li>Open your custom Data Model and add the required SQL dataset, join, or XML element.</li><li>Save the Data Model and run a sample test to <strong>Get XML Data</strong> (download the sample XML file — you will need this in MS Word to map new fields to your RTF template).</li><li>Open your custom Report under /Custom/, click <strong>Properties</strong>, and point the <strong>Data Model reference</strong> to your newly saved Data Model under the /Custom/ directory.</li></ol><h3>Key Best Practices to Keep in Mind</h3><blockquote><strong><em>1. Preserve Sample Data: </em></strong><em>Always export real sample XML data from Oracle Fusion before modifying templates in BI Publisher Desktop. Previewing layout changes with actual data prevents XML tag mismatches later.</em></blockquote><blockquote><strong><em>2. Maintain Folder Path Parallelism: </em></strong><em>Ensure the folder structure inside </em><em>Shared Folders/Custom/ mirrors the original path exactly. If the original path is </em><em>Shared Folders/Financials/Payables/Invoices, your report </em><strong><em>must</em></strong><em> reside in </em><em>Shared Folders/Custom/Financials/Payables/Invoices for automatic redirection to work.</em></blockquote><blockquote><strong><em>3. Test User Permissions &amp; Role Mapping: </em></strong><em>Customizing a report layout doesn’t override security roles. Ensure the user running the report still has the appropriate Duty/Job roles assigned in security console (ESS job access).</em></blockquote><blockquote><em>Feel free to reach out for consulting, troubleshooting, or just to chat about all things Oracle Fusion and ERP reporting!</em></blockquote><p><strong>📧 </strong><a href="/service/mailto:dksingh.ops@gmail.com"><strong>Email</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/devvkumar/"><strong>💼 LinkedIn</strong></a><strong>, </strong><a href="https://devvkumar.netlify.app/">🌐 Portfolio</a></p><blockquote><em>💬 </em><strong><em>Have a quick question?</em></strong><em> Drop a comment below this post, and I’ll do my best to get back to you with a solution!</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=158e8149501f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Purging Interface Tables Automatically: Best Practices & ESS Jobs for Oracle Fusion]]></title>
            <link>https://medium.com/@dksingh.ops/purging-interface-tables-automatically-best-practices-ess-jobs-for-oracle-fusion-cb5bc47b9091?source=rss-aed5e79be33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb5bc47b9091</guid>
            <dc:creator><![CDATA[Dev Kumar]]></dc:creator>
            <pubDate>Sun, 19 Jul 2026 17:38:22 GMT</pubDate>
            <atom:updated>2026-07-19T17:38:22.111Z</atom:updated>
            <content:encoded><![CDATA[<h4>If your Oracle Cloud Fusion integrations are starting to lag, or your routine data batches are taking twice as long as they did six months ago, you are likely dealing with a silent performance killer: <strong>bloated interface tables</strong>.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NwQzELY9G_WBEUjGhmnBlA.png" /><figcaption>Purging Interface Tables Automatically</figcaption></figure><p>Oracle Fusion relies heavily on interface and staging tables to process inbound data via File-Based Data Import (FBDI) and Web Services. But once that data is successfully loaded into the application core, the leftover rows in the staging tables don’t just vanish. They sit there, piling up by the millions, forcing future batch jobs to scan through mountains of dead data.</p><p>Here is how to automate your purging strategy, keep your staging environments pristine, and prevent batch processing slowdowns.</p><h3>The Root Cause: Why Staging Bloat Slows You Down</h3><p>When you run an FBDI import, the system writes data to interface tables (like PO_INTERFACES_ALL or AP_INVOICES_INTERFACE) before validating and moving it to the base application tables.</p><p>If you don’t clean up these tables, you run into three primary issues:</p><ul><li><strong>Full Table Scans:</strong> Oracle’s database optimizer may struggle to choose the right execution plan, resulting in slow full table scans on bloated staging tables.</li><li><strong>Index Degradation:</strong> As millions of rows are inserted and left orphaned, indexes become fragmented and inefficient.</li><li><strong>Stuck Error Rows:</strong> Failed rows that are never corrected or purged remain in the interface forever, getting re-evaluated or scanned during subsequent processes.</li></ul><h3>The Master Checklist: Essential ESS Purge Jobs</h3><p>Oracle provides specific <strong>Enterprise Scheduler Service (ESS)</strong> jobs designed to safely wipe out processed and errored data from interface tables. You should schedule these to run automatically.</p><h3>1. Financials (ERP) Interface Purging</h3><p>For AP Invoices, AR Transactions, and General Ledger interfaces, use the module-specific purge parameters or the overarching framework jobs.</p><ul><li><strong>Purge Interface Tables:</strong> Cleans up <strong>Every Process</strong>. Run this after every major journal import cycle.</li><li><strong>Purge AutoInvoice Interface Data (Receivables):</strong> Cleans up the staging tables used for high-volume customer payment receipts.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*CJUUYHflLgx39JJfPxFQwA.png" /><figcaption>ESS Job to purge GL Interface Data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*7XUdGuimH0Rc2OrpTyEfnA.png" /><figcaption>Purge Autoinvoice Interface Data</figcaption></figure><h3>2. Supply Chain Management (SCM) Interface Purging</h3><p>SCM interface tables grow incredibly fast due to continuous inventory, shipping, and purchasing transactions.</p><ul><li><strong>Delete Orders from Interface Tables:</strong> Cleans up the pricing and sales order staging tables (DOO_HEADERS_INT, DOO_LINES_INT).</li><li><strong>Purge Purchasing Interface Process:</strong> Targets the purchase order and requisitions staging tables.</li><li><strong>Purge Inventory Transactions Interface:</strong> Essential for high-volume warehouses to clear out stuck inventory material transactions (MTL_TRANSACTIONS_INTERFACE).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*38wpdRP9EcCh2UIaGZNf1Q.png" /><figcaption>Delete Order from Interface tables</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*Hb7BgkGiCGascvbhUVqt7Q.png" /><figcaption>Purge Processed Open Interface</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*HvmVOxXo42-mMEMS3jR0aQ.png" /><figcaption>Purge Inventory Transactions Interface Process</figcaption></figure><h3>Automation Blueprint: Best Practices for Scheduling</h3><p>Running these jobs manually when the system slows down is a reactive trap. You need an automated, proactive cadence.</p><h3>The Standard Scheduling Cadence</h3><p><strong>Data Status — — — — — — — — — — Retention Period —Frequency of ESS Job<br>Successfully Processed Data — — </strong>7 Days — — — — — — <strong>Weekly<br>Errored / Rejected Data — — — — -</strong>30 Days — — — — — — <strong>Monthly<br>Stale / Abandoned Batches — — — </strong>60 Days — — — — — — <strong>Quarterly</strong></p><blockquote><strong><em>Pro-Tip on Errored Data:</em></strong><em> Never purge errored data instantly. Give your business analysts and integration teams a rolling 14-to-30-day window to review, correct, and reprocess failed records via the UI spreadsheets.</em></blockquote><h3>Step-by-Step: How to Schedule a Purge Job</h3><ol><li>Navigate to <strong>Tools</strong> &gt; <strong>Scheduled Processes</strong>.</li><li>Click <strong>Schedule New Process</strong> and search for the “Purge Interface Tables”.</li><li>Set your parameters: Choose <strong>Import Process </strong>that you want to purge (e.g., Import Supplier, Import Journals) and set a relative Load Request ID(e.g., Age = 7).</li><li>Click the <strong>Advanced</strong> button at the top right.</li><li>Go to the <strong>Schedule</strong> tab, select <strong>Using a schedule</strong>, and set it to run weekly (e.g., every Sunday at 1:00 AM when system traffic is lowest).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5yKq_tPG4OqaeypssdjH7A.png" /><figcaption>GL Interface Data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*CJUUYHflLgx39JJfPxFQwA.png" /><figcaption>ESS Job to purge GL Interface Data</figcaption></figure><h3>4 Golden Rules for Interface Hygiene</h3><p>To ensure your automated purges don’t disrupt business operations, follow these architectural rules:</p><ol><li><strong>Align Purge Jobs with Integration Cycles:</strong> If your middleware (like OIC or MuleSoft) pushes data hourly, schedule your “Success” purges for the weekend. Do not run heavy purges during peak operational hours.</li><li><strong>Monitor the ‘Error’ Status Closely:</strong> A high volume of un-purged errors usually indicates a broken integration that is continuously dumping bad data into the system. Use OTBI alerts to track interface error counts.</li><li><strong>Don’t Forget WebCenter Content (UCM):</strong> FBDI files are physically stored on the Universal Content Management server before being loaded to the interface. Ensure you are also running the <strong>Purge IT Infrastructure Logs and Files</strong> or UCM-specific cleanup jobs to free up SaaS storage.</li><li><strong>Test in Lower Environments:</strong> Before activating an aggressive weekly purge schedule in Production, roll it out in your Test or Stage environments to ensure it doesn’t prematurely wipe out data needed by ongoing projects.</li></ol><h3>Conclusion</h3><p>Automating the cleanup of your Fusion interface tables is one of the easiest, most impactful performance wins an administrator can achieve. By setting up these ESS jobs to run silently in the background, you ensure your database indexes remain lean, your batch execution plans stay optimized, and your integrations run at lightning speed.</p><p><em>Don’t wait for a critical quarter-end processing bottleneck to realize your staging tables hold 50 million rows of dead data. Set up your automated purge schedule this week!</em></p><blockquote>Feel free to reach out for consulting, troubleshooting, or just to chat about all things Oracle Fusion and ERP reporting!</blockquote><p><strong>📧 </strong><a href="/service/mailto:dksingh.ops@gmail.com"><strong>Email</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/devvkumar/"><strong>💼 LinkedIn</strong></a><strong>, </strong><a href="https://devvkumar.netlify.app/">🌐 Portfolio</a></p><blockquote><em>💬 </em><strong><em>Have a quick question?</em></strong><em> Drop a comment below this post, and I’ll do my best to get back to you with a solution!</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb5bc47b9091" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Customize Standard OTBI Dashboards in Oracle Fusion]]></title>
            <link>https://medium.com/@dksingh.ops/how-to-customize-standard-otbi-dashboards-in-oracle-fusion-a2599aa3779b?source=rss-aed5e79be33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2599aa3779b</guid>
            <dc:creator><![CDATA[Dev Kumar]]></dc:creator>
            <pubDate>Wed, 15 Jul 2026 15:55:32 GMT</pubDate>
            <atom:updated>2026-07-15T15:55:32.008Z</atom:updated>
            <content:encoded><![CDATA[<h4>Oracle Transactional Business Intelligence (OTBI) is a powerful tool, but let’s be honest: the standard, out-of-the-box dashboards don’t always fit your organization’s unique quirks. Maybe you need an extra column, a different filter, or a complete visual overhaul.</h4><p>The good news? You don’t need to build a brand-new dashboard from scratch. Oracle Fusion allows you to customize standard dashboards safely without losing the underlying seeded logic. Here is your step-by-step guide to doing it right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ySgsIacAIqGnXF7YbOqFVw.png" /></figure><h3>The Golden Rule: Never Edit the Original</h3><p>Before you click anything, remember the ultimate rule of Oracle Fusion customization: <strong>Never directly modify seeded objects in the </strong><strong>Shared Folders directory.</strong> If you do, the next quarterly Oracle update will likely overwrite your hard work, leaving you back at square one. Instead, we use the <strong>&quot;Copy and Customize&quot;</strong> method using the Custom folder. Oracle is hardcoded to look into the Custom folder first; if a matching path exists there, it overrides the standard version.</p><h3>Step-by-Step Guide to Customizing an OTBI Dashboard</h3><h3>Step 1: Locate the Standard Dashboard</h3><ol><li>Log into Oracle Fusion and navigate to <strong>Tools</strong> &gt; <strong>Reports and Analytics</strong>.</li><li>Click <strong>Browse Catalog</strong> to open the BI interface.</li><li>In the folder tree on the left, navigate through Shared Folders to find the dashboard you want to edit (e.g., Shared Folders &gt; Procurement&gt; Supplier Profile Change &gt; Transactional Analysis Samples).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_DlrY_5IZDrxlSbiEiiHTQ.png" /><figcaption>Standard OTBI Dashboard Path</figcaption></figure><h3>Step 2: Replicate the Folder Structure in “Custom”</h3><p>To ensure Oracle maps your customized dashboard correctly, you must replicate the exact folder path inside the Custom folder.</p><ul><li><strong>Example Original Path:</strong> Shared Folders/Procurement/Supplier Profile Change Request/Transactional Analysis Samples</li><li><strong>Your Target Path:</strong> Shared Folders/Custom/Procurement/Supplier Profile Change Request/Transactional Analysis Samples</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fb0RZ9LgyfYCEIRQucdi-g.png" /><figcaption>Create New Path</figcaption></figure><blockquote><em>💡 </em><strong><em>Tip:</em></strong><em> If the subfolders don’t exist under </em><em>Custom yet, simply create them one by one using the </em><strong><em>New Folder</em></strong><em> icon in the catalog toolbar.</em></blockquote><h3>Step 3: Copy and Paste the Dashboard</h3><ol><li>Go back to the standard dashboard in its original Shared Folders location.</li><li>Select the dashboard or the specific report/analysis within it, and click <strong>Copy</strong> from the tasks panel.</li><li>Navigate to your newly created path inside the <strong>Custom</strong> folder.</li><li>Click <strong>Paste</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*eH7Y0sdRuzNGWm2N4YSgxw.png" /><figcaption>Copy Standard OTBI Report</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_OE4A3RUL3jZR2SoJd-n9A.png" /><figcaption>Paste on Custom Replicate Folder</figcaption></figure><h3>Step 4: Edit the Components</h3><p>Now that your dashboard is safe in the Custom folder, you can modify it without fear.</p><ul><li><strong>To edit the layout:</strong> Click <strong>Edit</strong> on the dashboard object. Here, you can drag and drop new columns, remove sections, change text, or re-arrange the prompts.</li><li><strong>To edit underlying analyses:</strong> Dashboards are just containers for individual reports (analyses). If you need to add a data field, click <strong>Edit</strong> on the specific analysis inside your custom folder. Go to the <strong>Criteria</strong> tab to add new columns from the Subject Areas, or the <strong>Results</strong> tab to alter graphs and tables.</li></ul><h3>Step 5: Verify and Test</h3><p>Once you’ve saved your changes, it’s time to test:</p><ol><li>Clear your browser cache or open an incognito window.</li><li>Navigate to the Fusion page where the dashboard is embedded, or run it directly from the BI Catalog.</li><li>Ensure the data renders correctly and the new fields behave as expected.</li></ol><h3>Best Practices for a Seamless Customization</h3><ul><li><strong>Keep Names Identical:</strong> When copying to the Custom folder, keep the dashboard and analysis names exactly the same as the original. This ensures Oracle&#39;s mapping flags pick up your custom version seamlessly.</li><li><strong>Document Your Changes:</strong> Oracle updates happen every quarter. While the Custom folder protects your work from being overwritten, it&#39;s smart practice to keep a log of what you changed in case a new feature or data model change impacts your logic.</li><li><strong>Watch Performance:</strong> Adding too many complex filters or mixing heavy Subject Areas can slow your dashboard down. Keep it lean!</li></ul><p>Customizing your OTBI dashboards ensures your team gets the exact data they need, right where they expect to see it. Happy reporting!</p><h3>Need Help with Your Oracle Fusion Customizations? Let’s Connect!</h3><p>If you ran into a snag while setting up your /Custom folder paths or need help building complex OTBI analyses, I’d love to help you sort it out.</p><p>Feel free to reach out for consulting, troubleshooting, or just to chat about all things Oracle Fusion and ERP reporting!</p><p><strong>📧 </strong><a href="/service/mailto:dksingh.ops@gmail.com"><strong>Email</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/devvkumar/"><strong>💼 LinkedIn</strong></a><strong>, </strong><a href="https://devvkumar.netlify.app/">🌐 Portfolio</a></p><blockquote><em>💬 </em><strong><em>Have a quick question?</em></strong><em> Drop a comment below this post, and I’ll do my best to get back to you with a solution!</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2599aa3779b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Your Procurement BU is Blank | Configure PO in Oracle Fusion]]></title>
            <link>https://medium.com/@dksingh.ops/why-your-procurement-bu-is-blank-configure-po-in-oracle-fusion-c3743b85cc0c?source=rss-aed5e79be33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3743b85cc0c</guid>
            <dc:creator><![CDATA[Dev Kumar]]></dc:creator>
            <pubDate>Sun, 28 Jun 2026 12:41:29 GMT</pubDate>
            <atom:updated>2026-06-28T12:41:29.320Z</atom:updated>
            <content:encoded><![CDATA[<h4>If you have ever gone to create a Purchase Order (PO) or Requisition in Oracle Fusion, clicked the <strong>Procurement BU</strong> dropdown, and been greeted by a completely blank list, you are not alone. It is one of the most common — and frustrating — roadblocks in Oracle Fusion Cloud.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OuwrEsZKypXVqA004iIGCw.png" /></figure><p>The fix is straightforward. When a Business Unit (BU) is missing from your transactional screens, it is almost always caused by a missing link between the BU configuration, your user security, or your procurement agent status.</p><p>Here is the ultimate step-by-step setup guide to properly provision a Procurement BU and ensure it shows up for your users every time.</p><h3>Step 1: Enable the “Procurement” Business Function</h3><p>First, you must ensure that Oracle knows your Business Unit is actually allowed to perform purchasing activities.</p><ol><li>Navigate to <strong>Setup and Maintenance</strong>.</li><li>Select the <strong>Procurement</strong> functional area from the setup dropdown.</li><li>Click the task <strong>Assign Business Unit Business Function</strong>.</li><li>Under the <strong>Business Unit Functions</strong> checklist, look for <strong>Procurement</strong>, <strong>Requisitioning</strong>, and <strong>Receiving</strong>.</li><li>Ensure these checkboxes are marked <strong>Enabled</strong>.</li><li>Select your <strong>Primary Ledger</strong> and <strong>Legal Entity</strong> on the right side of the screen, then click <strong>Save and Close</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UPXWXQKW0NTZqjVGccqKYg.png" /><figcaption>Setup and Maintenance</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nx4kkdA1OjLEboW1_8uCKA.png" /><figcaption>Assign Function to BU</figcaption></figure><h3>Step 2: Configure the Procurement Business Function</h3><p>A BU cannot process POs if its foundational rulebook is missing. You must define how this specific BU should behave financially.</p><ol><li>In Setup and Maintenance, search for and open <strong>Configure Procurement Business Function</strong>.</li><li>Select your target BU as the scope.</li><li>Fill out the mandatory configuration fields, ensuring that the <strong>Default Currency</strong>, <strong>Invoice Match Option</strong>, and <strong>Bill-to Location</strong> are properly defined.</li><li>Click <strong>Save and Close</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*r4bxR9dn0EoDIz6eXXe0Kg.png" /><figcaption><strong>Tasks Search</strong> bar in Setup and Maintenance</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JPxTXUFjReHEmyFO2nhYMw.png" /><figcaption>Select your BU</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZVD3TRhzePbI-OPRE238Fg.png" /><figcaption>Configure Procurement for BU</figcaption></figure><h3>Step 3: Register the User as a “Procurement Agent”</h3><p>This is the <strong>number one missed step</strong> in Oracle Fusion Procurement. Even if a user is an administrator or has full IT access, Oracle requires them to be explicitly registered as a functional “Agent” to touch procurement documents.</p><ol><li>Search for and open the task <strong>Manage Procurement Agents</strong>.</li><li>Click the <strong>+ (Create)</strong> icon to add a new record.</li><li>Input the following Header information:<br>=&gt; <strong>Procurement BU:</strong> Select your target BU.<br>=&gt; <strong>Agent:</strong> Search and select the exact User Name / Worker Name of the person creating POs.</li><li>Go to the <strong>Action Allowed</strong> section below.</li><li>Ensure that <strong>Manage Purchase Orders</strong> and <strong>Manage Requisitions</strong> are set to <strong>Allowed</strong>.</li><li>Click <strong>Save and Close</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bnI0fxtlSMpc82uwVm3z5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bq0uap1bwGUkVEHJiA4sqQ.png" /><figcaption>Click on Create Procurement Agent</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1yrk3nPAJhVtsAQlimocTg.png" /><figcaption><strong>Add </strong>your <strong>worker </strong>who is connected with your <strong>User</strong></figcaption></figure><h3>Step 4: Grant User Data Access</h3><p>Oracle operates on a strict data security model. Having a job role (like <em>Procurement Buyer</em>) means you can use the PO screen, but <strong>Data Access</strong> determines <em>which</em> business data you are allowed to see.</p><ol><li>Search for and open the task <strong>Manage Data Access for Users</strong>.</li><li>Click the <strong>+ (Create)</strong> icon.</li><li>Enter the user configuration:<br>-&gt; <strong>User Name:</strong> The target user’s account.<br>=&gt; Buyer, Data access set, US Primary Ledger <br>=&gt; Buyer, Business unit, US1 Business Unit <br>=&gt; Buyer, Legal entity, US1 Legal Entity<br>=&gt; Buyer, Ledger, US Primary Ledger<br>=&gt; Procurement Application Administrator, Business unit, US1 Business Unit <br>=&gt; Procurement Manager, Data access set, US Primary Ledger <br>=&gt; Procurement Manager, Reference data set, Enterprise Set<br>=&gt; Procurement Manager, Business unit, US1 Business Unit<br>=&gt; Procurement Manager, Ledger, US Primary Ledger <br>=&gt; Procurement Manager, Reference data set, Common Set <br>=&gt; Procurement Manager, Inventory organization, ASVSANJOSE <br>=&gt; Procurement Manager, Inventory organization, ASVCHICAGO <br>=&gt; Procurement Manager, Legal entity, US1 Legal Entity <br>=&gt; Procurement Preparer, Business unit, US1 Business Unit<br>=&gt; Receiving Agent, Inventory organization, US1_INV_ORG1 <br>=&gt; Receiving Agent, Inventory organization, 001<br>=&gt; Advanced Procurement Requester, Business unit, US1 Business Unit</li><li>Click <strong>Save and Close</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0C4q7il_P9JOgWhtIWNc2g.png" /><figcaption>Search Manage Data Access for Users</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*GrGyRi8JkPvyksmqRiRpdQ.png" /><figcaption>Role and Security Context and their Value</figcaption></figure><h3>Step 5: Force the Security Sync (Crucial Final Step!)</h3><p>Oracle Fusion heavily caches security mappings. If you complete all the steps above and immediately try to create a PO, the dropdown might still look blank. You need to force Oracle to sync your changes.</p><ol><li>Go to <strong>Navigator &gt; Tools &gt; Scheduled Processes</strong>.</li><li>Click <strong>Schedule New Process</strong>.</li><li>Search for and run the process named: <strong>Retrieve Latest LDAP Changes</strong>.</li><li>Once the process status reads <em>Succeeded</em>, <strong>log out of Oracle Fusion entirely</strong>, clear your browser cache (or open an Incognito/Private window), and log back in.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*29nJDV7zrVSgEuX6s67HEA.png" /><figcaption><strong>LDAP </strong>Request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cr64Al0eJFcROLGvO6yonA.png" /><figcaption>Submit this job</figcaption></figure><h3>Summary Checklist</h3><p>The next time your Procurement BU goes missing, ask yourself these four rapid-fire questions:</p><p>⭐ Is the BU enabled for the <strong>Procurement Function</strong>?</p><p>⭐ Is the BU fully <strong>configured</strong> with a default currency and invoice matching?</p><p>⭐ Is the user set up as a <strong>Procurement Agent</strong> for that specific BU?</p><p>⭐ Does the user have <strong>Data Access</strong> mapped to that BU for their procurement role?</p><p>By keeping this checklist handy, you can resolve the “blank dropdown” mystery in less than five minutes.</p><p><em>Have questions about complex procurement architectures, like setting up a shared service model with a separate Procurement BU and Requisitioning BU? Drop a comment below!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3743b85cc0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Allow Anonymous Access to User and Business Objects in VBCS]]></title>
            <link>https://medium.com/@dksingh.ops/allow-anonymous-access-to-user-and-business-objects-in-vbcs-8f81241ebd2a?source=rss-aed5e79be33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f81241ebd2a</guid>
            <dc:creator><![CDATA[Dev Kumar]]></dc:creator>
            <pubDate>Sun, 31 May 2026 11:29:29 GMT</pubDate>
            <atom:updated>2026-05-31T11:29:29.564Z</atom:updated>
            <content:encoded><![CDATA[<p>When building enterprise applications in Oracle Visual Builder Cloud Service (VBCS), security is usually dialed up to eleven by default. Oracle expects you to secure your data. But what happens when you’re building a public-facing portal, a product catalog, or a registration page where users <em>aren’t</em> logged in yet?</p><p>To make this work, you need to open up <strong>anonymous access</strong> to your application and specific Business Objects (BOs).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JTv5l1HRLre0XCWz7fP9pw.png" /></figure><h3>Step 1: Open the Application Gates</h3><p>By default, VBCS apps require users to log in via Oracle Identity Cloud Service (IDCS) or IAM. Let’s change that.</p><ol><li>Open your Web Application in Visual Builder.</li><li>In the left navigator, select your specific web app node and open its <strong>Settings</strong>.</li><li>Navigate to the <strong>Security</strong> tab.</li><li>Look for the <strong>User Roles</strong> or <strong>Access</strong> section.</li><li>Check the box for <strong>Allow anonymous access</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*ejp84An6XjW_HQa1zfmJnQ.png" /><figcaption>Click on App Title</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VGxJdb9FhEw3kC1tIArfRQ.png" /><figcaption>Click on Security</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t6rDIhTZfhirZa39wN3I5A.png" /><figcaption>Select All Marked Options</figcaption></figure><blockquote><em>💡 </em><strong><em>Pro-Tip:</em></strong><em> Once you enable this, a new built-in role called </em><strong><em>Anonymous User</em></strong><em> becomes active in your application lifecycle. You can now use this role to conditionally hide or show UI elements (like showing a “Login” button instead of a “Logout” button).</em></blockquote><h3>Step 2: Configure Business Object Security</h3><p>Just because an anonymous user can see your web page doesn’t mean they can see your data. If you try to fetch data right now, your app will likely throw a 401 Unauthorized or 403 Forbidden error in the browser console.</p><p>We need to explicitly grant the <strong>Anonymous User</strong> role permission to interact with your Business Objects.</p><ol><li>Navigate to the <strong>Business Objects</strong> tab in your VBCS editor.</li><li>Select the specific Business Object you want to expose (e.g., ProductCatalog or PublicEvents).</li><li>Click on the <strong>Security</strong> tab for that object.</li><li>Click the <strong>Edit icon</strong> (the pencil) to override the default security settings.</li><li>Locate the <strong>Anonymous User</strong> row.</li><li>Check the boxes for the specific operations you want to allow:</li></ol><ul><li><strong>Read:</strong> (Most Common) Allows guests to view the data.</li><li><strong>Create:</strong> Useful if guests are submitting a contact form or registering an account.</li><li><strong>Update/Delete:</strong> <em>Exercise extreme caution here.</em> You rarely want unauthenticated guests changing or deleting existing data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R-ZzJ4neyQrc0IVWORJtGA.png" /><figcaption>Select security option in BO</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*preNAHfTCS3JWM4VSj_ocw.png" /><figcaption>Allow permission to anonymous user</figcaption></figure><h3>Step 3: Handle User Object Context (The Gotcha!)</h3><p>If your Business Object has a relationship with the standard <strong>User object</strong> (for example, a CreatedBy or LastUpdatedBy field, or a custom assignment to a User), you might run into an issue.</p><p>When an anonymous user creates a record (like a public inquiry form), VBCS needs to know how to handle the user context.</p><ul><li><strong>The Problem:</strong> Anonymous users don’t have a valid User ID in the system.</li><li><strong>The Solution:</strong> Ensure that your Business Object fields don’t strictly require a valid, authenticated foreign key to the User object upon creation. If you are tracking who created it, ensure the field allows null values, or use a generic “Guest” flag in your logic.</li><li><strong>Accessing User Profiles:</strong> If your app needs to display a list of internal business users to an anonymous guest (e.g., a “Find an Agent” directory), you must go to the <strong>User Business Object security settings</strong> and explicitly grant <strong>Read</strong> access to the Anonymous User role.</li></ul><h3>⚠️ Essential Security Best Practices</h3><p>Before you hit “Publish,” keep these safety guardrails in mind:</p><ul><li><strong>The Principle of Least Privilege:</strong> Only grant the absolute minimum permissions required. If a guest only needs to read a list, do <em>not</em> check the Create, Update, or Delete boxes.</li><li><strong>Use Endpoint Filters:</strong> If you are exposing a Business Object to the public, restrict the fields returned. You can do this by creating a specific <strong>Resource View</strong> or filtering the payload so sensitive backend data isn’t exposed in the network payload.</li><li><strong>Rate Limiting &amp; Captcha:</strong> If you allow anonymous users to <em>Create</em> records (e.g., a sign-up form), implement a Captcha or backend validation to prevent bots from spamming your VBCS database and exhausting your storage/OIC limits.</li></ul><p><em>Have questions about optimizing your VBCS action chains or mapping complex REST APIs? Drop a comment below!</em></p><p><strong>Enjoyed this Blog?</strong></p><ul><li>✉️ Join my <a href="https://medium.com/@dksingh.ops"><em>devvkumar</em> </a>for exclusive updates.</li><li>🌐 Check out my <a href="https://devvkumar.netlify.app/"><em>portfolio</em></a>.</li><li>💬 Let’s connect on <a href="https://www.linkedin.com/in/devvkumar/"><em>Linkedin</em></a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f81241ebd2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Master-Detail Relationship in Oracle VBCS: A Step-by-Step Guide]]></title>
            <link>https://medium.com/@dksingh.ops/master-detail-relationship-in-oracle-vbcs-a-step-by-step-guide-aff113f71edd?source=rss-aed5e79be33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/aff113f71edd</guid>
            <dc:creator><![CDATA[Dev Kumar]]></dc:creator>
            <pubDate>Mon, 25 May 2026 09:05:38 GMT</pubDate>
            <atom:updated>2026-05-25T09:05:38.553Z</atom:updated>
            <content:encoded><![CDATA[<p>When building enterprise applications in Oracle Visual Builder Cloud Service (VBCS), displaying related data is one of the most common requirements. Whether it’s <strong>Departments and Employees</strong>, <strong>Orders and Line Items</strong>, or <strong>Customers and Addresses</strong>, you need a way to build a <strong>Master-Detail (Parent-Child)</strong> relationship.</p><p>In this tutorial, we will walk through how to set up a parent-child relationship in VBCS and display it beautifully using two connected Tables.</p><h3>The Use Case</h3><p>We will create a page with two tables:</p><ol><li><strong>Master Table:</strong> Displays a list of Employees(Parent).</li><li><strong>Detail Table:</strong> Displays Employees Addess (Child) belonging <em>only</em> to the selected Department.</li></ol><h3>Step 1: Define the Data Model (Business Objects)</h3><p>Before building the UI, your data must understand how it connects.</p><ol><li>Go to <strong>Business Objects</strong> in your VBCS application.</li><li>Create a EmpAddress Business Object (Fields: id, EmpID, location).</li><li>Create an Employee Business Object (Fields: id, name, email).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*cdS-8nD8QMDnF7IhW5Iugg.png" /><figcaption>Employee and EmpAddress Business Object</figcaption></figure><h3>Step 2: Design the UI Layout</h3><p>Next, let’s build the interface where the magic happens.</p><ol><li>Open your main application page and drag a <strong>Flex Container</strong> or <strong>Grid Rows</strong> onto the canvas to split your screen (e.g., top and bottom, or left and right). (Not Important)</li><li>Drag a <strong>Table component</strong> into the first section. Label this <strong>Employee (Master)</strong>.</li><li>Drag a second <strong>Table component</strong> into the next section. Label this <strong>EmpAddress (Detail)</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jRosrHk-E48YXhtkXDgfpQ.png" /><figcaption>Adding Table for Employee and EmpAdress</figcaption></figure><h3>Step 3: Populate the Master Table</h3><ol><li>Select the <strong>Master Table</strong> (Departments).</li><li>Use the <strong>Quick Start</strong> wizard on the right panel and click <strong>Add Data</strong>.</li><li>Select the Employee Business Object and choose the fields you want to display (name, EmpID).</li><li>VBCS will automatically create a Service Data Provider (employeeListSDP) to feed this table.</li></ol><blockquote>Also Same with EmpAddress VBCS will automatically create a Service Data Provider empaddressListSDP.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Njq4JrQklJvLynKaqMqC2g.png" /><figcaption>Adding Data into Tables</figcaption></figure><h3>Step 4: Create a Variable to Hold the Selected Parent ID</h3><p>To filter the child table, the application needs to “remember” which parent row the user clicked.</p><ol><li>Go to the <strong>Variables</strong> tab of your page.</li><li>Create a new variable named selectEmpId.</li><li>Set its type to <strong>String</strong> or <strong>Number</strong> (matching your BO’s ID type).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MZ0PzI5YvoorWR3uBJqh_g.png" /><figcaption>Create a variable</figcaption></figure><h3>Step 5: Capture the “Row Selection” Event</h3><p>Now, we need to update our variable whenever a user clicks a row in the Department table.</p><ol><li>Go back to the Page Designer and select the <strong>Master Table</strong>.</li><li>In the Properties pane, go to the <strong>Events</strong> tab and click <strong>+ New Event</strong>.</li><li>Select the <strong>First Selected Row</strong> event (or ojFirstSelectedRow change event).</li><li>VBCS will generate an Action Chain. Drag an <strong>Assign Variables</strong> action into the chain.</li><li>Map the id from the current row data to your page variable selectedDepartmentId.</li></ol><blockquote><em>💡 </em><strong><em>Tip:</em></strong><em> Make sure to handle “empty” selections so the child table clears out if a user deselects a row!</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gk-sbPT60gAAA8Isd3DHYQ.png" /><figcaption>Adding First Selected Row Event</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hsDwdPtIBtLO5tjX46TgDA.png" /><figcaption>Assign value in selectEmpID variable</figcaption></figure><p>Proof</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2BAlHfDLpt0x3YriYsxlQ.png" /><figcaption>Action Chain Fire Result</figcaption></figure><h3>Step 6: Filter the Detail Table</h3><p>Finally, let’s ensure the EmpAddress table only shows data when a Employee is selected.</p><ol><li>go to the <strong>Variables</strong> tab of the page and locate the newly created empAddressListSDP.</li><li>Select empAddressListSDP and look at the properties pane on the right. Find the <strong>Filter Criterion</strong> section.</li><li>Add a filter condition:</li></ol><ul><li><strong>Field:</strong> Employee_id (in EmpAddressID BO (Detail Table))</li><li><strong>Operator:</strong> $eq (Equals)</li><li><strong>Value:</strong> {{ $page.variables.selectedDepartmentId }}</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VM4sYRjajWiHYL_ZqW8nlg.png" /><figcaption>Adding Filter Criteria in detail table SDP variable</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CohC7Yb8b2QOe43fy5GPIQ.png" /><figcaption>Adding condition to filter out data</figcaption></figure><h3>Step 7: Test the Implementation</h3><p>Run your application!</p><ul><li>When the page loads, the Master table fills up, and the Detail table should be empty (or waiting for input).</li><li>Click on a Employee row.</li><li>The Action Chain fires, updates selectEmpId, triggers the employeeListSDP to reload, and the EmpAddress table instantly refreshes with the correct filtered data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UDY90vXFGzXxHgWNKU5nXQ.png" /><figcaption>Output 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6A8pdREet3bE0j4JICWfMg.png" /><figcaption>Output 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kgINBpGG9m-fOwu1faAGFA.png" /><figcaption>Output 3</figcaption></figure><h3>Best Practices for VBCS Master-Detail Views</h3><ul><li><strong>Conditional Visibility:</strong> Use a bind-if or oj-bind-if on the Detail Table so it stays hidden until selectEmpId is actually populated. This prevents empty tables from cluttering the UI.</li><li><strong>Pagination:</strong> Ensure your SDPs have fetch triggers enabled if you are dealing with large datasets.</li><li><strong>REST Queries:</strong> If you are using external REST APIs instead of Business Objects, look into using the q parameter or tracking query parameters dynamically through the SDP configurations.</li></ul><h3>Conclusion</h3><p>Setting up a master-detail or parent-child relationship in Oracle VBCS is incredibly straightforward once you understand how to bridge the two components using page variables and SDP filters.</p><p><em>Have questions about optimizing your VBCS action chains or mapping complex REST APIs? Drop a comment below!</em></p><p><strong>Enjoyed this Blog?</strong></p><ul><li>✉️ Join my <a href="https://medium.com/@dksingh.ops"><em>devvkumar</em> </a>for exclusive updates.</li><li>🌐 Check out my <a href="https://devvkumar.netlify.app/"><em>portfolio</em></a>.</li><li>💬 Let’s connect on <a href="https://www.linkedin.com/in/devvkumar/"><em>Linkedin</em></a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aff113f71edd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>