(3)
OE_CONCAT_VALUES包代码:
PACKAGE BODY oe_concat_values IS
PROCEDURE line_shipment_option(line_number IN NUMBER,
shipment_number IN NUMBER,
option_number IN NUMBER,
p_concat_value OUT VARCHAR2,
component_number IN NUMBER DEFAULT NULL,
service_number IN NUMBER DEFAULT NULL) IS
BEGIN
--=========================================
-- Added for identifying Service Lines
--=========================================
IF service_number IS NOT NULL THEN
IF option_number IS NOT NULL THEN
IF component_number IS NOT NULL THEN
p_concat_value := line_number || '.' || shipment_number || '.' ||
option_number || '.' || component_number || '.' ||
service_number;
ELSE
p_concat_value := line_number || '.' || shipment_number || '.' ||
option_number || '..' || service_number;
END IF;
--- if a option is not attached
ELSE
IF component_number IS NOT NULL THEN
p_concat_value := line_number || '.' || shipment_number || '..' ||
component_number || '.' || service_number;
ELSE
p_concat_value := line_number || '.' || shipment_number || '...' ||
service_number;
END IF;
END IF; /* if option number is not null */
-- if the service number is null
ELSE
IF option_number IS NOT NULL THEN
IF component_number IS NOT NULL THEN
p_concat_value := line_number || '.' || shipment_number || '.' ||
option_number || '.' || component_number;
ELSE
p_concat_value := line_number || '.' || shipment_number || '.' ||
option_number;
END IF;
--- if a option is not attached
ELSE
IF component_number IS NOT NULL THEN
p_concat_value := line_number || '.' || shipment_number || '..' ||
component_number;
ELSE
/*Bug2848734 - Added IF condition */
IF (line_number IS NULL AND shipment_number IS NULL) THEN
p_concat_value := NULL;
ELSE
p_concat_value := line_number || '.' || shipment_number;
END IF;
END IF;
END IF; /* if option number is not null */
END IF; /* if service number is not null */
END line_shipment_option;
END oe_concat_values;