...
Index | Parameter | Description | Required? | Data Type (max length) | Example |
---|---|---|---|---|---|
0 | kfsChartCode | KFS Chart Code | Yes | String(2) | IR |
1 | kfsOrgCode | KFS Organization Code | Yes | String(4) | 9052 |
DB Query
Code Block |
---|
SELECT FIN_COA_CD, ORG_CD FROM CA_ORG_T a WHERE a.ORG_ACTIVE_CD <> 'N' AND ( (a.ORG_CD='9052' AND a.FIN_COA_CD='IR') OR (a.ORG_CD='9053' AND a.FIN_COA_CD='IR') OR (a.ORG_CD='1111' AND a.FIN_COA_CD='IR') OR (a.ORG_CD='9054' AND a.FIN_COA_CD='XX') ); WITH ChildOrgList As ( SELECT 1 as OrgLevel, ChildOrg.[CHART_CD],ChildOrg.[ORG_UC_LEVEL_CD], ChildOrg.[ORG_CD],ChildOrg.[ORG_NM], ChildOrg.[ORG_PARENT_ORG_CD], ChildOrg.[ORG_ROLLUP_LEVEL01_CD], ChildOrg.[ORG_ROLLUP_LEVEL02_CD], ChildOrg.[ORG_ROLLUP_LEVEL03_CD], ChildOrg.[ORG_ROLLUP_LEVEL04_CD], ChildOrg.[ORG_ROLLUP_LEVEL05_CD], ChildOrg.[ORG_ROLLUP_LEVEL06_CD] FROM [dss_kfs].[dbo].[kfs_d_org] as ChildOrg WHERE ChildOrg.CHART_CD = <kfsChartCode> and ChildOrg.ORG_CD = <kfsOrgCode> UNION ALL SELECT Child.OrgLevel+1 as OrgLevel, ParentOrg.[CHART_CD],ParentOrg.[ORG_UC_LEVEL_CD], ParentOrg.[ORG_CD],ParentOrg.[ORG_NM], ParentOrg.[ORG_PARENT_ORG_CD], ParentOrg.[ORG_ROLLUP_LEVEL01_CD], ParentOrg.[ORG_ROLLUP_LEVEL02_CD], ParentOrg.[ORG_ROLLUP_LEVEL03_CD], ParentOrg.[ORG_ROLLUP_LEVEL04_CD], ParentOrg.[ORG_ROLLUP_LEVEL05_CD], ParentOrg.[ORG_ROLLUP_LEVEL06_CD] FROM [dss_kfs].[dbo].[kfs_d_org] as ParentOrg INNER JOIN ChildOrgList as Child ON Child.[ORG_PARENT_ORG_CD] = ParentOrg.ORG_CD /*WHERE ParentOrg.ORG_CD <> 'UNIV'*/ ) SELECT ML.MLv-L.OrgLevel+1 OrgLevNo, L.[ORG_UC_LEVEL_CD], L.[CHART_CD], L.[ORG_CD], L.[ORG_NM], L.[ORG_PARENT_ORG_CD], L.[ORG_ROLLUP_LEVEL01_CD], L.[ORG_ROLLUP_LEVEL02_CD], L.[ORG_ROLLUP_LEVEL03_CD], L.[ORG_ROLLUP_LEVEL04_CD], L.[ORG_ROLLUP_LEVEL05_CD], L.[ORG_ROLLUP_LEVEL06_CD] from ChildOrgList L INNER JOIN (SELECT [CHART_CD], MAX(OrgLevel) MLv from ChildOrgList group by [CHART_CD]) ML ON L.CHART_CD = ML.CHART_CD order by 1 |
Result Schema: A list of following elements (OrganizationDetails.java)
...