Showing posts with label concat_line_number. Show all posts
Showing posts with label concat_line_number. Show all posts

Thursday, May 23, 2013

Concatenated Sales Order Line Number - Oracle Applications OrderManagement

Concatenated Sales Order Line Number in Oracle Applications Order Management

Wondering there should be an easy way to get the concatenated sales order line number in Oracle Applications Order Management? Tired of writing a concatenation logic with NVL/DECODE conditions? Here is the amazing solution.


Syntax:
SELECT oe_order_misc_pub.get_concat_line_number (<line_id>) so_line_number
  FROM DUAL


Example:

SELECT oe_order_misc_pub.get_concat_line_number (22366203) so_line_number
  FROM DUAL 



If you follow the traditional way here how it looks like


SELECT oola.line_number
             || '.'
             || oola.shipment_number
             || DECODE (oola.option_number, NULL, NULL, '.' || oola.option_number)
             || DECODE (oola.component_number,
                   NULL, NULL,
                   DECODE (oola.option_number, NULL, '.') || '.' || oola.component_number)
             || DECODE (oola.service_number,
                        NULL,
                        NULL,
                           DECODE (oola.option_number, NULL, '.')
                        || DECODE (oola.component_number, NULL, '.')
                        || '.'
                        || oola.service_number
                ) so_line_number
FROM oe_order_lines_all oola
WHERE oola.line_id = 22366203;



***Please leave a comment***