Can I write a SELECT query on maintenance view?

Hi,
Can we write a select query on maint. view? If not what are the views on which we can write the select queries?

hi,
you can write select query for maintenance view, database view and projection view but not helpview as it is only intended for f4 help.
reward if helpful
prasanth

Similar Messages

  • Can we write the select statement on maintence view for data retreval

    Can we use the select statement on maintence view
    Regrads
    Diva

    No. U cannot write a select on maintenance view.

  • Can u write the following query without using group by clause

    select sp.sid, p.pid, p.name from product p, supp_prod sp
    where sp.pid= p.pid and
    sp.sid = ( select sid from supp_prod group by sid
    having count(*) =(select count(*) from product));
    thru this, we retrieving all the products delivered by the supplier.
    Can you write the following query without using the group by clause

      select sp.sid, p.pid, p.name
        from product p, supp_prod sp
       where sp.pid= p.pid the above query will still retrieve all the products supplied by the supplier. sub-query is not necessary.
    maybe if you can post some sample data and output will help us understand what you want to achieve.

  • How to write XSJS Select Query with input parameters

    Hello Experts,
    I am creating a xsjs file and in that file I am trying to write a Select Query based on a Calculation View
    I have tried it the following way:
    var query = 'SELECT TOP 100 \"Name\", \"Address\", \"City\", \"Country\" FROM \"_SYS_BIC\".\"Test.HL/AddressView\"'
        + 'WITH PARAMETERS(\'PLACEHOLDER\' = (\'$$P_Name$$\', \' Akhil \'),'
      + '\'PLACEHOLDER\' = (\'$$P_City$$\', \' Lucknow \'))';
    But it gives me the "Mixed spaces and tabs error".
    How should I write XSJS Select Query with input parameters?
    Regards,
    Rohit

    >But it gives me the "Mixed spaces and tabs error".
    Mixed spaces and tabs has nothing to do with the syntax of the statement. You used both spaces and the tab in the content - which JSLint doesn't like.  Remove the beginning spaces of each line and use only one or the other.
    The actual syntax of your statement doesn't look right.  The problem is that you are escaping the \ when you don't need to if you are using ' instead of " for your string.  You escape with \" in the first line but then escape with \' in the 2nd and 3rd line.  That is going to cause serious parsing problems with the command.

  • Can we replace this SELECT query by more efficient code

    can we replace this SELECT query by more efficient code ?:-
    SELECT * FROM zv7_custord
         INTO TABLE G_T_ZV7_CUSTORD
         WHERE ( SENDER in S_SENDER and
                 ORDNUM in S_ORDER  and
                 ZDATE   in S_DATE ) OR
               ( SENDER in S_SENDER AND
                 STATUS = SPACE )
         ORDER BY IDOCNUM.

    Hi
    U can leave ORDER BY option and sort the table by yourself and try to split the query:
    SELECT * FROM zv7_custord
         INTO TABLE G_T_ZV7_CUSTORD
         WHERE  SENDER in S_SENDER and
                       ORDNUM in S_ORDER  and
                       ZDATE   in S_DATE .
    SELECT * FROM zv7_custord
         APPENDING TABLE G_T_ZV7_CUSTORD
         WHERE  SENDER in S_SENDER        and
                       NOT ORDNUM in S_ORDER  and
                       NOT ZDATE   in S_DATE       and
                       STATUS = SPACE
    or
    SELECT * FROM zv7_custord
         INTO TABLE G_T_ZV7_CUSTORD
         WHERE  SENDER in S_SENDER and
                       ORDNUM in S_ORDER  and
                       ZDATE   in S_DATE .
    SELECT * FROM zv7_custord
         APPENDING TABLE G_T_ZV7_CUSTORD
         WHERE  SENDER in S_SENDER        and
                       STATUS = SPACE.
    * Sort the table key fields
    SORT G_T_ZV7_CUSTORD BY <KEY1> <KEY2> .....
    DELETE ADJACENT DUPLICATES FROM G_T_ZV7_CUSTORD COMPARING <KEY1> .....
    Max

  • Select query in materialized view with two dblinks

    Hi All,
    We have oracle 10g On windows.
    We are trying to create materialized view. Scenario is we have base table on other database and we are creating mview on different database.
    Basa database have two schema's and i am selecting records from that two schema's using two private db links.
    But when i am tryin gto create mview its not getting created. After 15 hrs. its still showing creation command and not finished.
    Query is :-
    Is it good practice to have two db links in select query of materialized view.

    Billy  Verreynne  wrote:
    Chanchal Wankhade wrote:
    Is it good practice to have two db links in select query of materialized view.Same db link being used twice, or two different db links?
    If the former, you ideally want the local Oracle db to send the join to the remote database, and for the remote database to drive the join between those 2 tables. There is a hint (<i>driving_site</i>) that can be used - or the join query can be defined on the remote database as a view, and the local materialised view can then use that remote view.
    If you have 2 different db links and joining across these - usually a bad idea to perform distributed database joins. There are lots of limitations as to how the tables can be joined. Worse case, full table scans of both remote tables, pulling all the rows from the 2 remote database tables to the local database, and joining these on the local database.
    I have seen some severe performance issues in the past as a result of distributed joins. I'll rather use 2 materialised views for pulling both distributed tables's data locally, and then do the join on local data (using indexes, partition pruning, etc)Hi Billy,
    My scenario is i have two database database A and database B. Database A is having two schema's SCOTT AND HR. SCOTT schema have select privileges on HR schema.
    DB LINK is between Database B to Database A. name is db.link.B.A.oracle.com.
    What if i priovide while creating materialized view, the schema name before the table name in database B for this particuler table so it will pick up the table from that schema using same DB LINK(db.link.B.A.oracle.com.) that i am using to fetch records from SCOTT schema.
    Above schnario is like two base schema's and one db link using two schema.

  • How to write the select query with complex where condition

    Hi all,
    Can u help me in writing  following select query.
    select * from zu1cd_corr where time_stamp between firstday and lastday .
    In the above query time_stamp contains the date and time.
    where as firstday and lastday contains the dates.
    I need to compare the date in the time_stamp with the firstday and lastday.
    But time_stamp contains the time also and it is char of 14 characters length.

    Hi,
    If that is the case u can do as advait specified....
    if the firstday and secondday are select-options then declare two more variables having 14 character length and then concatenate '000000' to firstday variable and '240000' to last day variable and then write ur query.
    CLEAR : lv_firstday,
                 lv_lastday.
    concatenate firstday '000000' to lv_firstday.
    concatenate lastday '240000' to lv_lastday.
    ranges : r_Date for zu1cd_corr-time_stamp.
    r_date-sign = 'I'.
    r_date-option = 'BT'.
    r_Date-low = lv_firstday.
    r_Date-high = lv_lastday.
    append r_date.
    select * from zu1cd_corr  into table it_zu1cd_corr where time_stamp in  r_Date.
    I hope it helps.
    Regards,
    Nagaraj

  • How can we split a select query to 3 or 4 if it is fetching much records?

    I am running a query like:
    select * from table_name
    it will be fetching 152940696 records. Now i want to fetch this result as 3 or 4 select statements. That is, in the second query I want to fetch the records from where i stopped in the first query. and similar for the 3rd i have to continue from the 2nd query. And for the 4th query i have to start from where i have stopped in the 3rd query.
    when i tried with rownum we can fetch the records upto < or <= to a particular count like 100000000. But above this count i cannot fetch using rownum. Because > or >= wont work with rownum.
    Is there anyother way to split the select query as i explained.
    Thanks in advance

    I'll assume you want to split the query up for performance reasons.
    The easiest way to do this if you have the license is to use the parallel query option, which can help, hurt or do nothing. The only way to find out is to try. PQO would be best from a performance standpoint if possible, provided it will do what you need.
    Failing that as has been suggested you need a logical, scalable way to divide up the queries. It has already been pointed out that the rownum solution probably will not work correctly. Also, the MINUS with ROWNUM idea has the disadvantage of having to read a lot of the same data twice, making the query run longer.
    Perhaps a range would provide a way to split up the data - something like
    select whatever
      from table
    where primary_key < 10000000;
    select whatever
      from table
    where primary key between 10000001 and 199999999;
    ...

  • Can any one send select query for this?

    Hi,
    can any one plese send select query for the following query.please send as early as possible.
    Loop through the I_BSID internal table to fill records in I_OUTPUT.Combine data from I_BSID, I_KNKK, I_KNKK_KNKLI, I_KNA1 and I_KNVV into I_OUTPUT based on the linking conditions .Field Description Source are
    I_OUTPUT-BUKRS     Company code     I_BSID-BUKRS
    I_OUTPUT-KUNNR     Customer number     I_BSID-KUNNR
    I_OUTPUT-NAME1     Customer Name     I_KNA1-NAME1
    I_OUTPUT-KNKLI     Credit account     I_KNKK-KNKLI
    I_OUTPUT-KDGRP     Customer Group     I_KNKK-KDGRP
    I_OUTPUT-KLIMK     Credit Limit     I_KNKK_KNKLI-KLIMK
    I_OUTPUT-KVGR1     Business Unit     I_KNVV-KVGR1
    I_OUTPUT-REBZG     Invoice Number     I_BSID-REBZG
    I_OUTPUT-BLDAT     Invoice Date     I_BSID-BLDAT
    I_OUTPUT-WAERS     Document Currency     I_BSID-WAERS
    I_OUTPUT-DUE_DATE     Due Date     Based on below
    Calculation
      Get the Payment terms days combining I_BSID and I_T052 based on the linking conditions mentioned above.    Note : a) Baseline Date : If baseline date I_BSID-ZFBDT is blank , use the Document Date.b) Payment Term Days :If I_BSID-ZBD3T is not blank, take this as Payment Term Days for Due date calculation.
                       If I_BSID-ZBD3T is Blank, then get payment term days from I_T052 based on I_BSID-ZTERM. If there are more than one record in I_T052 for the given Payment term, get the day part from baseline date and select the first record where the day limit I_T052-ZTAGG is greater than the day part.If I_BSID-ZBD3T is blank and I_BSID-ZTERM is also blank, then take Y000 (Due Immediately) as Payment term and proceed with the above logic. Set the payment term field blank while printing.
    Calculate Due date : For Debits, Determine Due Date = Baseline Date + Payment term Days(not discount days)                                                          For  Credits  Due date = Baseline date.Then, move the amount I_BSID-DMBTR to respective buckets (Not yet Due, Current Due, Past due 1-30, Past Due 31-60 etc.)  Based on the due date.
    Thanks&Regards,
    praveen kumar.A

    HI,
    To get Open Items you can use Function module:
    data:i_items TYPE STANDARD TABLE OF rfpos.
    CALL FUNCTION 'CUSTOMER_OPEN_ITEMS'
    EXPORTING
    bukrs = p_bukrs
    kunnr = wa_customer-kunnr
    TABLES
    t_postab = i_items
    EXCEPTIONS
    no_open_items = 1
    OTHERS = 2.
    Table I_items will have all the open items for that Customer in the given company code.
    Well for Clear Items: Try
    GET_CLEARED_ITEMS or FMITPOFM_CLEARED_ITEMS_GET.
    Hope it helps.
    Manish

  • I have to write a select query

    hi
      i have a select-options DATE , i want to make a select QUERY which select all data Staring Date(Initial Date) to 1 less to DATE-LOW.
         For that i define a variable i.g. ODDATE = DATE-LOW - 1. this contain date 1 less then LOW.
         But now how i can make select statement.
    PLZ Guide me

    see the logic given below.........
    tables vbak.
    select-options: s_date for vbak-erdat no-extension.
    data:
    w_date1 like sy-datum,
    w_date2 like sy-datum.
    w_date1 = s_date-low - 1.
    w_date2 = s_date-low.
    select ......
    where
    date between w_date1 and w_date2.
    Reward points if useful, get back in case of query...
    Cheers!!!

  • Query on Maintenance Views

    Hello Experts,
    Can we query on (using select statement) on a maintenance view?
    Thanks.

    Hi,
    No you can't. Better query the tables from which view is created.
    Regards,
    Atish

  • Selection condition in maintenance view

    I have one table with data related to 5 systems.
    MSF, RET, SER, BOB, SAV, LED.
    I need t o create views with related data for each system. But system BOB contains data related to MSF and RET, So instead of creating view for that i have to add MSF related data to MSF view and RET related data to RET view from BOB system. These all are from one table only.Can you please suggest me the selection condition for that in maintenance view.
    Thanks.

    thanks

  • Select query written on view giving dump

    Hi All,
    I have written the following query on COAS view in my code:
          SELECT aufnr bukrs INTO TABLE gt_aufnr
            FROM coas
              WHERE
                    aufnr IN r_aufrm AND
                    auart IN s_auart AND
                    autyp = c_autyp_01 AND
                    kokrs = c_kokrs_mbca.
    When records in range r_aufrm are too many like 6000 or so it gives me a run time error on this query - DBIF_RSQL_INVALID_RSQL. Error description says size of select query is large.
    Question : Is this bug coming because I am using the view. If i select the records on table AUFK (only table on which the view is created), will it rectify the problem?? I am asking this because it's in production and I cant make any change and test then and there.
    Note: the range r_aufrm contains two types of records for AUFNR - 1. with sign GE and others with sign LE. So I cannot use for all entries. If I still can, please tell me how?
    Thanks a looot!
    Waiting for the response,
    Navita

    Thanks All!!
    I think, this range limit has caused the problem. Range limit is 999 records.
    Just one question I have. At runtime when I check the number of entries in r_aufrm in the query, I get 6000 entries. So, does it allow 6000 records to enter the range variable even if it has a limit of 999. Is it the case that, in select query only it will throw a dump if records in range exceed 999??
    SELECT aufnr bukrs INTO TABLE gt_aufnr
    FROM coas
    WHERE
    aufnr IN r_aufrm AND
    auart IN s_auart AND
    autyp = c_autyp_01 AND
    kokrs = c_kokrs_mbca.
    Please clear my doubt.
    Thanks a lot for ur help!!!!
    Navita

  • Select statement on maintenance view.

    Hello Friends,
    I have a quick question. I have a maintenance view, and I want to do a select statement on this view in an ABAP program, but seems like the view is not filled with data when running the program.
    How do I get the view to be populated at runtime in the ABAP program? the work area and the internal table is TYPE of the  view..
    Here's the code:
    select * into wa
      from view
      where bukrs = P_BUKRS
               vtweg in S_CHNL.
        append wa to it.
      endselect.
    best regards B

    Hello B,
    Just to inform you: "You can select data only from Database Views".
    You can design a work-around for this, by taking look @ the Join tables. May i know form which View you want to get the data?
    BR,
    Suhas

  • Can I write a Java Program in Narrative view and make it work?

    Hi All,
    I got a requirement which demands me to write a java program in narrative view. As per my knowledge its not possible..........but do you guys have any work around or any other way to get that java program run when the report runs and the out must be seen on the dashboard???
    Thanks in advance,
    DK

    Joe thanks for the reply. I would like to communicate with a JavaScript API (MapQuest) by declaring a Proxy server and port number to communicate. Or I can directly use Java SDK to display maps.
    This is more a general question. If I can execute a java program then I will try doing many things.
    Thanks,
    DK

