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:
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
Excellent ..... very useful function on OM processes....
ReplyDeleteAmazing.... I didn't know this all these years. Its so easy to use. Thank you Kiran.
ReplyDelete|| DECODE (oola.service_number,
ReplyDeleteNULL,
NULL,
DECODE (oola.component_number, NULL, '.')
|| '.'
Change to this
Article has correct information and the query is correct. If changed as per this comment, a dot will be missed for Service Lines.
Deleteperfect sql to cover null values, Thanks a lot!
ReplyDeleteThanks a lot! This is was very helpful.
ReplyDelete