Ref cursor stopped returning values for the output.
Hi Everyone,
My DB version is
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Please do have a look at the code, and let me know where I've gone wrong, because select query is fetching data. Previously procedure was returning values too through ref cursor. Please correct me where I've gone wrong.
create or replace
PROCEDURE
SPL_SPN_MISSING_EMR_AOE_DTL (IN_PATIENT_ID NUMBER,
IN_FACILITY_ID NUMBER,
IN_DRAW_DT DATE,
IN_REQUISITION_NUMBER ORDER_REQUISITION_HEADER.REQUISITION_NUMBER%TYPE,
IN_CORP_ACRONYM CORPORATION.CORPORATION_ACRONYM%TYPE,
IN_ABCDEF_MRN PATIENT.ABCDEF_MRN%TYPE,
IN_ACCOUNT_NUMBER FACILITY_ACCOUNT_DETAIL.ACCOUNT_NUMBER%TYPE,
IN_HLAB_NUM FACILITY_ACCOUNT_DETAIL.HLAB_NUM%TYPE,
OV_COMMENTS OUT VARCHAR2,
OR_QUES_AND_ANS OUT SYS_REFCURSOR) AS
* Copyright (C) 2013 ABCDEF Laboratories
* All Rights Reserved
* This Work Contains Trade Secrets And Confidential Material Of
* ABCDEF Laboratories., And Its Use Of Disclosure In Whole Or In Part
* Without Express Written Permission Of ABCDEF Laboratories Is Prohibited.
* Company : ABCDEF Laboratories
* Project : ABCDEF Scorpion
* Name : SPL_SPN_MISSING_EMR_AOE_DTL
* In Parameters : In_Patient_Id Number
* In_Facility_Id Number
* In_Draw_Dt Date
* In_Requisition_Number Order_Requisition_Header.Requisition_Number%Type,
* In_Corp_Acronym Corporation.Corporation_Acronym%Type
* In_ABCDEF_Mrn Patient.ABCDEF_Mrn%Type
* In_Account_Number Facility_Account_Detail.Account_Number%Type
* In_Hlab_Num Facility_Account_Detail.Hlab_Num%Type
* Out Parameters : OV_COMMENTS Out Varchar2
* OR_QUES_AND_ANS Out Sys_Refcursor
* Description : This Procedure Will Fetch The Mising Emr Aoe Detail And Provide
* Necessary Comments As Well.
* Modification History :
* Date Version No. Author Description
* 21/01/2014 1.0 ABCDEF Initial Version
* 27/01/2014 1.1 ABCDEF Restricted the output for duplicate questions
* and answers, partially answered AOE. Also renamed
* the output variable names.
CC_PACKAGE_NAME CONSTANT VARCHAR2(50) := 'SPL_SPN_MISSING_EMR_AOE_DTL';
CC_PROCEDURE_NAME CONSTANT VARCHAR2(50) := 'SPL_SPN_MISSING_EMR_AOE_DTL';
VC_AVL_PAT_QUES VARCHAR2(1000);
VC_DUP_PAT_QUES VARCHAR2(1000);
VC_ACTUAL_QUES VARCHAR2(1000);
VC_ACTUAL_QUES_CNT NUMBER:= 0;
VR_QUES_AND_ANS SYS_REFCURSOR;
VN_AVL_PAT_QUES_CNT NUMBER := 0;
VN_DUP_PAT_QUES_CNT NUMBER := 0;
VN_EXACT_PAT_ID_CNT NUMBER := 0;
VN_DUPL_PAT_ID NUMBER := 0;
VN_EXTERNAL_ID PATIENT.EXTERNAL_ID%TYPE;
VC_OBX_QUES VARCHAR2(1000);
VC_OBX_QUES_CNT NUMBER := 0;
VN_OBX_QUES_CNT NUMBER := 0;
PAT_EXTERNAL_ID PATIENT.EXTERNAL_ID%TYPE;
VC_EXACT_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_EXACT_PAR_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_DUPL_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_DUPL_PAR_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_REJECTED_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_REJECTED_PAR_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_COMMENTS VARCHAR2(100);
VC_PAR_COMMENTS VARCHAR2(100);
VC_RETURN_EXACT_PAT CHAR(1) := 'N';
VC_RETURN_DUPL_PAT CHAR(1) := 'N';
VC_RETURN_REJECT_PAT CHAR(1) := 'N';
VC_CHK_FOR_EXT_ID CHAR(1) := 'N';
VN_MAX_MSG_ID INTERFACE_A04_OBX_SEGMENT.MSG_ID%TYPE;
VN_MAX_COUNT NUMBER := 0;
VN_ITERATION_RUN NUMBER := 0;
BEGIN
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'Start of the procedure with Patient_Id:'||IN_PATIENT_ID||' Facility_Id:'||IN_FACILITY_ID||
' Draw_Dt:'||IN_DRAW_DT||' Requisition_Number:'||IN_REQUISITION_NUMBER||' Corp_Acronym:'||IN_CORP_ACRONYM||
' ABCDEF_Mrn:'||IN_ABCDEF_MRN||' Account_Number:'||IN_ACCOUNT_NUMBER||' Hlab_Num:'||IN_HLAB_NUM);
<<AOE_TEST_LOOP>>
FOR AOE_REC IN (SELECT ORD.TEST_ID
FROM ORDER_REQUISITION_DETAIL ORD
WHERE ORD.REQUISITION_HDR_ID = (SELECT ORH.REQUISITION_HDR_ID
FROM ORDER_REQUISITION_HEADER ORH
WHERE ORH.REQUISITION_NUMBER = IN_REQUISITION_NUMBER)
AND ORD.TEST_CODE IN (SELECT TEST_CODE FROM INTERFACE_ADT_AOE_MASTER WHERE SOURCE_SYSTEM = IN_CORP_ACRONYM))
LOOP
VN_ITERATION_RUN := VN_ITERATION_RUN + 1;
SELECT COUNT(DISTINCT PATIENT_ID)
INTO VN_EXACT_PAT_ID_CNT
FROM EMR_ADTAOE_DTL
WHERE PATIENT_ID = IN_PATIENT_ID
AND TEST_ID = AOE_REC.TEST_ID
AND FACILITY_ID = IN_FACILITY_ID
AND (DRAW_DATE = IN_DRAW_DT
OR DRAW_DATE = TO_DATE('2999/12/31','YYYY/MM/DD'))
AND SOURCE_SYSTEM = IN_CORP_ACRONYM ;
--Collecting all questions in interface_adt_aoe_master
SELECT STRAGG(SUB1.QUESTION_CODE), COUNT(SUB1.QUESTION_CODE)
INTO VC_ACTUAL_QUES, VC_ACTUAL_QUES_CNT
FROM (SELECT DISTINCT QUESTION_CODE FROM INTERFACE_ADT_AOE_MASTER
WHERE TEST_CODE = (SELECT TEST_CODE FROM TEST WHERE TEST_ID = AOE_REC.TEST_ID)
AND SOURCE_SYSTEM = IN_CORP_ACRONYM
ORDER BY QUESTION_CODE) SUB1;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_actual_ques:'||VC_ACTUAL_QUES ||
' vn_exact_pat_id_cnt:'||VN_EXACT_PAT_ID_CNT||
' aoe_rec.test_id:'||AOE_REC.TEST_ID||
' VN_ITERATION_RUN:'||VN_ITERATION_RUN);
<<MAIN_IF_BLOCK>>
IF
VN_EXACT_PAT_ID_CNT = 1 AND
VN_ITERATION_RUN >= 1 THEN
--Collecting avaliable questions in emr_adtaoe_dtl
SELECT STRAGG(SUB.QUESTION_CODE), COUNT(DISTINCT SUB.QUESTION_CODE)
INTO VC_AVL_PAT_QUES, VN_AVL_PAT_QUES_CNT
FROM (SELECT DISTINCT QUESTION_CODE FROM EMR_ADTAOE_DTL
WHERE TEST_ID = AOE_REC.TEST_ID
AND PATIENT_ID = IN_PATIENT_ID
AND FACILITY_ID = IN_FACILITY_ID
AND (DRAW_DATE = IN_DRAW_DT
OR DRAW_DATE = TO_DATE('2999/12/31','YYYY/MM/DD'))
AND SOURCE_SYSTEM = IN_CORP_ACRONYM
AND ANSWER IS NOT NULL
ORDER BY QUESTION_CODE) SUB;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_avl_pat_ques:'||VC_AVL_PAT_QUES||
' vn_avl_pat_ques_cnt:'||VN_AVL_PAT_QUES_CNT);
<<CASE_1_AND_2>>
IF
VC_AVL_PAT_QUES = VC_ACTUAL_QUES THEN
VC_EXACT_BOOLEAN_VAL := 'TRUE';
VC_COMMENTS := 'AOE AVAILABLE';
ELSIF--<<case_1_and_2>>
(VC_AVL_PAT_QUES != VC_ACTUAL_QUES OR VC_AVL_PAT_QUES IS NULL) AND
VN_AVL_PAT_QUES_CNT >= 0 THEN
VC_EXACT_PAR_BOOLEAN_VAL := 'TRUE';
VC_PAR_COMMENTS := 'PARTIAL AOE AVAILABLE';
END IF;--<<case_1_and_2>>
ELSIF
VN_EXACT_PAT_ID_CNT = 0 AND
VN_ITERATION_RUN > 1 THEN
VC_EXACT_PAR_BOOLEAN_VAL := 'TRUE';
VC_PAR_COMMENTS := 'PARTIAL AOE AVAILABLE';
ELSIF--<<Main_if_block>>
VN_EXACT_PAT_ID_CNT = 0 THEN
<<DUPL_PAT_LOOP>>
FOR PAT_ID_REC IN(SELECT DISTINCT PATIENT_ID
FROM PATIENT P
WHERE P.ABCDEF_MRN = IN_ABCDEF_MRN
AND EXISTS(SELECT 1 FROM EMR_ADTAOE_DTL EAD
WHERE EAD.PATIENT_ID = P.PATIENT_ID
AND EAD.TEST_ID = AOE_REC.TEST_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (EAD.DRAW_DATE = IN_DRAW_DT
OR EAD.DRAW_DATE = TO_DATE('2999/12/31','YYYY/MM/DD'))
AND EAD.SOURCE_SYSTEM = IN_CORP_ACRONYM)
AND P.PATIENT_ID != IN_PATIENT_ID)
LOOP
--Collecting avaliable questions in emr_adtaoe_dtl
SELECT STRAGG(SUB.QUESTION_CODE), COUNT(QUESTION_CODE)
INTO VC_DUP_PAT_QUES, VN_DUP_PAT_QUES_CNT
FROM (SELECT QUESTION_CODE FROM EMR_ADTAOE_DTL
WHERE TEST_ID = AOE_REC.TEST_ID
AND PATIENT_ID = PAT_ID_REC.PATIENT_ID
AND FACILITY_ID = IN_FACILITY_ID
AND (DRAW_DATE = IN_DRAW_DT
OR DRAW_DATE = TO_DATE('2999/12/31','YYYY/MM/DD'))
AND SOURCE_SYSTEM = IN_CORP_ACRONYM
AND ANSWER IS NOT NULL
ORDER BY QUESTION_CODE) SUB;
<<CASE_3_AND_4>>
IF
VC_DUP_PAT_QUES = VC_ACTUAL_QUES THEN
VC_DUPL_BOOLEAN_VAL := 'TRUE';
VC_COMMENTS := 'AOE AVAILABLE FOR DUPLICATE PATIENT';
ELSIF
VC_DUP_PAT_QUES != VC_ACTUAL_QUES AND
VN_DUP_PAT_QUES_CNT >= 0 THEN
VC_DUPL_PAR_BOOLEAN_VAL := 'TRUE';
VC_PAR_COMMENTS := 'PARTIAL AOE AVAILABLE FOR DUPLICATE PATIENT';
END IF;--<<case_3_and_4>>
VN_DUPL_PAT_ID := PAT_ID_REC.PATIENT_ID;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_dup_pat_ques:'||VC_DUP_PAT_QUES||
' vn_dup_pat_ques_cnt:'||VN_DUP_PAT_QUES_CNT||
' VC_COMMENTS:'||VC_COMMENTS||
' VC_PAR_COMMENTS:'||VC_PAR_COMMENTS);
END LOOP DUPL_PAT_LOOP;
VC_CHK_FOR_EXT_ID := 'Y';
IF
VC_CHK_FOR_EXT_ID = 'Y' THEN
<<EXTERNAL_ID_LOOP>>
FOR P_PAT_EXT_ID_REC IN (SELECT DISTINCT P.EXTERNAL_ID
FROM PATIENT P
WHERE P.ABCDEF_MRN = IN_ABCDEF_MRN
AND P.EXTERNAL_ID IS NOT NULL)
LOOP
INSERT INTO TT_A04_OBX_QUES_ANS_DTL
(SELECT IAOBX.MSG_ID, IAOBX.OBSERVATION_IDENTIFIER, IAOBX.OBSERVATION_VALUE, IAM.UOM
FROM INTERFACE_A04_OBX_SEGMENT IAOBX, INTERFACE_ADT_AOE_MASTER IAM
WHERE IAOBX.OBSERVATION_IDENTIFIER = IAM.QUESTION_CODE
AND (IAOBX.OBSERVATION_DTM = TO_CHAR(IN_DRAW_DT,'YYYYMMDD')
OR IAOBX.OBSERVATION_DTM = TO_CHAR(TO_DATE('2999/12/31','YYYY/MM/DD'),'YYYYMMDD'))
AND IAOBX.MSG_ID IN (SELECT IPID.MSG_ID
FROM INTERFACE_A04_PID_SEGMENT IPID
WHERE IPID.PATIENT_ID_EXTERNAL = P_PAT_EXT_ID_REC.EXTERNAL_ID
AND IPID.MSG_ID IN (SELECT IMSH.MSG_ID
FROM INTERFACE_A04_MSH_SEGMENT IMSH
WHERE (TRIM('W' FROM SUBSTR(IMSH.SENDING_FACILITY,5,LENGTH(IMSH.SENDING_FACILITY))) = IN_ACCOUNT_NUMBER
OR SUBSTR(IMSH.SENDING_FACILITY,2,LENGTH(IMSH.SENDING_FACILITY)) = IN_HLAB_NUM))));
BEGIN
SELECT STRAGG(SUB3.OBSERVATION_IDENTIFIER), COUNT(OBSERVATION_IDENTIFIER)
INTO VC_OBX_QUES, VC_OBX_QUES_CNT
FROM (SELECT DISTINCT OBSERVATION_IDENTIFIER
FROM TT_A04_OBX_QUES_ANS_DTL
ORDER BY OBSERVATION_IDENTIFIER)SUB3;
IF
VC_OBX_QUES = VC_ACTUAL_QUES THEN
VC_COMMENTS := 'AOE RECEIVED IN A REJECTED ADT';
VC_REJECTED_BOOLEAN_VAL := 'TRUE';
ELSIF
VC_OBX_QUES != VC_ACTUAL_QUES AND
VC_OBX_QUES_CNT > 0 THEN
VC_PAR_COMMENTS := 'PARTIAL AOE RECEIVED IN A REJECTED ADT';
VC_REJECTED_PAR_BOOLEAN_VAL := 'TRUE';
END IF;
VN_EXTERNAL_ID := P_PAT_EXT_ID_REC.EXTERNAL_ID;
EXCEPTION
WHEN NO_DATA_FOUND THEN
VC_REJECTED_BOOLEAN_VAL := 'FALSE';
VC_REJECTED_PAR_BOOLEAN_VAL := 'FALSE';
END;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_obx_ques:'||VC_OBX_QUES||
' vc_obx_ques_cnt:'||VC_OBX_QUES_CNT);
END LOOP EXTERNAL_ID_LOOP;
END IF;
END IF;--<<Main_if_block>>
END LOOP AOE_TEST_LOOP;
--Returning output as per the execution result.
IF
VC_EXACT_BOOLEAN_VAL = 'TRUE' AND
VC_EXACT_PAR_BOOLEAN_VAL = 'FALSE' THEN
OV_COMMENTS := VC_COMMENTS;
VC_DUPL_BOOLEAN_VAL := NULL;
VC_DUPL_PAR_BOOLEAN_VAL := NULL;
VC_REJECTED_BOOLEAN_VAL := NULL;
VC_REJECTED_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_EXACT_PAT := 'Y';
ELSIF
--VC_EXACT_BOOLEAN_VAL = 'TRUE' AND
VC_EXACT_PAR_BOOLEAN_VAL = 'TRUE' THEN
OV_COMMENTS := VC_PAR_COMMENTS;
VC_DUPL_BOOLEAN_VAL := NULL;
VC_DUPL_PAR_BOOLEAN_VAL := NULL;
VC_REJECTED_BOOLEAN_VAL := NULL;
VC_REJECTED_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_EXACT_PAT := 'Y';
END IF;
IF
VC_RETURN_EXACT_PAT = 'Y' THEN
--Returning result set (OV_COMMENTS,Question and Answer) for the exact patient.(Case 1 (AOE) and 2 (PARTIAL AOE))
SELECT MAX (SUB.COUNT_QUES_ANS)
INTO VN_MAX_COUNT FROM (SELECT COUNT(*) OVER (PARTITION BY EAD.QUESTION_CODE, EAD.ANSWER) AS COUNT_QUES_ANS
FROM EMR_ADTAOE_DTL EAD , INTERFACE_ADT_AOE_MASTER IAM, TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = IN_PATIENT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_REQUISITION_NUMBER) SUB;
IF
VN_MAX_COUNT > 1 THEN
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'exact patient duplicate scenario'||' vn_max_count:'||VN_MAX_COUNT);
OPEN VR_QUES_AND_ANS FOR
SELECT DISTINCT IAM.QUESTION_CODE,
(SELECT DISTINCT CASE
WHEN EAD.ANSWER IS NULL THEN NULL
WHEN LENGTH(TRIM(TRANSLATE(EAD.ANSWER, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ' '))) IS NULL THEN EAD.ANSWER
ELSE TO_CHAR(TRUNC(EAD.ANSWER * DECODE(UPPER(IAM.UOM), 'KGS', 2.20462,1),2))
END
FROM EMR_ADTAOE_DTL EAD , TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = IN_PATIENT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD.ANSWER IS NOT NULL
AND EAD.STATUS = DECODE(IAM.MATCH_TYPE, 'AT', EAD.STATUS, 'N')
) AS ANSWER
FROM INTERFACE_ADT_AOE_MASTER IAM
WHERE IAM.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND IAM.TEST_CODE IN (SELECT ORD.TEST_CODE
FROM ORDER_REQUISITION_DETAIL ORD
WHERE ORD.REQUISITION_HDR_ID = (SELECT ORH.REQUISITION_HDR_ID
FROM ORDER_REQUISITION_HEADER ORH
WHERE ORH.REQUISITION_NUMBER = IN_REQUISITION_NUMBER)
AND EXISTS (SELECT 1 FROM EMR_ADTAOE_DTL EAD1, INTERFACE_ADT_AOE_MASTER IAM1, TEST T1
WHERE ORD.TEST_ID = EAD1.TEST_ID
AND IAM1.TEST_CODE = T1.TEST_CODE
AND EAD1.SOURCE_SYSTEM = IAM1.SOURCE_SYSTEM
AND EAD1.QUESTION_CODE = IAM1.QUESTION_CODE
AND EAD1.PATIENT_ID = IN_PATIENT_ID
AND EAD1.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD1.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD1.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD1.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD1.ANSWER IS NOT NULL
AND EAD1.STATUS = DECODE(IAM1.MATCH_TYPE, 'AT', EAD1.STATUS, 'N')));
ELSIF
VN_MAX_COUNT = 1 THEN
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'exact patient unique scenario'||' vn_max_count:'||VN_MAX_COUNT);
OPEN VR_QUES_AND_ANS FOR
SELECT DISTINCT IAM.QUESTION_CODE,
(SELECT DISTINCT CASE
WHEN EAD.ANSWER IS NULL THEN NULL
WHEN LENGTH(TRIM(TRANSLATE(EAD.ANSWER, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ' '))) IS NULL THEN EAD.ANSWER
ELSE TO_CHAR(TRUNC(EAD.ANSWER * DECODE(UPPER(IAM.UOM), 'KGS', 2.20462,1),2))
END
FROM EMR_ADTAOE_DTL EAD , TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = IN_PATIENT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD.ANSWER IS NOT NULL
AND EAD.STATUS = DECODE(IAM.MATCH_TYPE, 'AT', EAD.STATUS, 'N')
) AS ANSWER
FROM INTERFACE_ADT_AOE_MASTER IAM
WHERE IAM.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND IAM.TEST_CODE IN (SELECT ORD.TEST_CODE
FROM ORDER_REQUISITION_DETAIL ORD
WHERE ORD.REQUISITION_HDR_ID = (SELECT ORH.REQUISITION_HDR_ID
FROM ORDER_REQUISITION_HEADER ORH
WHERE ORH.REQUISITION_NUMBER = IN_REQUISITION_NUMBER));
END IF;
OR_QUES_AND_ANS := VR_QUES_AND_ANS;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_exact_boolean_val:'||VC_EXACT_BOOLEAN_VAL||
' vc_exact_par_boolean_val:'||VC_EXACT_PAR_BOOLEAN_VAL||
' OV_COMMENTS:'||OV_COMMENTS);
END IF;
IF
VC_DUPL_BOOLEAN_VAL = 'TRUE' AND
VC_DUPL_PAR_BOOLEAN_VAL = 'FALSE' THEN
OV_COMMENTS := VC_COMMENTS;
VC_EXACT_BOOLEAN_VAL := NULL;
VC_EXACT_PAR_BOOLEAN_VAL := NULL;
VC_REJECTED_BOOLEAN_VAL := NULL;
VC_REJECTED_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_DUPL_PAT := 'Y';
ELSIF
--VC_DUPL_BOOLEAN_VAL = 'TRUE' AND
VC_DUPL_PAR_BOOLEAN_VAL = 'TRUE' THEN
OV_COMMENTS := VC_PAR_COMMENTS;
VC_EXACT_BOOLEAN_VAL := NULL;
VC_EXACT_PAR_BOOLEAN_VAL := NULL;
VC_REJECTED_BOOLEAN_VAL := NULL;
VC_REJECTED_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_DUPL_PAT := 'Y';
END IF;
IF
VC_RETURN_DUPL_PAT = 'Y' THEN
--Returning result set (OV_COMMENTS,Question and Answer) for the duplicate patient.(Case 3 (AOE) and 4 (PARTIAL AOE))
SELECT MAX (SUB.COUNT_QUES_ANS)
INTO VN_MAX_COUNT FROM (SELECT COUNT(*) OVER (PARTITION BY EAD.QUESTION_CODE, EAD.ANSWER) AS COUNT_QUES_ANS
FROM EMR_ADTAOE_DTL EAD , INTERFACE_ADT_AOE_MASTER IAM, TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = VN_DUPL_PAT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_REQUISITION_NUMBER) SUB;
IF
VN_MAX_COUNT > 1 THEN
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'duplicate patient duplicate scenario'||' vn_max_count:'||VN_MAX_COUNT);
OPEN VR_QUES_AND_ANS FOR
SELECT DISTINCT IAM.QUESTION_CODE,
(SELECT DISTINCT CASE
WHEN EAD.ANSWER IS NULL THEN NULL
WHEN LENGTH(TRIM(TRANSLATE(EAD.ANSWER, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ' '))) IS NULL THEN EAD.ANSWER
ELSE TO_CHAR(TRUNC(EAD.ANSWER * DECODE(UPPER(IAM.UOM), 'KGS', 2.20462,1),2))
END
FROM EMR_ADTAOE_DTL EAD , TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = VN_DUPL_PAT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD.ANSWER IS NOT NULL
AND EAD.STATUS = DECODE(IAM.MATCH_TYPE, 'AT', EAD.STATUS, 'N')
) AS ANSWER
FROM INTERFACE_ADT_AOE_MASTER IAM
WHERE IAM.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND IAM.TEST_CODE IN (SELECT ORD.TEST_CODE
FROM ORDER_REQUISITION_DETAIL ORD
WHERE ORD.REQUISITION_HDR_ID = (SELECT ORH.REQUISITION_HDR_ID
FROM ORDER_REQUISITION_HEADER ORH
WHERE ORH.REQUISITION_NUMBER = IN_REQUISITION_NUMBER)
AND EXISTS (SELECT 1 FROM EMR_ADTAOE_DTL EAD1, INTERFACE_ADT_AOE_MASTER IAM1, TEST T1
WHERE ORD.TEST_ID = EAD1.TEST_ID
AND IAM1.TEST_CODE = T1.TEST_CODE
AND EAD1.SOURCE_SYSTEM = IAM1.SOURCE_SYSTEM
AND EAD1.QUESTION_CODE = IAM1.QUESTION_CODE
AND EAD1.PATIENT_ID = VN_DUPL_PAT_ID
AND EAD1.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD1.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD1.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD1.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD1.ANSWER IS NOT NULL
AND EAD1.STATUS = DECODE(IAM1.MATCH_TYPE, 'AT', EAD1.STATUS, 'N')));
ELSIF
VN_MAX_COUNT = 1 THEN
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'duplicate patient unique scenario'||' vn_max_count:'||VN_MAX_COUNT);
OPEN VR_QUES_AND_ANS FOR
SELECT DISTINCT IAM.QUESTION_CODE,
(SELECT DISTINCT CASE
WHEN EAD.ANSWER IS NULL THEN NULL
WHEN LENGTH(TRIM(TRANSLATE(EAD.ANSWER, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ' '))) IS NULL THEN EAD.ANSWER
ELSE TO_CHAR(TRUNC(EAD.ANSWER * DECODE(UPPER(IAM.UOM), 'KGS', 2.20462,1),2))
END
FROM EMR_ADTAOE_DTL EAD , TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = VN_DUPL_PAT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD.ANSWER IS NOT NULL
AND EAD.STATUS = DECODE(IAM.MATCH_TYPE, 'AT', EAD.STATUS, 'N')
) AS ANSWER
FROM INTERFACE_ADT_AOE_MASTER IAM
WHERE IAM.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND IAM.TEST_CODE IN (SELECT ORD.TEST_CODE
FROM ORDER_REQUISITION_DETAIL ORD
WHERE ORD.REQUISITION_HDR_ID = (SELECT ORH.REQUISITION_HDR_ID
FROM ORDER_REQUISITION_HEADER ORH
WHERE ORH.REQUISITION_NUMBER = IN_REQUISITION_NUMBER));
END IF;
OR_QUES_AND_ANS := VR_QUES_AND_ANS;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_dup_pat_ques:'||VC_DUP_PAT_QUES||
' vc_dupl_boolean_val:'||VC_DUPL_BOOLEAN_VAL||
' vc_dupl_par_boolean_val:'||VC_DUPL_PAR_BOOLEAN_VAL||
' OV_COMMENTS:'||OV_COMMENTS);
END IF;
IF
VC_REJECTED_BOOLEAN_VAL = 'TRUE' AND
VC_REJECTED_PAR_BOOLEAN_VAL = 'FALSE' THEN
OV_COMMENTS := VC_COMMENTS;
VC_EXACT_BOOLEAN_VAL := NULL;
VC_EXACT_PAR_BOOLEAN_VAL := NULL;
VC_DUPL_BOOLEAN_VAL := NULL;
VC_DUPL_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_REJECT_PAT := 'Y';
ELSIF
--VC_REJECTED_BOOLEAN_VAL = 'FALSE' AND
VC_REJECTED_PAR_BOOLEAN_VAL = 'TRUE' THEN
OV_COMMENTS := VC_PAR_COMMENTS;
VC_EXACT_BOOLEAN_VAL := NULL;
VC_EXACT_PAR_BOOLEAN_VAL := NULL;
VC_DUPL_BOOLEAN_VAL := NULL;
VC_DUPL_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_REJECT_PAT := 'Y';
ELSIF
VC_REJECTED_BOOLEAN_VAL = 'FALSE' AND
VC_REJECTED_PAR_BOOLEAN_VAL = 'FALSE' THEN
--Returning result set (OV_COMMENTS) for the rejected ADT.(Case 7)
OV_COMMENTS := 'AOE NOT RECEIVED IN ADT';
OR_QUES_AND_ANS := NULL;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_obx_ques:'||VC_OBX_QUES||
' vc_rejected_boolean_val:'||VC_REJECTED_BOOLEAN_VAL||
' vc_rejected_par_boolean_val:'||VC_REJECTED_PAR_BOOLEAN_VAL||
' OV_COMMENTS:'||OV_COMMENTS);
VC_EXACT_BOOLEAN_VAL := NULL;
VC_EXACT_PAR_BOOLEAN_VAL := NULL;
VC_DUPL_BOOLEAN_VAL := NULL;
VC_DUPL_PAR_BOOLEAN_VAL := NULL;
END IF;
IF
VC_RETURN_REJECT_PAT = 'Y' THEN
--Returning result set (OV_COMMENTS,Question and Answer) for the rejected ADT.(Case 5 (AOE) and 6 (PARTIAL AOE))
--In case of multiple external id with same patient, facility and draw date; the lastest record should be picked.
SELECT MAX(MSG_ID) INTO VN_MAX_MSG_ID FROM TT_A04_OBX_QUES_ANS_DTL;
OPEN VR_QUES_AND_ANS FOR
SELECT DISTINCT IAM.QUESTION_CODE,
(SELECT DISTINCT
CASE
WHEN TOBX.OBSERVATION_VALUE IS NULL THEN NULL
WHEN LENGTH(TRIM(TRANSLATE(TOBX.OBSERVATION_VALUE, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ' '))) IS NULL THEN TOBX.OBSERVATION_VALUE
ELSE TO_CHAR(TRUNC(TOBX.OBSERVATION_VALUE * DECODE(UPPER(TOBX.UOM), 'KGS', 2.20462,1),2))
END
FROM TT_A04_OBX_QUES_ANS_DTL TOBX
WHERE TOBX.OBSERVATION_IDENTIFIER = IAM.QUESTION_CODE
AND TOBX.MSG_ID = VN_MAX_MSG_ID) AS ANSWER
FROM INTERFACE_ADT_AOE_MASTER IAM
WHERE SOURCE_SYSTEM = IN_CORP_ACRONYM;
OR_QUES_AND_ANS := VR_QUES_AND_ANS;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_rejected_boolean_val:'||VC_REJECTED_BOOLEAN_VAL||
' vc_rejected_par_boolean_val:'||VC_REJECTED_PAR_BOOLEAN_VAL||
' OV_COMMENTS:'||OV_COMMENTS);
END IF;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'End of the procedure with Patient_Id:'||IN_PATIENT_ID||' Facility_Id:'||IN_FACILITY_ID||
' Draw_Dt:'||IN_DRAW_DT||' Requisition_Number:'||IN_REQUISITION_NUMBER||' Corp_Acronym:'||IN_CORP_ACRONYM||
' ABCDEF_Mrn:'||IN_ABCDEF_MRN||' Account_Number:'||IN_ACCOUNT_NUMBER||' Hlab_Num:'||IN_HLAB_NUM);
EXCEPTION
WHEN NO_DATA_FOUND THEN
SPL_SPN_ERROR_LOGGING_SPK.ERROR_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => SQLERRM);
WHEN OTHERS THEN
SPL_SPN_ERROR_LOGGING_SPK.ERROR_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => SQLERRM);
END SPL_SPN_MISSING_EMR_AOE_DTL;
Regards,
BS2012.
Hey Guys,
I'm sorry, that I troubled you all. But I found the issue and solved it.
The actual problem is residing at that max of that partition by query. I had a misconception that this query will always return a value which is positive number like 1,2 etc.
But sometimes it's returning null as well. So the ref cursor is fetching nothing. Now I've modified my code and everything is working fine. Thanks for your help and support.
Regards,
BS2012.
Similar Messages
-
How to Change the return value for the parameters
Hi, Can anyone help me with my problem?
I have a parameter called "P1_Projects" defined in the HTMLDB page, on the report region, there are 2 buttons, one is "Go" button to submit the report on the screen, so user can preview the report, then another button "Export to PDF" can be clicked to generate the report using Oracle Report Services. The "Export to PDF" button will use the same set of parameters submitted for the "Go" button.
So, the parameter "P1_Projects" is being used by these 2 buttons. and I have to pass a "%" wild card for "All Projects". To make the "Export to PDF" button work, I have to safe encode the return value for "%" to "%25" in order to pass the URL formula, but now my "Go" button doesn't work with "%25", it only recognize the "%" wild card.
Is there a way to conditionally change the value depends which button is clicked?
Any hint or help is highly appreciated!
Hongtry creating a plsql process which sets the P1_Projects item as required.
in the plsql you can do:
if :REQUEST = 'GO' then
xxx
else
xxxx
end if;
set the condition to plsql expression:
:REQUEST in ('GO', 'EXPORT')
NB. the request value is usually set to the button name when a page is submitted from a button -
REF CURSOR not returned to "Output Variables"
I have a poorly performing procedure that returns a Ref Cursor. I can retrieve the Ref Cursor via Crystal Reports, so I know that it is working. However, the data is not showing up in the "Output Variables" section on SQL Developer version 3.1.07.42.
I have other procs that run much faster and the data shows up just fine for them.
I'm wondering if the fact that the query runs in about 4 minutes is causing the results to be lost?
Oracle 11.2.0.3.0 64 bit on AIX version 6.
Sql Developer 3.1.07.42.
Thanks.Can't reproduce. Test case:
<code>
create or replace
package pivot
as
type rc is ref cursor;
procedure tst4( c1 in out rc, c2 out rc, i out integer, c4 out rc );
end;
create or replace
package body pivot
as
procedure tst4( c1 in out rc, c2 out rc, i out integer, c4 out rc ) is
stmt1 long;
stmt2 long;
stmt3 long;
stmt4 long;
begin
stmt1 := 'select 11 one, 12 two, ''a'' from dual union select 21 one, 22 two, ''b'' from dual';
open c1 for stmt1;
stmt2 := 'select 2 from dual';
select count(1) into stmt4 from dual -- simulated delay
connect by level < 40000000;
open c2 for stmt2;
i:=42;
stmt4 := 'select level from dual connect by level < 7';
open c4 for stmt4;
end;
end; -
How can I get null values for the later weeks
Hi All,
When I execute this code I get the records till current week.
How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
Thanks,
Vikram
DECLARE
v_query VARCHAR2(4000);
TYPE ref_cursor IS REF CURSOR;
v_refcur ref_cursor;
v_sum NUMBER;
v_id NUMBER;
v_name VARCHAR2(1000);
v_weeknum NUMBER;
v_pernum NUMBER;
v_numOfWeeks NUMBER := 5;
BEGIN
v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
FROM s_postn) postn_tbl
WHERE lvl_6_id = 5767
AND fiscal_year = 2008
AND b.week_num < 4
AND b.period_num = 3
AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
ORDER BY postn_tbl.postn_name, b.week_num';
OPEN v_refcur FOR v_query;
LOOP
FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
EXIT WHEN v_refcur%notfound;
dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
END LOOP;
END;
This is the output when I execute this code.
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W2 COMM CNTRL TAM 216 12561.4
P3W3 COMM CNTRL TAM 216 2027.1
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
This is the output I'd like to get
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W4 COMM CNTRL ISAM 213
P3W5 COMM CNTRL ISAM 213
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W4 COMM CNTRL ISAM 273
P3W5 COMM CNTRL ISAM 273
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W4 COMM CNTRL TAM 213
P3W5 COMM CNTRL TAM 213
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W4 COMM CNTRL TAM 273
P3W5 COMM CNTRL TAM 273
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
P3W4 Damon Walters
P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PMSure, in a Single SQL ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>-- Start Of Test Data --
satyaki>with week_tab
2 as
3 (
4 select 1 period_num, 1 week_num, 10 bkg1 from dual
5 union all
6 select 1, 2, 40 from dual
7 union all
8 select 1, 3, 30 from dual
9 union all
10 select 1, 2, 20 from dual
11 union all
12 select 1, 1, 10 from dual
13 union all
14 select 1, 1, 20 from dual
15 union all
16 select 1, 3, 10 from dual
17 union all
18 select 2, 1, 15 from dual
19 union all
20 select 2, 2, 20 from dual
21 union all
22 select 2, 3, 10 from dual
23 union all
24 select 2, 1, 15 from dual
25 union all
26 select 2, 2, 30 from dual
27 union all
28 select 2, 3, 20 from dual
29 )
30 -- End Of Test Data --
31 select period_num,
32 week_num,
33 (
34 select sum(week_tab.bkg1)
35 from week_tab
36 where period_num = m.period_num
37 and week_num = m.week_num
38 group by week_num, period_num
39 ) sum_bkg1
40 from (
41 select dum.week_num,
42 wk.period_num
43 from (
44 select 1 week_num from dual
45 union all
46 select 2 from dual
47 union all
48 select 3 from dual
49 union all
50 select 4 from dual
51 union all
52 select 5 from dual
53 ) dum ,
54 (
55 select distinct period_num
56 from week_tab
57 ) wk
58 ) m;
PERIOD_NUM WEEK_NUM SUM_BKG1
1 1 40
1 2 60
1 3 40
1 4
1 5
2 1 30
2 2 50
2 3 30
2 4
2 5
10 rows selected.
Elapsed: 00:00:00.48
satyaki>Regards.
Satyaki De. -
The value for The value for the useBean invalid?
I get following error when I try to test application in iexplorer.
org.apache.jasper.JasperException: /guestBookLogin.jsp(12,0) The value for the useBean class attribute com.deitel.jhtp6.jsp.beans.GuestBean is invalid.
I got this code from a case study and I was testing it. I get
org.apache.jasper.JasperException: /guestBookLogin.jsp(12,0) The value for the useBean class attribute com.deitel.jhtp6.jsp.beans.GuestBean is invalid.
error
I believe this is becaus of version difference but here is my code
guestBookLogin.jsp
<!- <?xml version = "1.0"?> -->
<!- DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" -->
<!-- Fig. 27.22: guestBookLogin.jsp -->
<%-- page settings --%>
<%@ page errorPage = "guestBookErrorPage.jsp" %>
<%-- beans used in this JSP --%>
<jsp:useBean id = "guest" scope = "page"
class = "com.deitel.jhtp6.jsp.beans.GuestBean" />
<jsp:useBean id = "guestData" scope = "request"
class = "com.deitel.jhtp6.jsp.beans.GuestDataBean" />
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>Guest Book Login</title>
<style type = "text/css">
body
font-family: tahoma, helvetica, arial, sans-serif;
table, tr, td
font-size: .9em;
border: 3px groove;
padding: 5px;
background-color: #dddddd;
}`
</style>
</head>
<body>
<jsp:setProperty name = "guest" property = "*" />
<% // start scriptlet
if ( guest.getFirstName() == null ||
guest.getLastName() == null ||
guest.getEmail() == null )
%> <%-- end scriptlet to insert fixed template data --%>
<form method = "post" action = "guestBookLogin.jsp">
<p>Enter your first name, last name and email
address to register in our guest book.</p>
<table>
<tr>
<td>First name</td>
<td>
<input type = "text" name = "firstName" />
</td>
</tr>
<tr>
<td>Last name</td>
<td>
<input type = "text" name = "lastName" />
</td>
</tr>
<tr>
<td>Email</td>
<td>
<input type = "text" name = "email" />
</td>
</tr>
<tr>
<td colspan = "2">
<input type = "submit" value = "Submit" />
</td>
</tr>
</table>
</form>
<% // continue scriptlet
} // end if
else
guestData.addGuest( guest );
%> <%-- end scriptlet to insert jsp:forward action --%>
<%-- forward to display guest book contents --%>
<jsp:forward page = "guestBookView.jsp" />
<% // continue scriptlet
} // end else
%> <%-- end scriptlet --%>
</body>
</html>GuestBean.java
* @(#)GuestBean.java
* @author:
* @Description: JavaBean to store data for a guest in the guest book.
* @version 1.00 2008/7/18
// JavaBean to store data for a guest in the guest book.
package com.deitel.jhtp6.jsp.beans;
public class GuestBean
private String firstName;
private String lastName;
private String email;
//Constructors
public GuestBean(){
public GuestBean(String firstname, String lastname, String email){
this.firstName=firstname;
this.lastName=lastName;
this.email=email;
// set the guest's first name
public void setFirstName( String name )
firstName = name;
} // end method setFirstName
// get the guest's first name
public String getFirstName()
return firstName;
} // end method getFirstName
// set the guest's last name
public void setLastName( String name )
lastName = name;
} // end method setLastName
// get the guest's last name
public String getLastName()
return lastName;
} // end method getLastName
// set the guest's email address
public void setEmail( String address )
email = address;
} // end method setEmail
// get the guest's email address
public String getEmail()
return email;
} // end method getEmail
} // end class GuestBeanGuestBeanData.java
* @(#)GuestDataBean.java
* @author
* @version 1.00 2008/7/18
// Fig. 27.21: GuestDataBean.java
// Class GuestDataBean makes a database connection and supports
// inserting and retrieving data from the database.
package com.deitel.jhtp6.jsp.beans;
import java.sql.SQLException;
import javax.sql.rowset.CachedRowSet;
import java.util.ArrayList;
import com.sun.rowset.CachedRowSetImpl; // CachedRowSet implementation
public class GuestDataBean
private CachedRowSet rowSet;
// construct TitlesBean object
public GuestDataBean() throws Exception
// load the MySQL driver
Class.forName( "com.mysql.jdbc.Driver" );
// specify properties of CachedRowSet
rowSet = new CachedRowSetImpl();
rowSet.setUrl( "jdbc:mysql://localhost/VirsarMedia" );
rowSet.setUsername( "root" );
rowSet.setPassword( "" );
// obtain list of titles
rowSet.setCommand(
"SELECT firstName, lastName, email FROM guest" );
rowSet.execute();
} // end GuestDataBean constructor
// return an ArrayList of GuestBeans
public ArrayList< GuestBean > getGuestList() throws SQLException
ArrayList< GuestBean > guestList = new ArrayList< GuestBean >();
rowSet.beforeFirst(); // move cursor before the first row
// get row data
while ( rowSet.next() )
GuestBean guest = new GuestBean();
guest.setFirstName( rowSet.getString( 1 ) );
guest.setLastName( rowSet.getString( 2 ) );
guest.setEmail( rowSet.getString( 3 ) );
guestList.add( guest );
} // end while
return guestList;
} // end method getGuestList
// insert a guest in guestbook database
public void addGuest( GuestBean guest ) throws SQLException
rowSet.moveToInsertRow(); // move cursor to the insert row
// update the three columns of the insert row
rowSet.updateString( 1, guest.getFirstName() );
rowSet.updateString( 2, guest.getLastName() );
rowSet.updateString( 3, guest.getEmail() );
rowSet.insertRow(); // insert row to rowSet
rowSet.moveToCurrentRow(); // move cursor to the current row
rowSet.acceptChanges(); // propagate changes to database
} // end method addGuest
} // end class GuestDataBeanguestBookErrorPage.jsp
<!-- <?xml version = "1.0"?> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- Fig. 27.24: guestBookErrorPage.jsp -->
<%-- page settings --%>
<%@ page isErrorPage = "true" %>
<%@ page import = "java.util.*" %>
<%@ page import = "java.sql.*" %>
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>Error!</title>
<style type = "text/css">
.bigRed
font-size: 2em;
color: red;
font-weight: bold;
</style>
</head>
<body>
<p class = "bigRed">
<% // scriptlet to determine exception type
// and output beginning of error message
if ( exception instanceof SQLException )
%>
A SQLException
<%
} // end if
else if ( exception instanceof ClassNotFoundException )
%>
A ClassNotFoundException
<%
} // end else if
else
%>
An exception
<%
} // end else
%>
<%-- end scriptlet to insert fixed template data --%>
<%-- continue error message output --%>
occurred while interacting with the guestbook database.
</p>
<p class = "bigRed">
The error message was:<br />
<%= exception.getMessage() %>
</p>
<p class = "bigRed">Please try again later</p>
</body>
</html>
guestBookView.jsp
<!-- <?xml version = "1.0"?> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- Fig. 27.23: guestBookView.jsp -->
<%-- page settings --%>
<%@ page errorPage = "guestBookErrorPage.jsp" %>
<%@ page import = "java.util.*" %>
<%@ page import = "com.deitel.jhtp6.jsp.beans.*" %>
<%-- GuestDataBean to obtain guest list --%>
<jsp:useBean id = "guestData" scope = "request"
class = "com.deitel.jhtp6.jsp.beans.GuestDataBean" />
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>Guest List</title>
<style type = "text/css">
body
font-family: tahoma, helvetica, arial, sans-serif;
table, tr, td, th
text-align: center;
font-size: .9em;
border: 3px groove;
padding: 5px;
background-color: #dddddd;
</style>
</head>
<body>
<p style = "font-size: 2em;">Guest List</p>
<table>
<thead>
<tr>
<th style = "width: 100px;">Last name</th>
<th style = "width: 100px;">First name</th>
<th style = "width: 200px;">Email</th>
</tr>
</thead>
<tbody>
<% // start scriptlet
List guestList = guestData.getGuestList();
Iterator guestListIterator = guestList.iterator();
GuestBean guest;
while ( guestListIterator.hasNext() )
guest = ( GuestBean ) guestListIterator.next();
%> <%-- end scriptlet; insert fixed template data --%>
<tr>
<td><%= guest.getLastName() %></td>
<td><%= guest.getFirstName() %></td>
<td>
<a href = "mailto:<%= guest.getEmail() %>">
<%= guest.getEmail() %></a>
</td>
</tr>
<% // continue scriptlet
} // end while
%> <%-- end scriptlet --%>
</tbody>
</table>
</body>
</html>Edited by: Areeba on Jul 19, 2008 10:34 PMThanks I got it working. The problem was my mistake (ofcourse) I had my class in this folder WEB_INF/com/..... I did had classes folder under WE-INF . I'll get rest working soon. Thanks for the help.
Edited by: Areeba on Jul 21, 2008 5:02 PM
=====================
I get this eror
javax.servlet.ServletException: Can't call commit when autocommit=true
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.guestBookLogin_jsp._jspService(org.apache.jsp.guestBookLogin_jsp:172)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.sql.rowset.spi.SyncProviderException: Can't call commit when autocommit=true
com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:886)
com.deitel.jhtp6.jsp.beans.GuestDataBean.addGuest(GuestDataBean.java:75)
org.apache.jsp.guestBookLogin_jsp._jspService(org.apache.jsp.guestBookLogin_jsp:145)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)on here
rowSet.acceptChanges(); // propagate changes to databaseit updated the database but with error.
Edited by: Areeba on Jul 21, 2008 5:23 PM
Edited by: Areeba on Jul 21, 2008 5:57 PM -
Ref Cursor closed returning to Form
Hi,
I came across this old thread which seems to be an exact match for my problem.
sys ref cursor is closed
And whereas the solutions do work as stated there is an issue with it that i wonder if anyone here has since got around.
Take those examples and make the sql dynamic. on return to the form the ref cursor is instantaneouly closed for you making the thing unusable.
i.e.
OPEN cur FOR SELECT 'x' from dual
works just fine but
OPEN cur FOR 'SELECT ''X'' from dual'
resutls in an closed cursor the moment the ref cursor parameter returns to the form. I need the dynamic form because my cursor is truly built dynamically.
Any ideas anyone?Hi,
try this :
1. declare in the package specification
TYPE rec_view IS RECORD(
COL1 VARCHAR2(250),
COL2 VARCHAR2(250),
COL3 VARCHAR2(250),
COL4 VARCHAR2(250),
COL5 VARCHAR2(250)
TYPE t_ref_curs IS REF CURSOR RETURN rec_view;
TYPE t_rec_c IS REF CURSOR;
2. define the dynamic sql - procedure
PROCEDURE prc_getdata (p_refcur IN OUT t_ref_curs, p_result OUT VARCHAR2,
p_filter IN varchar2 DEFAULT NULL, p_orderby In VARCHAR2 DEFAULT NULL) IS
BEGIN
-- dyn cursor ! --
EXECUTE IMMEDIATE
'BEGIN
OPEN :a FOR ' ||
' select empno, ename, job, mgr, hiredate, sal from emp'||' '||
p_filter ||' '||
p_orderby ||'; '||
'END;'
USING p_refcur;
END prc_getdata;
3. define in the Form a PL/SQL based block on this procedure.
Hope it helps.
Best regards
Friedhold -
We are having a custom WebADI, containing a field (Employee Name) which is a LOV.
The LOV has ID : Person ID, Meaning : Employee name, Description : Position Name.
There are multiple records with same Employee name but different Person ID.
If I select an Employee in the LOV which has multiple records (through different IDs), I am getting an error in WebADI:
"Enter a valid EMPLOYEE_NAME.
XX is invalid. Enter a valid value for the Mapping column EMPLOYEE_NAME"
The Query for the LOV is correct and is returning correct records.
Any pointers on this issue highly appreciated.Hi,
The problem could be with HR security profile attached to the responsibility from where you are launching the spreadsheet. Check it once.
Thanks. -
The LOV modal window could not return value to the base page
when practicing the "create1" task in tutorial, met an issue.
when create an employee, manageName is a messageLovInput and managerID is a messageTextInput.
The issue is the LOV modal window could not return value to the mangerName, but can return to managerID .
If I remove the data boud porperties of the managerName (the bc4j porperties of view name-EmpFullVO and view attribute-MgrName), the lov works fine.
What is the reason?James I would suggest to read the LOV topic in OAF developers' guide. Lov mappings are responsible for bringing pop up values to base page in LOV.
--Mukul -
11g-[nQSError: 42029] Subquery contains too many values for the IN predicat
Hi,
I am having 2 reports one is for subquery which returns inputs to Main report. Actually the report was working fine in 10g. But in 11g we are gettting following error:
View Display Error
Odbc driver returned an error (SQLExecDirectW).
Error Details
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 42029] Subquery contains too many values for the IN predicate.Please have your System Administrator look at the log for more details on this error. (HY000)
Please have your System Administrator look at the log for more details on this error.
Getting same error after modofying the parameter value MAX_EXPANDED_SUBQUERY_PREDICATES to 12000
Please suggest what could be the other reason it may fail or any other settings we need to check.
Regards,
ckengckeng,
Normally the IN clause has restriction of 10000 values in general sql/plsql we will go with inline queries i think model your rpd to generate inner queries
select * from emp where dept_id in (Select distinct dept_id from dept);
or have a condition/filter on sub report and make one more inner report with sub-filter but definitely it will cause performance issues.
thanks,
Saichand.v -
Bulk editor is not returning values for default properties
..even though the content nodes have a value for this property. CQ version is 5.5.
I need to export a report of all user generated content from /content/usergenerated/content/<sitename>/en. This is the root path.
The query parameter I have specified is "type:Rating". By default the "sling:resourceType" is selected. No other custom properties are specified in the interface.
The search returns the nodes of this type, but the results do not return a value for the "sling:resourceType" for these nodes.It should work. Might be you do not have data. Is the results shown as zero records?
-
How to map AM method return values in the bean
Hello -
I have this requirement to map AM method return values in the bean as explained below. Please suggest a solution.
Scenario: I am calling an AM method, which returns a String object on page load.
AMImpl Method-
public String getProfileName (){
return "Profile";
I wish to catch this retun value in the Bean Variable on page Load. I have created a methodAction biding on page and invokeAction to call this method on Page Load, but I don't know how to catch this value in the bean. Please suggest how to achieve this. Also, I need to achieve this in jsp page. I can't use TaskFlow for this.
I am using ADF 11g.
Regards -
Rohit
Edited by: Rohit Makkad on Apr 21, 2010 12:23 AMHi, I think there are two ways, from the data control drag n drop the methods return value to the page. This way a binding for that will be created at the page definition eg retVal.
and in the backing bean you can access it by calling resolveExpression("#{bindings.retVal.inputValue}")
You can also call your method directly from the backbean
((YourAppModuleImpl) getBindings().getDataControl().getApplicationModule()).yourMethod();
public DCBindingContainer getBindings() {
return (DCBindingContainer) resolveExpression("#{bindings}");
I dont know if the second method suits you
Tilemahos -
Calling Stored function and showing returned value on the UI screen
I am calling a stored function by using the following steps mentioned as per the below link. The stored function returns a single scalar value
http://download.oracle.com/docs/cd/E1790401/web.1111/b31974/bcadvgen.htm#sm0297_
Please verify if I am putting the code in the classes as required by the ADF framework.
* 1) In class CustomApplicationModuleImpl extends ApplicationModuleImpl*
// Some constants
public static int NUMBER = Types.NUMERIC;
public static int DATE = Types.DATE;
public static int VARCHAR2 = Types.VARCHAR;
protected Object callStoredFunction(int sqlReturnType, String stmt,
Object[] bindVars) {
CallableStatement st = null;
try {
// 1. Create a JDBC CallabledStatement
st = getDBTransaction().createCallableStatement(
"begin ? := "+stmt+";end;",0);
// 2. Register the first bind variable for the return value
st.registerOutParameter(1, sqlReturnType);
if (bindVars != null) {
// 3. Loop over values for the bind variables passed in, if any
for (int z = 0; z < bindVars.length; z++) {
// 4. Set the value of user-supplied bind vars in the stmt
st.setObject(z + 2, bindVars[z]);
// 5. Set the value of user-supplied bind vars in the stmt
st.executeUpdate();
// 6. Return the value of the first bind variable
return st.getObject(1);
catch (SQLException e) {
throw new JboException(e);
finally {
if (st != null) {
try {
// 7. Close the statement
st.close();
catch (SQLException e) {}
With a helper method like this in place, calling the func_with_no_args procedure shown in Example 37-7 would look like this:
*2) In class CustomServiceImpl extends CustomApplicationModuleImpl*
public String callEnvironmentName(){
return (String) callStoredFunction(VARCHAR2, "CAR_UTIL_PK.get_environment_name()", new Object[] {});
3) If I have the first two steps correct, I was to display the value returned by method callEnvironmentName() with scalar values like (Development, Production etc) at the footer of each JSFX page. What is the flow I should follow, should I call callEnvironmentName() from some managed bean? Also I want to store it once on first call to some application variable and use that to populate the JSFX pages. Is there a working example. What is the best practice?
Thanks
Edited by: user5108636 on Apr 5, 2011 11:58 PMHi John,
Duplicate alerts are coming for BP_Confirmed as well as one custom event. Earlier I thought there is some issue with my custom event, but when it came for BP_Confirmed also, then i have a doubt something is wrong with the application.
I have also checked that BP_Confirmed is being raised only once inside the method-BP_CONFIRM of class-cl_crmcmp_b_cucobupa_impl.
raise event BPConfirmed
CLASS cl_crm_ic_services DEFINITION LOAD.
CREATE OBJECT event.
event->set_name( if_crm_ic_events_con=>gc_bpconfirmed ).
event_srv = cl_crm_ic_services=>get_event_srv_instance( ).
event_srv->raise( event ).
Are you aware of any other place from where this event is getting triggered?
Thanks for your help!
Regards,
Rohit -
Need to set default values for the fields plant and location in ME21N
Hi All,
i need to set default values for the fields plant and location in ME21N tcode.
In accout assignment if we give 'A' then we need to create asset by clicking the Asset tab,there you have the fields plant and location.
How to resolve this?
Thanks in Advancehi .
i needed to set default strorage location and plant in personal setting in me21n.
i solve it with this way.
go to program SAPLMEPERS in se38.
create new function in output with the sample name :MODULE ZTEST_001 OUTPUT.
in this module write:
if MEPOITEM_PROP-WERKS is INITIAL and MEPOITEM_PROP-LGORT is INITIAL.
MEPOITEM_PROP-WERKS = '1000'.
MEPOITEM_PROP-LGORT = '0032'.
endif.
this is the solution.
best regards.
maryam -
Urgent! Display lookup value and return value at the same time.
We are using pop up lov.
How can we display lookup value and return value at the same time. let me claer..
Our lov query is like fallowing
select dname, deptno from dept
we want to return deptno column into a database bind text item and dname column into a display item (look up)
can we do it (we need to do)
thanks for your help.We did it .
But pop up key lov (display description return value ) property doesn't appear for tabular forms item.
(Report Attributes pages Tabular Form Element section display As property list)
can we set or not.
Thank you. -
The "SignFile" task was not given a value for the required parameter "CertificateThumbprint"
We have a line of business app which is deployed via clickonce. I can build and publish the application without any problems but when I try to use Continuous Integration (Build each check-in) I get the following error:
2>C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5):
error MSB4044:
The "SignFile" task was not given a value for the required parameter "CertificateThumbprint".
[C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]
Done executing task "SignFile" -- FAILED.
We sign the application (to be more specific: the ClickOnce manifest) using a code signing certificate which is registered in the AD as Trusted Publisher.
The Certificate is stored in Certificate store on my local workstation. The Certificate is also in the certificate store of the build server (1. In the Personal Store, 2. in the Personal store of the TFSBuildServiceHost Service Account and 3. in the Personal
store of the tfs/build server itself).
Where are using Visual Studio 2013 Update 4, C#, .Net 4.5 and TFS 2013 Update 4.
I have no clue what causes this error, any help is appreciated.I installed the
Windows Software Development Kit (SDK) for Windows 8 and now I can build the solution via command line.
"C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe" C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln
But the TFS Build still fails.
Here is the error output gathered from the tfsbuild logfile:
Task "AL"
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\AL.exe /culture:de /out:obj\Debug\de\Pulse.resources.dll /platform:AnyCPU /template:obj\Debug\Pulse.exe /embed:obj\Debug\Pulse.View.Localization.CreditsView.de.resources /embed:obj\Debug\Pulse.View.Localization.PulseMainWindow.de.resources
Microsoft (R) Assembly Linker version 12.0.20806.33440
Copyright (C) Microsoft Corporation. All rights reserved.
Done executing task "AL".
2>Done building target "GenerateSatelliteAssemblies" in project "Pulse.csproj".
2>Target "CreateSatelliteAssemblies" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "CoreBuild" depends on it):
2>Done building target "CreateSatelliteAssemblies" in project "Pulse.csproj".
Target "SetWin32ManifestProperties" skipped. Previously built successfully.
Target "_DeploymentComputeNativeManifestInfo" skipped, due to false condition; ('$(GenerateClickOnceManifests)'!='true') was evaluated as ('true'!='true').
2>Target "CleanPublishFolder" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "_DeploymentComputeClickOnceManifestInfo" depends on it):
Task "RemoveDir" skipped, due to false condition; ('$(PublishDir)'=='$(OutputPath)app.publish\' and Exists('$(PublishDir)')) was evaluated as ('bin\Debug\app.publish\'=='bin\Debug\app.publish\' and Exists('bin\Debug\app.publish\')).
2>Done building target "CleanPublishFolder" in project "Pulse.csproj".
Target "_DeploymentGenerateTrustInfo" skipped, due to false condition; ('$(TargetZone)'!='') was evaluated as (''!='').
2>Target "_DeploymentComputeClickOnceManifestInfo" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "GenerateApplicationManifest" depends on it):
Task "Copy"
Creating directory "bin\Debug\app.publish".
Copying file from "obj\Debug\Pulse.exe" to "bin\Debug\app.publish\Pulse.exe".
Done executing task "Copy".
Using "SignFile" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "SignFile"
2>C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5): error MSB4044: The "SignFile" task was not given a value for the required parameter "CertificateThumbprint". [C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]
Done executing task "SignFile" -- FAILED.
2>Done building target "_DeploymentComputeClickOnceManifestInfo" in project "Pulse.csproj" -- FAILED.
2>Target "_CheckForCompileOutputs" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "_CleanGetCurrentAndPriorFileWrites" depends on it):
2>Done building target "_CheckForCompileOutputs" in project "Pulse.csproj".
Target "_SGenCheckForOutputs" skipped, due to false condition; ('$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')) was evaluated as ('Off' == 'On' or (''!='' and 'Off' == 'Auto')).
2>Target "_CleanGetCurrentAndPriorFileWrites" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "_CleanRecordFileWrites" depends on it):
Task "ReadLinesFromFile"
Done executing task "ReadLinesFromFile".
Task "ConvertToAbsolutePath"
Done executing task "ConvertToAbsolutePath".
Task "FindUnderPath"
Comparison path is "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse".
Done executing task "FindUnderPath".
Task "FindUnderPath"
Comparison path is "C:\Builds\1\Pulse\DefaultBuild\bin\".
Done executing task "FindUnderPath".
Task "FindUnderPath"
Comparison path is "obj\Debug\".
Done executing task "FindUnderPath".
Task "RemoveDuplicates"
Done executing task "RemoveDuplicates".
2>Done building target "_CleanGetCurrentAndPriorFileWrites" in project "Pulse.csproj".
2>Target "_CleanRecordFileWrites" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "CoreBuild" depends on it):
Task "RemoveDuplicates"
Done executing task "RemoveDuplicates".
Task "MakeDir"
Done executing task "MakeDir".
Task "WriteLinesToFile"
Done executing task "WriteLinesToFile".
2>Done building target "_CleanRecordFileWrites" in project "Pulse.csproj".
2>Done Building Project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (default targets) -- FAILED.
1>Done executing task "MSBuild" -- FAILED.
1>Done building target "Build" in project "Pulse.sln" -- FAILED.
1>Done Building Project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln" (default targets) -- FAILED.
Build FAILED.
"C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln" (default target) (1) ->
"C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (default target) (2) ->
(_DeploymentComputeClickOnceManifestInfo target) ->
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5): error MSB4044: The "SignFile" task was not given a value for the required parameter "CertificateThumbprint". [C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]
0 Warning(s)
1 Error(s)
Maybe you are looking for
-
BI server is not running in obiee 11g
Hi Experts, I am getting error when i am trying to start bi server from opmnctl command i tried like this C:\Oracle\Middleware\instances\instance1\bin>opmnctl status Processes in Instance: instance1 ---------------------------------------------------
-
How to find the Table from which a Custom table is created.
Hi Gurus, I have a custom table in SAP and want to figure how that has been created. How can I do that? Regards Prashant
-
Report to download a pgm in text format
Hi, My requirement is to download the whole program in a text file, and all includes in a separate text file correspondingly.I have to do this job using read report and scan statements. Regards, Asha
-
Hyperlink on image + pop-up possibilities?
I'ld like to know if it's possible to add an hyperlink on a image or it's only possible on words? I also would like to know if it's possible to add a pop-up, for example if I click on an image, I'ld like to see a pop-up with the image bigger on the s
-
I have some issues with a new installation of reporting 5 . The primary server is zcm11SP3.(also installed zrs-resources.zip) I use SLES11SP2 for the reporting server also tryed it on SLES11SP3 but no differents.(No errors during installation) Still