Regarding views
Hi all,
I want some material on all the types of views like database views projection view, help view, maintenance view. how to create them and how to use them in programs.
Thanks & Regards,
Saroja.
hi,
Database View (SE11)
Database views are implement an inner join, that is,
only records of the primary table (selected via the join operation)
for which the corresponding records of the secondary tables also exist are fetched.
Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields.
In the other types of view, they must be taken from existing foreign keys.
That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
- Help View ( SE54)
Help views are used to output additional information when the online help system is called.
When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field.
If this is not the case, the help view is displayed in which the check table of the field is the primary table.
Thus, for each table no more than one help view can be created,
that is, a table can only be primary table in at most one help view.
- Projection View
Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed.
A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.
- Maintenance View ( SE54 )
Maintenance views enable a business-oriented approach to looking at data,
while at the same time, making it possible to maintain the data involved.
Data from several tables can be summarized in a maintenance view and maintained collectively via this view.
That is, the data is entered via the view and then distributed to the underlying tables by the system.
Creating Database View:
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed06446011d189700000e8322d00/content.htm
Creating Projection View:
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecc5446011d189700000e8322d00/frameset.htm
Creating Help View:
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecd2446011d189700000e8322d00/frameset.htm
Creating maintenance View:
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecdf446011d189700000e8322d00/frameset.htm
Re: what are the various views?
http://help.sap.com/saphelp_webas620/helpdata/en/cf/21ec5d446011d189700000e8322d00/content.htm
Regards
Reshma
Similar Messages
-
Regarding View Size Inside Tab Strip
Hi All,
I'm having a Tabstrip with 2 tabs. Inside which i'm having ViewContainerElememt on each tab. On Each View I'm having one dropdown & a table .
In the first Tab i'm also having a Text View.If there is no values in the dropdown then that text view ll be displayed and not the Table . If there is values in the drop down then the table ll dispaly & not the Text view.
Wat happens is,if there is value in the Dropdown then the table is getting displayed & the view is displaying in Full screen. If there is no value then the Textview is displaying.At that time the View Size is Reducing to Half.
How to fix the ViewContainer Element inside that Tab ?
I tried with giving Width as 100% but still it is not coming.
Helpful Answers ll be Rewarded.
Regards,
Padmam.Hi Padman
Set the height property of tabstrip control to some fixed value.i.e 800px or whatever you want. it will fix the height of each tab.
Regards
Naresh -
Hi,
Would be happy if some one clarifies the below doubt.
Oracle version : 10g
1. I have created a complex view ( say it would return 10million records).
2. This view contains some structures like inline view in it ( so i suppose
in the explain plan it may not be broken down to the base tables)
2. I am using that view in a select statment as below
select * from ( thisview)
where thisview.empno =12
and ..... (some more condition)
In this scenario my doubt is that would this be fetching all the records and filter
it using the conditions specified in the select statement?
Please let us know if some can help me regarding this.
Regards,Hi,
The best way is to run the explain plan and see what it does.
Where condition will be applied on base table. See the below example:
SQL> select * from employees
2 where first_name='XXX';
no rows selected
Execution Plan
Plan hash value: 2285394972
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 68 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| EMPLOYEES | 1 | 68 | 2 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | EMP_IDX | 1 | | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("FIRST_NAME"='XXX')
Statistics
8 recursive calls
0 db block gets
3 consistent gets
0 physical reads
0 redo size
874 bytes sent via SQL*Net to client
373 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
0 rows processed
SQL>
SQL> ed
Wrote file afiedt.buf
1* create view emp_view as select * from employees
SQL> /
View created.
SQL> set autotrace traceonly
SQL> select * from emp_view
2 where first_name='XXX';
no rows selected
Execution Plan
Plan hash value: 2285394972
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 68 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| EMPLOYEES | 1 | 68 | 2 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | EMP_IDX | 1 | | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("FIRST_NAME"='XXX')
Statistics
15 recursive calls
0 db block gets
5 consistent gets
0 physical reads
0 redo size
874 bytes sent via SQL*Net to client
373 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
0 rows processed
SQL>Regards,
Avinash -
hi,
i have a view named CREATE OR REPLACE VIEW TAX_AMT_VIEW
(PTIN_NO, AMOUNT)
AS
select I_ASMTNO PTIN_NO,
(D_CRNPT+D_CRNED+D_CRNLCS+D_CRNUAUTHCNSTPLTY+D_ARRPT+D_ARRED+D_ARRLCS
D_ARRUAUTHCNSTPLTYD_PLTYONARR+D_ADVAMT) AMOUNT
from DMA12.PT_ASMTRCPT_TBL;
i am retrewing data from this view from another view CREATE OR REPLACE VIEW TAX_COLLECTION_OTHER
(CIRCLE_NO, AMT_LKS, TOTAL)
AS
SELECT SUM(B.AMOUNT)/100000 AMT_LKS,count(b.ptin_no) TOTAL FROM dma12.PT_RECEIPT_TBL B,dma12.PT_ASSE_PTIN_NOINFORMATION A,
A.PTIN_NO=B.PTIN_NO
how can i make my view faster.
i can i do the summation faster
can any one suggest me
regards,
kishorealter system set __fast=true scope=spfile
or
read the performance tuning manual for your version
In absence of any relevant information like
version
result of dbms_xplan.display
which optimizer being used
which columns are indexed
do you use system stats,
what did you try
etc, etc, etc
Question: if you don't want to share any information, yet are asking about a specific statement, why do you request help?
Do you expect people here are clairvoyant?
Sybrand Bakker
Senior Oracle DBA -
hi
any body help me on hyperion build views for automation of dimension building using HAL to plannning application.data source is SQL server.how to create views for account, utility,product,customer dimensions.
Thanks
subbu.Hi ACP,
You can check it in table MARC/MARA. Field PSTAT. This gives the views created.
The overall maintenance status is made up of the individual maintenance
statuses. The individual maintenance statuses have the following
meaning:
User department Maintenance status
Work scheduling A
Accounting B
Classification C
MRP D
Purchasing E
Production resources/tools F
Costing G
Basic data K
Storage L
Forecasting P
Quality management Q
Warehouse management S
Sales V
Plant stocks X
Storage location stocks Z
kindly test your requirement with the Tcode MM50.
it will be surely helpful.
Let me kow the feedback.
Regards,
R.Brahmankar -
Hi i am doing standard Program modification with respect to OSS notes given by SAP.
in that they have given
The folllowing views should be generated after the DDIC changes.
J_1IVTXRAT for table J_1IEXCTAX
J_1IEXCDEF for table J_1IEXCDEF
J_1IEXCACC for table J_1IEXCACC
how we can proceed with this.
what is the view generation?
please help me.
thanks in advance.Hi,
Whenever you create Table maintenance generator from SE11 -> utilities-> table maintenance generator , a View will be created which allows you to enter the Values from SM30 Transaction.
So in this case also you are asked to generate the table maintenance for the 3 tables which in turns create the 3 views corresponding to the tables
J_1IEXCTAX
J_1IEXCDEF
J_1IEXCACC
Views for them are
J_1IVTXRAT
J_1IEXCDEF
J_1IEXCACC
Table maintenance creation steps:
table maintanance Generator is used to manually
input values using transaction sm30
follow below steps
1) go to se11 check table maintanance check box under
attributes tab
2) utilities-table maintanance Generator->
create function group and assign it under
function group input box.
also assign authorization group default &NC& .
3)
select standard recording routine radio in table
table mainitainence generator to move table
contents to quality and production by assigning
it to request.
4) select maintaience type as single step.
5) maintainence screen as system generated numbers
this dialog box appears when you click on create
button
6) save and activate table
reward points if useful
regards,
Anji -
Regarding view on 10g instance
Hi,
I am using 10.2 version.
what is the use of view v$OSSTAT?
when i query this on my database not displaying out put just showing 0 rows selected.
what is the use with this view? what to do if we need to get info. from this view?Hi,
It makes some system call to get that value. In this way it depends on OS. And for some instances you get value and some you does not, is because of bugs Oracle has while retrieving the value. If you want to figure out for your system (OS and hardware), you can check metalink else post your Oracle version, Number of CPU, OS along with its exact version.
Regards -
REgarding view selection in mm02 while using bdc
hi,
i m using function module 'MATERIAL_BTCI_SELECTION_NEW'' for selecting the single view automatically in bdc,its working fine..but for another scenario i have to select the multiple views so for this what sud i do i how cud i pass multiple views in single parameter 'selection'.
plz help me.
thnx in advance.We had to make a BDC recently for multiple views. For most of them we used BAPI_MATERIAL_SAVEDATA, but there are some views which are not available (Accounting 2 for example).
For others there are some other BAPIs, as BAPI_MATINSPCTRL_SAVEREPLICA for Quality Management, or BAPI_OBJCL_CHANGE fo Classification.
Anyway, for those views that need to be filled using BDC, the better way we have seen is to select at the beginning of BDC the Basic Data 1 view (which is always at the top of the list and is not dependent of the views that are available for a particular material) and then navigate between views with the following OK_CODEs:
Basic data 1 = SP01
Basic data 2 = SP02
External Objects = SP03
Classification = SP04
Sales: Sales Org. Data 1 = SP05
Sales: Sales Org. Data 2 = SP06
Sales: General/Plant Data = SP07
Foreign Trade: Export Data = SP08
Sales and Distribution Text = SP09
Purchasing = SP10
Foreign Trade: Import Data = SP11
Purchase order text = SP12
MRP 1 = SP13
MRP 2 = SP14
MRP 3 = SP15
MRP 4 = SP16
Forecast = SP17
Work scheduling = SP18
Production resources and tools = SP19
General Plant Data / Storage 1 = SP20
General Plant Data / Storage 2 = SP21
Warehouse Management 1 = SP22
Warehouse Management 2 = SP23
Quality Management = SP24
Accounting 1 = SP25
Accounting 2 = SP26
Cost Estimate 1 = SP27
Costing 2 = SP28
Plant stock = SP29
Storage location stock = SP30 -
REgarding view selection mm02 in bdc
hi,
i m usung function module 'MATERIAL_BTCI_SELECTION_NEW'' for selecting the single view automatically in bdc,its working fine..but for another scenario i have to select the multiple views so for this what sud i do i how cud i pass multiple views in single parameter 'selection'.
plz help me.
thnx in advance.
nullWe had to make a BDC recently for multiple views. For most of them we used BAPI_MATERIAL_SAVEDATA, but there are some views which are not available (Accounting 2 for example).
For others there are some other BAPIs, as BAPI_MATINSPCTRL_SAVEREPLICA for Quality Management, or BAPI_OBJCL_CHANGE fo Classification.
Anyway, for those views that need to be filled using BDC, the better way we have seen is to select at the beginning of BDC the Basic Data 1 view (which is always at the top of the list and is not dependent of the views that are available for a particular material) and then navigate between views with the following OK_CODEs:
Basic data 1 = SP01
Basic data 2 = SP02
External Objects = SP03
Classification = SP04
Sales: Sales Org. Data 1 = SP05
Sales: Sales Org. Data 2 = SP06
Sales: General/Plant Data = SP07
Foreign Trade: Export Data = SP08
Sales and Distribution Text = SP09
Purchasing = SP10
Foreign Trade: Import Data = SP11
Purchase order text = SP12
MRP 1 = SP13
MRP 2 = SP14
MRP 3 = SP15
MRP 4 = SP16
Forecast = SP17
Work scheduling = SP18
Production resources and tools = SP19
General Plant Data / Storage 1 = SP20
General Plant Data / Storage 2 = SP21
Warehouse Management 1 = SP22
Warehouse Management 2 = SP23
Quality Management = SP24
Accounting 1 = SP25
Accounting 2 = SP26
Cost Estimate 1 = SP27
Costing 2 = SP28
Plant stock = SP29
Storage location stock = SP30 -
Hello,
Can we write a Cursor or a LOOP in a View...No, views are just a named sql query, which can be used in SELECT statement. Cursor can reside only in pl/sql block, so its not possible in view definition
-
hi experts,
i m developing a bdc for valuation class and type using tc 'mm01' here i m facing one problem for some particulars materials the sequence of accounting views getting change automatically while executing the program , cud u plz tell me the function module for automatic selection of the views with proper parameters plz help me...Hi,
You can use the function module BAPI_MATERIAL_SAVEDATA or MAINTAIN_MATERIAL_DARK to create materials.
Thanks
Naren -
Hi everyone,
below is the code for the view:
create or replace view c2v_borr_secu_rpt as
select
bank_cust_id --1
, bank_company_id --2
, client_id --3
, cust_name --4
, segment_id --5
, seg_name --6
, sector_id --7
, sector_name --8
, industry_id --9
, industry_name --10
, client_group_id --11
, group_name --12
, npa_status --13
, restructured --14
, acl_id --15
, asset_class --16
, sub_acl_id --17
, sub_asset_class --18
, b_retail --19
, sum(advances_outstanding) advances_outstanding --20
, sum(investments_outstanding) investments_outstanding --21
, sum(Tot_FB_Outstanding) Tot_FB_Outstanding --22 (20+21)
, sum(nfb_nmr_outstanding) nfb_nmr_outstanding --23
, sum(nfb_mr_outstanding) nfb_mr_outstanding --24
, sum(Tot_NFB_Outstanding) Tot_NFB_Outstanding--25 (23+24)
, sum(advances_undisbursed) advances_undisbursed --26
, sum(investments_undisbursed) investments_undisbursed --27
, sum(Tot_FB_Undisbursed) Tot_FB_Undisbursed --28 (26+27)
, sum(nfb_nmr_undisbursed) nfb_nmr_undisbursed --29
, sum(nfb_mr_undisbursed) nfb_mr_undisbursed --30
, sum(Tot_NFB_Undisbursed) Tot_NFB_Undisbursed --31 (29+30)
, sum(Total_Outstanding) Total_Outstanding --32
, sum(Total_Undisbursed) Total_Undisbursed --33
, sum(Total_Exposure) Total_Exposure --34
, sum(own_bank_td) own_bank_td --35
, sum(own_bank_current_a_cs) own_bank_current_a_cs --36
, sum(own_bank_saving_a_cs) own_bank_saving_a_cs --37
, sum(own_bank_rd) own_bank_rd --38
, sum(Fund_Based_Security) Fund_Based_Security --39 (35+36+37+38)
, sum(security_code_lc) security_code_lc --40
, sum(security_code_bg) security_code_bg --41
, sum(other_secu) other_secu
, sum(Non_Fund_Based_Security) Non_Fund_Based_Security --42 (40+41)
, sum(Total_Liquid_Security) Total_Liquid_Security --43 (39+42)
, sum(Tot_Exposure_after_Tot_Secu) Tot_Exposure_after_Tot_Secu -- 44 (34-43)
, sum(Tot_FBC_before_Tot_secu) Tot_FBC_before_Tot_secu -- 45 (22+28)
, sum(Tot_FBC_after_Tot_FB_secu) Tot_FBC_after_Tot_FB_secu --46 (45-39)
, sum(Tot_NFBC_before_Tot_secu) Tot_NFBC_before_Tot_secu --47 (25+31)
, sum(Tot_NFBC_after_Tot_NFB_secu) Tot_NFBC_after_Tot_NFB_secu --48 (47-42)
, sum(provisions) provisions --49
, sum(sec_alloc_after_srf) sec_alloc_after_srf --50
, trading_book_outstanding --51
from
select
bank_cust_id --1
, bank_company_id --2
, client_id --3
, cust_name --4
, segment_id --5
, seg_name --6
, sector_id --7
, sector_name --8
, industry_id --9
, industry_name --10
, client_group_id --11
, group_name --12
, npa_status --13
, restructured --14
, acl_id --15
, asset_class --16
, sub_acl_id --17
, sub_asset_class --18
, b_retail --19
, advances_outstanding --20
, investments_outstanding --21
, (advances_outstanding+investments_outstanding) as Tot_FB_Outstanding --22 (20+21)
, nfb_nmr_outstanding --23
, nfb_mr_outstanding --24
, (nfb_nmr_outstanding+nfb_mr_outstanding) as Tot_NFB_Outstanding --25 (23+24)
, advances_undisbursed --26
, investments_undisbursed --27
, (advances_undisbursed+investments_undisbursed) as Tot_FB_Undisbursed --28 (26+27)
, nfb_nmr_undisbursed --29
, nfb_mr_undisbursed --30
, (nfb_nmr_undisbursed+nfb_mr_undisbursed) as Tot_NFB_Undisbursed --31 (29+30)
, (advances_outstanding+investments_outstanding) + (nfb_nmr_outstanding+nfb_mr_outstanding) as Total_Outstanding --32
, (advances_undisbursed+investments_undisbursed) + (nfb_nmr_undisbursed+nfb_mr_undisbursed) as Total_Undisbursed --33
, (advances_outstanding+investments_outstanding) + (nfb_nmr_outstanding+nfb_mr_outstanding) +
(advances_undisbursed+investments_undisbursed) + (nfb_nmr_undisbursed+nfb_mr_undisbursed) as Total_Exposure --34
, own_bank_td --35
, own_bank_current_a_cs --36
, own_bank_saving_a_cs --37
, own_bank_rd --38
, other_secu
, (own_bank_td + own_bank_current_a_cs + own_bank_saving_a_cs + own_bank_rd + other_secu) Fund_Based_Security --39 (35+36+37+38)
, security_code_lc --40
, security_code_bg --41
, (security_code_lc + security_code_bg) as Non_Fund_Based_Security --42 (40+41)
, (own_bank_td + own_bank_current_a_cs + own_bank_saving_a_cs + own_bank_rd) +
(security_code_lc + security_code_bg) as Total_Liquid_Security --43 (39+42)
, (case when
((advances_outstanding+investments_outstanding + nfb_nmr_outstanding+nfb_mr_outstanding +
advances_undisbursed+investments_undisbursed + nfb_nmr_undisbursed+nfb_mr_undisbursed) -
(security_code_lc + security_code_bg)) < 0
then 0
else
((advances_outstanding+investments_outstanding + nfb_nmr_outstanding+nfb_mr_outstanding +
advances_undisbursed+investments_undisbursed + nfb_nmr_undisbursed+nfb_mr_undisbursed) -
(security_code_lc + security_code_bg))
end) as Tot_Exposure_after_Tot_Secu -- 44 (34-43)
, (advances_outstanding+investments_outstanding + advances_undisbursed+investments_undisbursed)
as Tot_FBC_before_Tot_secu -- 45 (22+28)
, (case when
((advances_outstanding+investments_outstanding + advances_undisbursed+investments_undisbursed) -
(own_bank_td + own_bank_current_a_cs + own_bank_saving_a_cs + own_bank_rd)) < 0
then 0
else
(advances_outstanding+investments_outstanding + advances_undisbursed+investments_undisbursed) -
(own_bank_td + own_bank_current_a_cs + own_bank_saving_a_cs + own_bank_rd)
end) as Tot_FBC_after_Tot_FB_secu --46 (45-39)
, (nfb_nmr_outstanding+nfb_mr_outstanding + nfb_nmr_undisbursed+nfb_mr_undisbursed)
as Tot_NFBC_before_Tot_secu --47 (25+31)
, (case when
((nfb_nmr_outstanding+nfb_mr_outstanding + nfb_nmr_undisbursed+nfb_mr_undisbursed) -
(security_code_lc + security_code_bg)) < 0
then 0
else
((nfb_nmr_outstanding+nfb_mr_outstanding + nfb_nmr_undisbursed+nfb_mr_undisbursed) -
(security_code_lc + security_code_bg))
end) as Tot_NFBC_after_Tot_NFB_secu --48 (47-42)
, provisions --49
, sec_alloc_after_srf --50
, trading_book_outstanding--51
from
select
nvl((select e.bank_cust_id
from c2u_exposure e, c2m_exposure me
where t.limit_id = me.limit_id
and e.exposure_id = me.exposure_id
and t.limit_exp_id = 3),
(select u.bank_cust_id from c2u_limit u
where u.limit_id = t.p_limit_id)) bank_cust_id
, (select c.bank_company_id from c2u_client c where c.client_id = d.client_id) bank_company_id
, t.client_id
---------------------Client Details
, (select c.cust_name from c2m_client c where c.client_id=t.client_id) as cust_name
, (select m.bankcode from mst_mktsegment m where m.seg_code= d.segment_id) as segment_id
, (select m.seg_name from mst_mktsegment m where m.seg_code= d.segment_id) as seg_name
, (select m.sector_bankcode from mst_sector m where m.sector_code= d.sector_id) as sector_id
, (select m.sector_name from mst_sector m where m.sector_code= d.sector_id) as sector_name
, (select m.industry_bankcode from mst_industry m where m.industry_id = d.industry_id) as industry_id
, (select m.industry_name from mst_industry m where m.industry_id = d.industry_id) as industry_name
, d.client_group_id
, (select g.client_group from c2c_client_group g where g.client_group_id = d.client_group_id) as group_name
, (case when t.b_npa=1 then 'Yes' else 'No' end) as NPA_Status
, (case when t.b_restructured=1 then 'Yes' else 'No' end) as Restructured
, t.acl_id
, (select c.acl from c2c_acl c where c.acl_id =t.acl_id) as asset_class
, t.sub_acl_id
, (select c.acl from c2c_acl c where c.acl_id =t.sub_acl_id) as sub_asset_class
, (case t.b_retail when 1 then 'Retail' when 0 then 'Non-Retail' end) as b_retail
----------------------Outstanding
, (case when f.class_id = 1 and t.b_funded =1 then t.outstanding else 0 end) as Advances_Outstanding
, (case when f.class_id = 4 and t.b_funded =1 then t.outstanding else 0 end) as Investments_Outstanding
, (case when f.class_id = 3 and t.b_funded =0 then t.outstanding else 0 end) as NFB_NMR_Outstanding
, (case when f.class_id = 2 and t.b_funded =0 then t.outstanding else 0 end) as NFB_MR_Outstanding
----------------------Undisbursed
, (case when f.class_id = 1 and t.b_funded = 1 then nvl((t.ua_limit_ccy*t.ccy_cf),0) else 0 end) as Advances_Undisbursed
, (case when f.class_id = 4 and t.b_funded = 1 then nvl((t.ua_limit_ccy*t.ccy_cf),0) else 0 end) as Investments_Undisbursed
, (case when f.class_id = 3 and t.b_funded = 0 then nvl((t.ua_limit_ccy*t.ccy_cf),0) else 0 end) as NFB_NMR_Undisbursed
, (case when (f.class_id = 2 and t.b_funded = 0) then nvl((t.ua_limit_ccy*t.ccy_cf),0) else 0 end) as NFB_MR_Undisbursed
-----------------------Fund Based Security Value
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('D001','D007','D008','D009','D010')),0) as OWN_BANK_TD
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('D003')),0) as OWN_BANK_CURRENT_A_CS
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('D004')),0) as OWN_BANK_SAVING_A_CS
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('D002')),0) as OWN_BANK_RD
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id not in ('D001','D007','D008','D009','D010','LC','BG')),0) as OTHER_SECU
-----------------------Non Fund Based Security Value
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('LC')),0) as Security_code_LC
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('BG')),0) as Security_code_BG
, t.provisions
, nvl((select sum(s.net_security_value) from c2m_ls s where s.limit_id=t.limit_id and t.b_crm = 0),0) as sec_alloc_after_srf
, nvl((select sum(e.outstanding) from c2m_tb e where e.client_id=t.client_id),0) as trading_book_outstanding
from c2m_limit t, c2m_client d, c2c_bk_facility f
where d.client_id = t.client_id
and t.bk_facility_id = f.bk_facility_id
)t2
group by bank_cust_id --1
, bank_company_id --2
, client_id --3
, cust_name --4
, segment_id --5
, seg_name --6
, sector_id --7
, sector_name --8
, industry_id --9
, industry_name --10
, client_group_id --11
, group_name --12
, npa_status --13
, restructured --14
, acl_id --15
, asset_class --16
, sub_acl_id --17
, sub_asset_class --18
, b_retail, trading_book_outstanding;
the result is as given below.
BANK_CUST_ID BANK_COMPANY_ID CLIENT_ID CUST_NAME SEGMENT_ID SEG_NAME SECTOR_ID SECTOR_NAME INDUSTRY_ID INDUSTRY_NAME CLIENT_GROUP_ID GROUP_NAME NPA_STATUS RESTRUCTURED ACL_ID ASSET_CLASS SUB_ACL_ID SUB_ASSET_CLASS B_RETAIL ADVANCES_OUTSTANDING INVESTMENTS_OUTSTANDING TOT_FB_OUTSTANDING NFB_NMR_OUTSTANDING NFB_MR_OUTSTANDING TOT_NFB_OUTSTANDING ADVANCES_UNDISBURSED INVESTMENTS_UNDISBURSED TOT_FB_UNDISBURSED NFB_NMR_UNDISBURSED NFB_MR_UNDISBURSED TOT_NFB_UNDISBURSED TOTAL_OUTSTANDING TOTAL_UNDISBURSED TOTAL_EXPOSURE OWN_BANK_TD OWN_BANK_CURRENT_A_CS OWN_BANK_SAVING_A_CS OWN_BANK_RD FUND_BASED_SECURITY SECURITY_CODE_LC SECURITY_CODE_BG OTHER_SECU NON_FUND_BASED_SECURITY TOTAL_LIQUID_SECURITY TOT_EXPOSURE_AFTER_TOT_SECU TOT_FBC_BEFORE_TOT_SECU TOT_FBC_AFTER_TOT_FB_SECU TOT_NFBC_BEFORE_TOT_SECU TOT_NFBC_AFTER_TOT_NFB_SECU PROVISIONS SEC_ALLOC_AFTER_SRF TRADING_BOOK_OUTSTANDING
1 TREASURY1 999009224 1000 MANPPURAM GENERAL FINANCE AND LEASING TRSY TREASURY COMMON FUNCTION DFL DEFAULT DFL DEFAULT 0 - No No 111 Corporates 11141 Corporate.All.Unrated.TCIL(Total Claim within Limit) Non-Retail 23021712 0 23021712 0 0 0 0 0 0 0 0 0 23021712 0 23021712 0 0 0 0 0 0 0 0 0 0 23021712 23021712 23021712 0 0 0 0 5074466764
2 CBS1 999009224 1000 MANPPURAM GENERAL FINANCE AND LEASING TRSY TREASURY COMMON FUNCTION DFL DEFAULT DFL DEFAULT 0 - No No 111 Corporates 11141 Corporate.All.Unrated.TCIL(Total Claim within Limit) Non-Retail 0 0 0 1573753.67 0 1573753.67 50000 0 50000 250000 0 250000 1573753.67 300000 1873753.67 20793 150000 20000 1000 642793 200000 199500 451000 399500 591293 1524003.67 50000 0 1823753.67 1474003.67 0 199750 5074466764
3 RETS4 999009224 1000 MANPPURAM GENERAL FINANCE AND LEASING TRSY TREASURY COMMON FUNCTION DFL DEFAULT DFL DEFAULT 0 - No No 111 Corporates 11141 Corporate.All.Unrated.TCIL(Total Claim within Limit) Non-Retail 0 600000 600000 0 0 0 0 0 0 0 0 0 600000 0 600000 0 0 0 0 0 0 0 0 0 0 600000 600000 600000 0 0 0 0 5074466764
The output is comming as 3 rows, with the same bank company ID, I require only 1 row as the output, with only one bank company ID.
How can i change the view ?Hi,
Please find the below code in the specified tags:-
create or replace view c2v_borr_secu_rpt as
select
bank_cust_id --1
, bank_company_id --2
, client_id --3
, cust_name --4
, segment_id --5
, seg_name --6
, sector_id --7
, sector_name --8
, industry_id --9
, industry_name --10
, client_group_id --11
, group_name --12
, npa_status --13
, restructured --14
, acl_id --15
, asset_class --16
, sub_acl_id --17
, sub_asset_class --18
, b_retail --19
, sum(advances_outstanding) advances_outstanding --20
, sum(investments_outstanding) investments_outstanding --21
, sum(Tot_FB_Outstanding) Tot_FB_Outstanding --22 (20+21)
, sum(nfb_nmr_outstanding) nfb_nmr_outstanding --23
, sum(nfb_mr_outstanding) nfb_mr_outstanding --24
, sum(Tot_NFB_Outstanding) Tot_NFB_Outstanding--25 (23+24)
, sum(advances_undisbursed) advances_undisbursed --26
, sum(investments_undisbursed) investments_undisbursed --27
, sum(Tot_FB_Undisbursed) Tot_FB_Undisbursed --28 (26+27)
, sum(nfb_nmr_undisbursed) nfb_nmr_undisbursed --29
, sum(nfb_mr_undisbursed) nfb_mr_undisbursed --30
, sum(Tot_NFB_Undisbursed) Tot_NFB_Undisbursed --31 (29+30)
, sum(Total_Outstanding) Total_Outstanding --32
, sum(Total_Undisbursed) Total_Undisbursed --33
, sum(Total_Exposure) Total_Exposure --34
, sum(own_bank_td) own_bank_td --35
, sum(own_bank_current_a_cs) own_bank_current_a_cs --36
, sum(own_bank_saving_a_cs) own_bank_saving_a_cs --37
, sum(own_bank_rd) own_bank_rd --38
, sum(Fund_Based_Security) Fund_Based_Security --39 (35+36+37+38)
, sum(security_code_lc) security_code_lc --40
, sum(security_code_bg) security_code_bg --41
, sum(other_secu) other_secu
, sum(Non_Fund_Based_Security) Non_Fund_Based_Security --42 (40+41)
, sum(Total_Liquid_Security) Total_Liquid_Security --43 (39+42)
, sum(Tot_Exposure_after_Tot_Secu) Tot_Exposure_after_Tot_Secu -- 44 (34-43)
, sum(Tot_FBC_before_Tot_secu) Tot_FBC_before_Tot_secu -- 45 (22+28)
, sum(Tot_FBC_after_Tot_FB_secu) Tot_FBC_after_Tot_FB_secu --46 (45-39)
, sum(Tot_NFBC_before_Tot_secu) Tot_NFBC_before_Tot_secu --47 (25+31)
, sum(Tot_NFBC_after_Tot_NFB_secu) Tot_NFBC_after_Tot_NFB_secu --48 (47-42)
, sum(provisions) provisions --49
, sum(sec_alloc_after_srf) sec_alloc_after_srf --50
, trading_book_outstanding --51
from
select
bank_cust_id --1
, bank_company_id --2
, client_id --3
, cust_name --4
, segment_id --5
, seg_name --6
, sector_id --7
, sector_name --8
, industry_id --9
, industry_name --10
, client_group_id --11
, group_name --12
, npa_status --13
, restructured --14
, acl_id --15
, asset_class --16
, sub_acl_id --17
, sub_asset_class --18
, b_retail --19
, advances_outstanding --20
, investments_outstanding --21
, (advances_outstanding+investments_outstanding) as Tot_FB_Outstanding --22 (20+21)
, nfb_nmr_outstanding --23
, nfb_mr_outstanding --24
, (nfb_nmr_outstanding+nfb_mr_outstanding) as Tot_NFB_Outstanding --25 (23+24)
, advances_undisbursed --26
, investments_undisbursed --27
, (advances_undisbursed+investments_undisbursed) as Tot_FB_Undisbursed --28 (26+27)
, nfb_nmr_undisbursed --29
, nfb_mr_undisbursed --30
, (nfb_nmr_undisbursed+nfb_mr_undisbursed) as Tot_NFB_Undisbursed --31 (29+30)
, (advances_outstanding+investments_outstanding) + (nfb_nmr_outstanding+nfb_mr_outstanding) as Total_Outstanding --32
, (advances_undisbursed+investments_undisbursed) + (nfb_nmr_undisbursed+nfb_mr_undisbursed) as Total_Undisbursed --33
, (advances_outstanding+investments_outstanding) + (nfb_nmr_outstanding+nfb_mr_outstanding) +
(advances_undisbursed+investments_undisbursed) + (nfb_nmr_undisbursed+nfb_mr_undisbursed) as Total_Exposure --34
, own_bank_td --35
, own_bank_current_a_cs --36
, own_bank_saving_a_cs --37
, own_bank_rd --38
, other_secu
, (own_bank_td + own_bank_current_a_cs + own_bank_saving_a_cs + own_bank_rd + other_secu) Fund_Based_Security --39 (35+36+37+38)
, security_code_lc --40
, security_code_bg --41
, (security_code_lc + security_code_bg) as Non_Fund_Based_Security --42 (40+41)
, (own_bank_td + own_bank_current_a_cs + own_bank_saving_a_cs + own_bank_rd) +
(security_code_lc + security_code_bg) as Total_Liquid_Security --43 (39+42)
, (case when
((advances_outstanding+investments_outstanding + nfb_nmr_outstanding+nfb_mr_outstanding +
advances_undisbursed+investments_undisbursed + nfb_nmr_undisbursed+nfb_mr_undisbursed) -
(security_code_lc + security_code_bg)) < 0
then 0
else
((advances_outstanding+investments_outstanding + nfb_nmr_outstanding+nfb_mr_outstanding +
advances_undisbursed+investments_undisbursed + nfb_nmr_undisbursed+nfb_mr_undisbursed) -
(security_code_lc + security_code_bg))
end) as Tot_Exposure_after_Tot_Secu -- 44 (34-43)
, (advances_outstanding+investments_outstanding + advances_undisbursed+investments_undisbursed)
as Tot_FBC_before_Tot_secu -- 45 (22+28)
, (case when
((advances_outstanding+investments_outstanding + advances_undisbursed+investments_undisbursed) -
(own_bank_td + own_bank_current_a_cs + own_bank_saving_a_cs + own_bank_rd)) < 0
then 0
else
(advances_outstanding+investments_outstanding + advances_undisbursed+investments_undisbursed) -
(own_bank_td + own_bank_current_a_cs + own_bank_saving_a_cs + own_bank_rd)
end) as Tot_FBC_after_Tot_FB_secu --46 (45-39)
, (nfb_nmr_outstanding+nfb_mr_outstanding + nfb_nmr_undisbursed+nfb_mr_undisbursed)
as Tot_NFBC_before_Tot_secu --47 (25+31)
, (case when
((nfb_nmr_outstanding+nfb_mr_outstanding + nfb_nmr_undisbursed+nfb_mr_undisbursed) -
(security_code_lc + security_code_bg)) < 0
then 0
else
((nfb_nmr_outstanding+nfb_mr_outstanding + nfb_nmr_undisbursed+nfb_mr_undisbursed) -
(security_code_lc + security_code_bg))
end) as Tot_NFBC_after_Tot_NFB_secu --48 (47-42)
, provisions --49
, sec_alloc_after_srf --50
, trading_book_outstanding--51
from
select
nvl((select e.bank_cust_id
from c2u_exposure e, c2m_exposure me
where t.limit_id = me.limit_id
and e.exposure_id = me.exposure_id
and t.limit_exp_id = 3),
(select u.bank_cust_id from c2u_limit u
where u.limit_id = t.p_limit_id)) bank_cust_id
, (select c.bank_company_id from c2u_client c where c.client_id = d.client_id) bank_company_id
, t.client_id
---------------------Client Details
, (select c.cust_name from c2m_client c where c.client_id=t.client_id) as cust_name
, (select m.bankcode from mst_mktsegment m where m.seg_code= d.segment_id) as segment_id
, (select m.seg_name from mst_mktsegment m where m.seg_code= d.segment_id) as seg_name
, (select m.sector_bankcode from mst_sector m where m.sector_code= d.sector_id) as sector_id
, (select m.sector_name from mst_sector m where m.sector_code= d.sector_id) as sector_name
, (select m.industry_bankcode from mst_industry m where m.industry_id = d.industry_id) as industry_id
, (select m.industry_name from mst_industry m where m.industry_id = d.industry_id) as industry_name
, d.client_group_id
, (select g.client_group from c2c_client_group g where g.client_group_id = d.client_group_id) as group_name
, (case when t.b_npa=1 then 'Yes' else 'No' end) as NPA_Status
, (case when t.b_restructured=1 then 'Yes' else 'No' end) as Restructured
, t.acl_id
, (select c.acl from c2c_acl c where c.acl_id =t.acl_id) as asset_class
, t.sub_acl_id
, (select c.acl from c2c_acl c where c.acl_id =t.sub_acl_id) as sub_asset_class
, (case t.b_retail when 1 then 'Retail' when 0 then 'Non-Retail' end) as b_retail
----------------------Outstanding
, (case when f.class_id = 1 and t.b_funded =1 then t.outstanding else 0 end) as Advances_Outstanding
, (case when f.class_id = 4 and t.b_funded =1 then t.outstanding else 0 end) as Investments_Outstanding
, (case when f.class_id = 3 and t.b_funded =0 then t.outstanding else 0 end) as NFB_NMR_Outstanding
, (case when f.class_id = 2 and t.b_funded =0 then t.outstanding else 0 end) as NFB_MR_Outstanding
----------------------Undisbursed
, (case when f.class_id = 1 and t.b_funded = 1 then nvl((t.ua_limit_ccy*t.ccy_cf),0) else 0 end) as Advances_Undisbursed
, (case when f.class_id = 4 and t.b_funded = 1 then nvl((t.ua_limit_ccy*t.ccy_cf),0) else 0 end) as Investments_Undisbursed
, (case when f.class_id = 3 and t.b_funded = 0 then nvl((t.ua_limit_ccy*t.ccy_cf),0) else 0 end) as NFB_NMR_Undisbursed
, (case when (f.class_id = 2 and t.b_funded = 0) then nvl((t.ua_limit_ccy*t.ccy_cf),0) else 0 end) as NFB_MR_Undisbursed
-----------------------Fund Based Security Value
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('D001','D007','D008','D009','D010')),0) as OWN_BANK_TD
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('D003')),0) as OWN_BANK_CURRENT_A_CS
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('D004')),0) as OWN_BANK_SAVING_A_CS
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('D002')),0) as OWN_BANK_RD
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id not in ('D001','D007','D008','D009','D010','LC','BG')),0) as OTHER_SECU
-----------------------Non Fund Based Security Value
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('LC')),0) as Security_code_LC
, nvl((select sum(s.security_value) from c2m_ls s, c2c_bk_secu b
where t.limit_id=s.limit_id and b.bk_secu_id=s.bk_secu_id
and b.ref_secu_id in ('BG')),0) as Security_code_BG
, t.provisions
, nvl((select sum(s.net_security_value) from c2m_ls s where s.limit_id=t.limit_id and t.b_crm = 0),0) as sec_alloc_after_srf
, nvl((select sum(e.outstanding) from c2m_tb e where e.client_id=t.client_id),0) as trading_book_outstanding
from c2m_limit t, c2m_client d, c2c_bk_facility f
where d.client_id = t.client_id
and t.bk_facility_id = f.bk_facility_id
)t2
group by bank_cust_id --1
, bank_company_id --2
, client_id --3
, cust_name --4
, segment_id --5
, seg_name --6
, sector_id --7
, sector_name --8
, industry_id --9
, industry_name --10
, client_group_id --11
, group_name --12
, npa_status --13
, restructured --14
, acl_id --15
, asset_class --16
, sub_acl_id --17
, sub_asset_class --18
, b_retail, trading_book_outstanding; -
hi all,
SELECT ED.EXAMINATION_DETAIL_ID,ED. EXAM_ID,ED. RMAG_CODE,ED. AMFI_ID,ED. PASSED, ED.EFFECTIVE_DATE,
ED. PASS_DATE, ED.VALID_UP_TO, ED.REMARKS,ED.OK,
EM.EXAM_NAME,CASE WHEN RMAG_code = 'RM' THEN RM.EXIST_CODE , RM.RM_NAME WHEN RMAG_code = 'IFA' THEN IM.EXIST_CODE , IM.RM_NAME
WHEN RMAG_code = 'FRAN' THEN FM.EXIST_CODE ,FM.RM_NAME END
FROM EXAMINATION_DETAIL ED,EXAM_MASTER EM,RM_MASTER RM,FRANCHISEE_MASTER FM,IFA_MASTER IM
WHERE ED.EXAM_ID = EM.EXAM_IDplease see above query
i want to create a view where rmag_id if rm then it only show me record from rm_master if rmag_id is ifa then it show me recoed from ifa_master and
finally if rmag_id is fran then it shows me recoed from franchisee_master table
i write above query which gives me error
how can i do that
please help me .
any help appriciated .
Message was edited by:
Pankaj M
Message was edited by:
Pankaj M
Message was edited by:
Pankaj MPossibility may you pick this point
IM.EXIST_CODE ||' - ' || IM.RM_NAME ABC
1) Cancatenate them
2) used a upper query , which seperate them
select
lpad('ABC-XYZ',instr('ABC-XYZ','-')-1) p1,
substr('ABC-XYZ',(length(lpad('ABC-XYZ',instr('ABC-XYZ','-')-1)))+2,3) p2
from dual -
Hi
I am using jdev 11.1.2.1.0
I want to fire a post query trigger on page load of adf.
Is there any way to do the same.
If yes then please provide the solution
ThanksHi,
see this document
http://docs.oracle.com/cd/E23943_01/web.1111/b31974/appendix_formstriggers.htm#sm0347
Frank -
Hi,
Can someone please give me some input on the following warning in the JDeveloper online help!
"Warning: You cannot create an EJB finder view link that expresses the same relationship as a CMR."
I'm new to EJB, BC4J and JDeveloper. I created container managed entity beans with local interfaces only to represent my data and relationships. No problems with the mapping so far.
To test the beans I used Session Facades with remote interfaces and build a sample test client.
Now I thought I could create EJB Entity Facades, EJB Finder View Objects, EJB Finder View Links and EJB Application Modules to make use of the BC4J framework in order to speed up programming clients (JSP and JClient).
So I've started studying the JDeveloper online help (which seems to be very useful) and found the above mentioned warning.
Well, better a warning than nothing at all, but some more explanations would have been even better.
Is there no need to use view links with CMR?
How to achieve the same functionality (synchronizing two view objects in a master-detail-relationship) with CMR?
Do you know any examples? I couldn't find any examples using EJB entity facades in the "sample code" area on OTN.
Any comments about other (better) architectures are also welcome. Would it be better to use BMP entity beans in conjunction with BC4J?
Many thanks for your help!
Regards,
EricSteven,
thank you for your reply and suggestions - I'll count on that. If I find time I'll read this book. It seems to be very interesting.
For educational purposes I'd like to look at both persistence implementation strategies. I agree that it looks definitly easier to use entity objects. Certainly it's also performancewise a better choice.
Anyhow, could you give me some useful tips for cmp entity beans and finder view objects?
Is there something which works completely different if I use BC4J on top of it?
How to implement a master-detail relationship in JClient (Swing) for example?
What about writing an ejbfinder which doesn't return all, but all data where the foreign key is equal to a parameter passed to the finder method and use this as the source for a detail view object. This could be the primary key of the selected master. Well, I don't know whether this is doable. But that's what comes to my mind spontaneously.
Would this be a solution? I'm still thinking about the aforementioned warning in the online help regarding view links.
I guess the problem is that the foreign key is not part of the entity bean as it's not a cmp-field. Instead you have accessor methods to retrieve a related object or a collection of objects.
I'm sure my questions are not too complicated to answer. It's only hard for a beginner to get an overview.
I'm quite confident that I'll manage this if I give my best and get some help from knowledgeable people like you Steven.
Regards,
Eric
Maybe you are looking for
-
HT5312 Dear I forgot my security questions how to get it back please
Hi, Dear my name is saad al malki ; yesterday I purchased 15 $ and I add it to my account but when I purchase I face problem in the terms of purchasing I think you make undated and but some new terms dear I forgot my security questions & I want to re
-
I've done restoring my iphone 3gs and still stuck on cannot activate and contact customer service. What shall i do? any help please.
-
How can I reveal secret text with my mouse?
I have a potentially difficult task at hand. I will do my best to phrase my question in a way that will describe my goal effectively. I have created an area within my flash website where there are two sets of lyrics for a song. I have the first set o
-
Classpath/Datatype restriction/Output XML to a file
Hi, I was trying to use a webservice but because the service could not identify the classes needed to run the service it is giving me an exception.If only i give the directory(temp staging directory-which is in my d drive but not within the default d
-
How to save jpeg email attachment to iphoto?
i'm an iphoto (and mac os x) newbie, and i can't figure out how to save a jpeg attachment that someone has sent me so the image shows up in iphoto. what is the easiest way to do this? i'm using apple mail and iphoto 6 on a macbook pro running os 10.4