Regading Database View

Hi,
I have joined two tables KNA1 and KNVV using Database View. The Problem is that the Records are not getting filtered On the basis of fields from KNVV (VKORG, VTWEG,VKBUR etc) , however records are getting filtered on the basis of fields from KNA1.  What might be the problem???Please Help...

Hai,
In the join conditions reverse the conditions like:
Instead of table1-field1 eq table2-field1
Use table2-field1 eq table1-field1.
Make sure that client (Key fields )are also be there in the join condition.
Hope this helps you.
Regds,
Rama .Pammi

Similar Messages

  • Database View do not refresh in ADF application

    Greetings,
    im facing a weird problem in my application (JDeveloper 11.1.2.4.0 - ADF). All this time i was working directly with tables (VO), but now i also started using database views.
    Everything works fine, when i add a new row in a table that my Database Views is associated with, it refresh properly.
    BUT if i delete rows manually from my database, the View do not refresh in my application, not by refreshing the page,
    redeploying application, even executing the view object query inside the view object. The only way for the DB View to be
    refresh inside the JDeveloper and on deployment time is by restart JDeveloper. I try adding an action on my OV to re-execute them when
    i do something specifically, hopefully the will reset the cache and retrieve the DB view again, but with no luck..
    Correction: now it doesnt even refresh on restart jdeveloper.
    Just for the clarification, im talking about Database Views, and not just Object Views. I create a Object View inside the application to retrieve the data
    from the Database View results.
    Can you help me on this please?

    Yes the queries in SQLDeveloper was showing me correct results.
    But i feel disappointed.. When i went to close SQLDeveloper to try something, it pop me a message to commit/rollback changes.
    After i commit them, my app show correct results too.

  • Snowflake dimension: named query vs. database view

    A test question features a Product table with a Product Size code; Product Size description is taken from ProductSize table. As far as I can tell, the question asks me to choose between (a) setting up a database view joining Product and ProductSize, and
    (b) doing the join in a data-source-view named query. I don't see a clear winner. (My thinking is as follows.  Yes, he view would speed up the processing, even if not materialized. On the other hand, with a small dataset, the performance gain would be
    minor in absolute terms. Do I want to have an extra database object in the picture?) Yet the question's author does. Can anyone advise please?  

    Hi Demyan,
    According to your description, you want to know which is better, using named query in datasource view or using database view, right?
    Based on my research, there is no performance differences between using named query in datasource view and using database view because they both result in SQL query being sent to the source system. Here is a blog which discuss this issue.
    Consistency: If you already have logic in database views, I would continue to use them. As long as you know that you go to one spot to view/change the logic. Putting the logic in 2 different spots could lead to confusion.
    Security Permissions: often you may not have permission to alter the source databases, in this case you have no choice but to setup named queries in the dsv.
    Reference
    http://geekswithblogs.net/darrengosbell/archive/2006/09/05/90278.aspx
    http://bennyaustin.wordpress.com/2013/07/16/dbview/
    Regards,
    Charlie Liao
    TechNet Community Support

  • Set operator NE in Database View creation in  join condition

    Hi Experts,
         I have a requirement to set NE(not equal) operator in join condition of Database View creation. Could you please help me how to set in operator.
    Join condition :
    Ex : BSAK-AUGBL NE BSAK-BELNR.
    You know that by default operator is '='. i want to set NE in place of '='.
    Thanks,

    Hi Chinna,
    Check whether if there is any possibility or not to include more key fields like bukrs, lifnr, gjahr etc in the where condition, so that you query may result faster. Then, there won't be any necessary to create the view.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • How to call database view in report

    Hi i have a small problem in report
    the problem is like this i had created a database view in which i got all the values displayed but can any one of you tell me how to declare this database view in report with example
    i had created a database view named as znew1
    and the fields are
                 LIFNR  LIKE EKKO-LIFNR,
                 EBELN  LIKE EKKO-EBELN,
                 LIFNR1 LIKE LFA1-LIFNR,
                 NAME1  LIKE LFA1-NAME1,
                 EKBE   LIKE EKBE-EBELN,
                 VGABE  LIKE EKBE-VGABE,
                 MATNR  LIKE EKPO-MATNR,
                 WERKS  LIKE EKPO-WERKS,
                 NETWR  LIKE EKPO-NETWR,
                 MENGE  LIKE EKPO-MENGE,
                 MWSKZ  LIKE EKPO-MWSKZ,
                 TXZ01  LIKE EKPO-TXZ01,
                 KOSTL  LIKE EKKN-KOSTL,
            PS_PSP_PNR  LIKE EKKN-PS_PSP_PNR,
                 EBELN1 LIKE EKKN-EBELN,

    Hi Mr. Rich
    This is the program code and i want this output int he alv grid format
    TABLES:EKKO,EKBE,EKPO.
    DATA:BEGIN OF RTAB_ALV OCCURS 30,
                 LIFNR  LIKE EKKO-LIFNR,
                 EBELN  LIKE EKKO-EBELN,
                 LIFNR1 LIKE LFA1-LIFNR,
                 NAME1  LIKE LFA1-NAME1,
                 EKBE   LIKE EKBE-EBELN,
                 VGABE  LIKE EKBE-VGABE,
                 MATNR  LIKE EKPO-MATNR,
                 WERKS  LIKE EKPO-WERKS,
                 NETWR  LIKE EKPO-NETWR,
                 MENGE  LIKE EKPO-MENGE,
                 MWSKZ  LIKE EKPO-MWSKZ,
                 TXZ01  LIKE EKPO-TXZ01,
                 KOSTL  LIKE EKKN-KOSTL,
            PS_PSP_PNR  LIKE EKKN-PS_PSP_PNR,
                 EBELN1 LIKE EKKN-EBELN,
         END OF RTAB_ALV.
    DATA:IZNEW1 TYPE TABLE OF ZNEW1 WITH HEADER LINE.
    select * into table IZNEW1 FROM ZNEW1 UP TO 10000 ROWS.

  • Using database views in ADF mobile client application

    Hi,
    I am using Jdeveloper 11.1.1.4 and WLS 10.3.4.
    I have developed a POC in ADF mobile client application both with and without synchronization. However, both work with entity objects based on tables.
    I need to use database views instead of tables. When I try to include entity object (based on views) in the view object, it shows an error saying "Only the entity objects based on tables can be selected"
    Please guide me if there is a work around for this.
    Also, please let me know if there is way to develop an ADF mobile client application skipping the use of entity objects at all and using view objects directly to specify the database query and fetch data from the database.
    Thanks in advance.
    Ansh
    Edited by: ansh on Mar 28, 2011 5:40 AM

    Hi, Ansh:
    Currently, out of box, ADF Mobile Client does not support synchronization against Database Views. This is because Mobile Server imposes some schema restrictions to ensure synchronization with multi-table views would work correctly. This schema restriction requires, for example, the view must have a primary parent table with key defined, and also all base table must be included in the data publication. These dependencies requires manual resolution and advanced planning, and is managed outside of the ADF Mobile Client/JDeveloper project.
    To continue development, you would need to create server Entity Objects directly against the base tables. You can then create the mobile ADF Business Component (EOs, VOs, etc). You can then create View Objects in your ADF Mobile Client application based on the database views, in order to retrieve the data you need exactly. In other words, instead of basing EO on the database view, create View Objects in the mobile applicaiton to mimic what you had in the View Object.
    Is there any other reason why you would need to access data via database views, instead of directly against base tables?
    Thanks,
    Joe Huang

  • How to delete a record in Database View?

    HI All,
    I have created a Database  View using tables LIKP,LIPS,VBUK,VBUP.
    In that view I am getting a extra record which is not exit in any tables
    but its getting in database view.
    I tried buffer memory refresh and even tried SE16n , SE11(thro CODE(DELE))..But record has not been
    deleted.
    Plz suggest wat shud i have to do to delete the record.
    Thanks in advance and help realy appriciate.
    Regards
    Steve

    >
    Steve Johnson wrote:
    > In that view I am getting a extra record which is not exit in any tables
    > but its getting in database view.
    Your intention should be in search of the root of that extra record. Not the deleting it without knowing anything.
    Sure, You have put join conditions correctly?
    Cheers

  • Z Database view is not showing all the entries?

    Hello
    Last year I have created a Z table, say, its name is Z_TABL_1, its working fine, say, there is around 1000 entries in PRD, well
    Last week I have created another 2nd Z table, its name is Z_TABLE_2, now it has 50 entries in PRD
    In both tables the key field os the same (VISITOR_NUMBER) and there is only one key field in both tables, its the same
    When creating the 2nd table I forgot to specify the CHECK table relationship in 2nd table refering 1st table, I mean, dependent table is 2nd whereas reference is 1st table
    Now, I created a database view, say, my_db_view on these 2 tables.
    When I opened this my_db_view in SE16, I expected 1000 (this 1st table count) entries, but am seeing just 50 (the 2nd table has only 50 entries) entries!!
    Pls. let me know how can I view all the 1000 entries in SE16 for my_db_view?
    Thank you

    Hi,
    in your DB view tables are joined and database views implement an inner join (you can check here: http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21ecab446011d189700000e8322d00/content.htm), that's why the system extracts only 50 records.
    It's not possible to have all the 1000 records using a database view.
    Marco

  • Progammatic update a table with a database view  in the page

    Hi All,
    I am using JDev 11g. With FOD database schema, I have one database view Products which comes from two tables Products_Base and Product_Transactions. I created three EOs (ProductEO, ProductsBaseEO, ProductTransactionsEO) and three VOs (ProductVO, ProductsBaseVO, ProductTransactionsVO) based on their EOs respectively.
    Here is my scenario. I have an ADF form which is based on the database view Products and is dragged and dropped from Data Controls->ProductVO. When an existing record is submitted, a backing bean method will be called to update the data against the table Products_Base (and the table Product_Transactions at the same time) programmatically. An update method updateProductPrice() is added into the Application Module and published it to UI Client. The submit button in the page is created by directly dragging and dropping Data Controls->updateProductPrice into the page. When I run it, I got the following error message,
    Failed to post data to database during "Update": SQL Statement "UPDATE PRODUCTS ProductEO SET COST_PRICE=:1 WHERE PRODUCT_ID=:2".
    What I don't understand here is that, in my update method updateProductPrice(), it supposes to update the table Products_Base. But from the error, it appears that it is trying to update the view Products. Can anyone give me a help on what I did wrong here? When I try to debug it, it throws an exception to this line in the method updateProductPrice(),
    getDBTransaction().commit();
    Here are my codes,
    The method which got called in the backing bean
    public String cb6_action() {
    DCBindingContainer bc = (DCBindingContainer)getBindings();
    FacesCtrlAttrsBinding ProductId = (FacesCtrlAttrsBinding)bc.get("ProductId");
    FacesCtrlAttrsBinding CostPrice = (FacesCtrlAttrsBinding)bc.get("CostPrice");
    JUCtrlActionBinding action =
    (JUCtrlActionBinding)bc.findCtrlBinding("updateProductPrice");
    DCDataControl dc = action.getDataControl();
    ApplicationModule am = (ApplicationModule)dc.getDataProvider();
    AppModule service = (AppModule)am;
    service.updateProductPrice(new Long(ProductId.toString()), CostPrice.toString());
    return null;
    public BindingContainer getBindings() {
    return BindingContext.getCurrent().getCurrentBindingsEntry();
    The update method defined in the Application module (AppModuleImpl.java)
    public void updateProductPrice(long productId, String costPrice) {
    ProductsBaseEOImpl product = retrieveProductById(productId);
    if (product != null) {
    try {
    product.setCostPrice(new Number(costPrice));
    getDBTransaction().commit();
    catch (JboException ex) {
    getDBTransaction().rollback();
    throw ex;
    catch (SQLException ex1) {
    getDBTransaction().rollback();
    private ProductsBaseEOImpl retrieveProductById(long productId) {
    EntityDefImpl productDef = ProductsBaseEOImpl.getDefinitionObject();
    Key productKey = ProductsBaseEOImpl.createPrimaryKey(new DBSequence(productId));
    return (ProductsBaseEOImpl)productDef.findByPrimaryKey(getDBTransaction(),productKey);
    Edited by: john wang on Oct 27, 2009 7:14 AM

    or
    merge into test
    using (select rowid rid
                , id
                , sub_id
                , startdate
                , lead (startdate) over (order by id, sub_id) - 1 ed
           from test) x
    on (x.rid = test.rowid)
    when matched then
       update set end_date = x.ed
    ;

  • Short Dump while fetching values from a Database view

    Hi ALL,
    Here is the code that is giving short dump
    SELECT * FROM ZVMATLMOVE INTO TABLE I_MATLMOVE
        WHERE BUDAT >= V_LASTRUN_DATE
        AND   WERKS IN S_WERKS
        AND   LIFNR IN S_LIFNR
        AND   EBELN IN S_EBELN
        AND   MATNR IN S_MATNR
        AND   BWART IN S_BWART
    (Please don't say that I am using * in the select query,
    I knew that it is not a good way of fetching values)
    Declaration of the internal table is:
    DATA  I_MATLMOVE LIKE ZVMATLMOVE OCCURS 0 WITH HEADER LINE.
    The variable V_LASTRUN_DATE is:
    DATA  V_LASTRUN_DATE LIKE SY-DATUM.
    We will be getting the lastrundate value from another table. And it is passing correct value (ex. 20060731)
    ZVMATLMOVE is a database view created for MKPF and MSEG table. And I checked both table were consistent.
    Dump Analysis:
    Runtime errors         DBIF_RSQL_SQL_ERROR          
    Exception              CX_SY_OPEN_SQL_DB
    Every thing is fine. But I don't know how it is going to dump. Any suggestions?

    Hi !
    It seams that your table is not correct / fully activated.
    To check it out you should try the following:
    - Go to the SE11
    - Give it your table name and go to "Display"
    - Check if the table is "active"
    - Choose "Utilities->Database Object->Check" and see
      if there are any errors
    - go back and choose "Utilities->Runtime Object->Check"
      and see if there are any errors
    If there are any errors - try to activate the table again. You may need the "Utilities->Database Utiliy" for that.
    After there are no more errors by checking all these your program should work.
    Regards
    Rainer
    Some points would be nice if thate helped a bit.

  • Help on a database view

    What database view would you use to ascertain whether transactions are being committed?
    Thanks
    Karthik

    A badly written application will have lots of uncommited records that is shown in V$TRANSACTIONS view. If you see many uncommited transactions then get the developers do the application tuning. This may also lead to many locks.

  • Dimension on a database view

    Hi,
    Can we create a dimension on a database view instead of a table?
    Thanks.

    For the purposes of ETL within OWB you can use a view as the basis of a dimension, you cannot generate dimension DDL for a dimension based on a view you will get the following error when trying to deploy;
    ORA-01702: a view is not appropriate here
    CWM2 does support such a dimension.
    Cheers
    David

  • Reading from a database view

    Im trying to read data from V_TVKBZ_ASSIGN view using the query *select * from  V_TVKBZ_ASSIGN into zV_TVKBZ_ASSIGN where VKORG = gs_bapikna102_gwa-SALESORG VTWEG = gs_bapikna102_gwa-DISTR_CHAN SPART = gs_bapikna102_gwa-DIVISION.*
    endselect.
    However i get the error message " V_TVKBZ_ASSIGN" is not defined in the ABAP Dictionary as a table,projection view, or database view.
    How do i go ahead with this query?

    Since V_TVKBZ_ASSIGN  is a maintenance view you can't write select query for that. For select query it should be a database table or database view or projection view . Better you can write the select query for underlying tables of that view like
    TVKBZ
    TVBUR
    TVKO
    TVKOT
    TVKBT
    TASSIGN_SD_VKORG
    TVKOS
    TVKOV
    TVTW
    TSPA
    TVTWT
    TSPAT

  • How to get access key while creating database view in R3

    Hi all experts,
    I am new to SAP so please forgive my ignorance.
    From R3, I am trying to create a new database view named ZVENDOR_ATTR  which will be based on LFM1.
    When i go to SE11 -> chose view and click create then it shows a pop up window that says "you are not registered as a developer. Please register in the Online Service System (OSS). In the OSS you will receive an access key."
    I don't know how can i get the access key and proceed now. Please note that i have installed this BW3.5 and R3 on my laptop. From the default user ddic, i have copied and created a new user 'sapuser1'. I am now using the sapuser1 to logon  and attempting to create the above mentioned Database view. It seems like this sapuser1 as it is copied from ddic is not a developer.
    So anybody can please help  how to create/get this access key to proceed  further.
    I will give full points. Please help.
    Thank you so much in advance
    ak

    Thanks All,
    Does it mean that i can not create any database object without the access key from service.sap.com? As i told that i installed this BW3.5 / R3 on my laptop to train myself but i don't have an account on service.sap.com.
    However i can login to R3 system as admin (i have access to the system using ddic or spcpic). Is there a way that a new user with deveoper role can be created by the admin without going to service.sap.com.
    Please advise.
    Thanks.
    ak

  • HR transactions and functionality and creation of Database view

    Hi Guys
        I am new to HR module . can anybody send me the list of transaction codes with HR functionalities.
    I also have to made a database view from hrp1001 and hrp1010 table to list all chief positions who are head of business group , Business unit , Site etc .
    Could you help me in creating this databse view.

    Hi,
    These are HR Infotypes
    0000    Events
    0001    Org assignment
    0002    Personal info
    0003    Payroll data
    0007    Work time
    0008    Basic pay
    0014    Reoccurring pay
    0015   1 X pay
    0027   Cost Center
    0041   Event Dates
    0057   Membership dues
    0165   Over ride  to limits on deductions
    0167   Health
    0168   Insurance
    0169   Savings
    0170   Spending   
    0194   Garnishment reduction
    0195   Garnishment order
    0207   Residence Tax
    0208   Work Tax
    0209   Unemployment Tax
    0210   Withholding
    0216   Garnishment adjustment
    0221   Adjustment
    0267   Off cycle
    2005   OT
    2010   Catts direct to cluster
    1000   Infotypes 1000 – 1999 are PD Relationship infotypes
    Logical Database (PNP) ·     
    Programming with Infotypes ·     
    Processing Time infotypes/Cluster ·     
    Processing Payroll infotypes/Cluster
    In OM level hrp 1001 and 1010 will be there.
    If u want total transactions goto SE11->TSTC Table.
    ****POINTS TO BE CONSIDERD
    Thanks
    P.SRIKANTH

Maybe you are looking for

  • [SOLVED] Intel i7-3920XM Laptop CPU Linux Kernel Support

    Recently, I purchased a laptop with an Intel i7-3920XM CPU, with the intention of utilizing it for scientific computing (I've become strongly interested in machine learning and artificial neural networks).  Supposedly, the CPU has a variable clock sp

  • Integrating Apache with Tomcat?

    Anyone have a guide to integrating Apache with Tomcat using mod_jk? I followed some guides online, but they all seem really dated with some obscure references. This seems like it should be on the top of the list....

  • How far session.setAttribute("user",user) is safe for login checks

    hi, i would like to discuss how far the method of session.setAttribute() can save unauthorized access of pages. as far as i know when a user logs in we set a session attribute say user and set its value to the entered username. To prevent the unautho

  • FSB/ and shut down

    My first post here please help. i tried doing a search on my problem but problem still here. I just put this machine together last night and a couple of issues have come up. 1: Machine boots up fine and shuts down fine but when i choose restart from

  • How to analyse the date flow diagram

    hi guys,             my question is how to analyse in detail the data flow diagrams and functional and technical spes. how can i understant in detail. regards, manju