PROCEDURE SDM_OPERATION_CLASS_SELECT ( P_CURSOR OUT TYPES.TCURSOR
, W_SOB_ID IN SDM_OPERATION_CLASS.SOB_ID%TYPE
, W_ORG_ID IN SDM_OPERATION_CLASS.ORG_ID%TYPE
, W_OP_CLASS_ID IN SDM_OPERATION_CLASS.OP_CLASS_ID%TYPE
, W_ENABLED_FLAG IN SDM_OPERATION_CLASS.ENABLED_FLAG%TYPE )
IS
V_LOCAL_DATE DATE := GET_LOCAL_DATE(W_SOB_ID);
BEGIN
OPEN P_CURSOR FOR
SELECT SOC.OP_CLASS_CODE
, SOC.OP_CLASS_DESCRIPTION
, EAPP_COMMON_G.GET_LOOKUP_DESC(SOC.SOB_ID, SOC.ORG_ID, 'OPERATION_WORKING_TYPE', SOC.WORKING_TYPE_LCODE) AS WORKING_TYPE_DESC
, AC.ACCOUNT_CODE
, AC.ACCOUNT_DESC
, AC.ACCOUNT_CONTROL_ID
, SOC.EFFECTIVE_DATE_FR
, SOC.EFFECTIVE_DATE_TO
, SOC.ENABLED_FLAG
, SOC.OP_CLASS_ID
, SOC.WORKING_TYPE_LCODE
FROM SDM_OPERATION_CLASS SOC
, FI_ACCOUNT_CONTROL AC
WHERE SOC.ACCOUNT_CONTROL_ID = AC.ACCOUNT_CONTROL_ID(+)
AND SOC.SOB_ID = W_SOB_ID
AND SOC.ORG_ID = W_ORG_ID
AND SOC.OP_CLASS_ID = NVL(W_OP_CLASS_ID, SOC.OP_CLASS_ID)
AND ((W_ENABLED_FLAG = 'N' AND 1 = 1)
OR (W_ENABLED_FLAG = 'Y' AND SOC.ENABLED_FLAG = 'Y'
AND V_LOCAL_DATE BETWEEN SOC.EFFECTIVE_DATE_FR
AND NVL(SOC.EFFECTIVE_DATE_TO, V_LOCAL_DATE)))
ORDER BY SOC.OP_CLASS_CODE;
END;
문인데요
P_CURSOR 가 하는 역활과...
OPEN P_CURSOR FOR <---- 이부분이 몬지 모르겠네요
고수분들 답변 부탁드리겠습니다 ^^