The following lines contain the word 'select', 'insert', 'update' or 'delete':
* updated to 3. It then checks for a change made to line in configurator and
* if a delta is found, the config_mode is updated to 4 and returned. If no
* delta is found, the config_mode is retained at 3 and returned.
*
* II. p_line_id (If no top_model_line_id is passed, then API checks for this)
*
* The API checks for a baseline revision in the CZ/OM tables and if no
* baseline exists, config_mode is returned as 1 (new configuration).
* If a baseline revision for the line is found in CZ/OM tables, config_mode
* is set to 3. It then proceeds to check for a change made to line in
* configurator. If such a delta exists, the config_mode is set to 2 and
* returned. Else value of 3 is retained and returned.
*
* If the config_mode is returned as NULL, it is to be interpreted that there
* is some error (either the line is not part of container model or OTHERS
* exception in OE_CONFIG_TSO_PVT.Get_MACD_Action_Mode)
*
* IMPORTANT: If the correct mode is to be obtained, then a top model line
* must be passed ONLY into p_top_model_line_id (and not into p_line_id)
* Similarly, for a child line of a container model, the line_id should
* be passed ONLY into p_line_id (and not into p_top_model_line_id). Since SQL
* goes in order of top_model_line_id and then line_id, when a child line
* is being passed, the child line's line_id should be passed to p_line_id
* and the p_top_model_line_id should necessarily be NULL
*
*/
PROCEDURE Get_MACD_Action_Mode
(
p_line_id IN NUMBER := NULL
,p_top_model_line_id IN NUMBER := NULL
,x_config_mode OUT NOCOPY NUMBER
,x_return_status OUT NOCOPY VARCHAR2
)
IS
l_debug_level CONSTANT NUMBER := OE_DEBUG_PUB.G_DEBUG_LEVEL;
SELECT org_id
INTO l_org_id
FROM oe_order_lines_all
WHERE line_id = p_line_id;