OKS Service Contracts by Status

Description
Categories: BI Publisher, Service
Columns: Contract Id, Rep Name, Status Code, Status Code Substr, Status Type, Status Type Substr, Status Meaning, Customer Id, Customer Name Substr, Customer Number ...
Application: Service Contracts
Source: Service Contracts by Status Report (XML)
Short Name: OKSSUMCO_XML
DB package: OKS_OKSSUMCO_XMLP_PKG
SELECT
                 KHD.Id                                                 Contract_Id
                ,KCTS.Object1_Id1                                Rep_Name
                ,KHD.Sts_Code                                     Status_Code
                ,SUBSTR(KHD.Sts_Code,1,10)              Status_Code_SUBSTR
                ,KSTB.STE_Code                                  Status_Type
                ,SUBSTR(KSTB.STE_Code,1,10)           Status_Type_SUBSTR
                ,KSTT.Meaning                                     Status_Meaning
                ,PTYC.Party_Id                                     Customer_Id
                ,SUBSTR(PTYC.Party_Name,1,22)        Customer_Name_Substr
                ,PTYC.Party_Number                             Customer_Number
                ,KHD.Contract_Number_Modifier                Contract_Modifier
                ,SUBSTR(KHD.Contract_Number_Modifier,1,13)   Contract_Modifier_Substr
                ,SUBSTR(KHD.Contract_Number,1,20)            Contract_Number_Substr
                ,KHD.Start_Date                              Start_Date
                ,KHD.End_Date                                End_Date
                ,ROUND(OKS_Extwar_Util_Pvt.Round_Currency_Amt(KHD.Estimated_Amount,KHD.Currency_Code),0) Total_Value_Round
                ,KHD.Authoring_Org_Id                        Org_Id
                ,ORG.Name                                    Org_Name
                ,KHD.Currency_Code                           Currency_Code,
                OKS_OKSSUMCO_XMLP_PKG.cf_salesrep_nameformula(KCTS.Object1_Id1, KHD.Authoring_Org_Id) CF_salesrep_name,
                SUBSTR(KSTB.STE_Code,1,10) CF_StatusType_SUBSTR,
                SUBSTR(KHD.Sts_Code,1,10) CF_StatusCode_SUBSTR,
                OKS_OKSSUMCO_XMLP_PKG.cf_prodlinevalueformula(KHD.Id, KHD.Sts_Code, KHD.Currency_Code) CF_ProdLineValue_Round,
                OKS_OKSSUMCO_XMLP_PKG.cf_prodline_valueperdayformula(KHD.Id, KHD.Sts_Code, KHD.Currency_Code) CF_ProdLine_ValuePerDay,
                OKS_OKSSUMCO_XMLP