Maybe you are looking for

  • "iTunes has encountered a problem and needs to close."  Anyone?

    "iTunes has encountered a problem and needs to close." This is what, i get whenever I try to sign onto my Itunes. I have had an Itunes account since 2005 and have never had a problem with upgrades. Then I try to upgrade to 8.0 3 months ago, and haven

  • Can anyone tell me how I can transfer iTune purchases made [by the same user] under a different Apple ID?

    Hi guys - have just purchased an I-Pad and downloaded Pages from I-Tunes account onto my MacBook Pro, with the intention of syncing documents between the Macbook and my I-Pad via the Cloud... however, without noticing it at the time, I must have had

  • Weblogic Service Invocation Error-Urgent help required.

    failed to invoke operation 'searchCustomerDetails' due to an error in the soap layer (SAAJ); nested exception is: Message[ failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException: type mapping lookup failure on cl

  • FLV Stops Early

    I am having problems trying to play an FLV with Flash Media Server 3. The FLV stops early with only a NetStream.Play.Stop. I do not believe this is a buffering issue where the end of the file is reached before the client plays the end of the file as

  • 5800 not reading sim cards anymore!

    hi guys, I am in the UK on the O2 network and i just recently cancelled my contract with them. I was using the 5800 with this contract and it was cancelled today when i checked my phone and there was no operator signal. So i proceeded to switch that