Can we create a view involving a standard table and a ZTable ?

Hi,
I created a view based on 2 tables : EKKO and a Ztable having EBELN field in common.
Now, when i try to create a PO in ME21N , this view should get updated.But,It doesn't happen so.
So i want to confirm that is it not possible to create a view on a Ztable...
Also can anyone suggest any other option to do so...

Hi,
   Yes you can create a view using a standard view using a standard Data base table and a custom data base table. But this getting updated would not be done by the standard program of Tcode ME21N, I reckon you need to write the logic of updation in an enhancement.
Regards,
Murthy.

Similar Messages

  • Can I create a view based on two tables that have the same column name?

    I have two tables A and B. Each table has 50+ columns.
    I want to create a view that includes all the columns in A and all the columns in B. I created a view with a select statement that says
    Select A.*, B.*
    From A, B
    where A.id = B.id
    It returns an error because in each table I have a column that keeps track if a record has been changed called Modified_By. That's where it chokes up on I figure. I would like to write the view without explicitly writing each column name from A and B as part of the select statement. The actual select statement works fine and only bombs when trying to turn the select statement into a view.

    You will have to type the full column list at least once. You can save a few keystrokes (i.e. alias. on every column) by providing the column names to the CREATE part instead of in the SELECT part. Something like:
    SQL> desc t
    Name                                      Null?    Type
    ID                                                 NUMBER
    NAME                                               VARCHAR2(10)
    SQL> desc t1
    Name                                      Null?    Type
    T_ID                                               NUMBER
    LOC_ID                                             NUMBER
    NAME                                               VARCHAR2(15)
    SQL> CREATE VIEW t_v (id, t_name, t_id, loc_id, t1_name) AS
      2  SELECT t.*, t1.*
      3  FROM t, t1
      4  WHERE t.id = t1.t_id;
    View created.HTH
    John

  • How can I create updateable views

    Hi,
    When I create a new page using form --> master detail form, I put one view as the master table and another view as the detail table. By default, the detail table is set as the type SQL Query(updateable report). I guess this is the reason I can add row to the detail table. Then, on the same page, I wanna create another detail table based on another view that will relate to the master table, but this time, I don't have the option to set this detail table as the type(updateable report), just SQL Query and I couldn't add row to this detail table as well.
    So, I just wonder if there is a way to assign more than one view to a master table and the views in the detail table are all updateable(meaning I can insert or delete).
    Thanks!!

    Okay, Here's a quick rundown on how to build a manual form using APEX_ITEM and collections. The process goes in 4 steps: gather the data, display the data, update based on user input, then write the changes. Each step requires it's own piece of code, but you can extend this out as far as you want. I have a complex form that has no less than a master table and 4 children I write to based on user input, so this can get as complex as you need. Let me know if anything doesn't make sense.
    First, create the basic dataset you are going to work with. This usually includes existing data + empty rows for input. Create a Procedure that fires BEFORE HEADER or AFTER HEADER but definitely BEFORE the first region.
    DECLARE
      v_id     NUMBER;
      var1     NUMBER;
      var2     NUMBER;
      var3     VARCHAR2(10);
      var4     VARCHAR2(8);
      cursor c_prepop is
      select KEY, col1, col2, col3, to_char(col4,'MMDDYYYY')
        from table1
        where ...;
      i         NUMBER;
      cntr      NUMBER := 5;  --sets the number of blank rows
    BEGIN
      OPEN c_prepop;
        LOOP
          FETCH c_prepop into v_id, var1, var2, var3, var4;
          EXIT WHEN c_prepop%NOTFOUND;
            APEX_COLLECTION.ADD_MEMBER(
            p_collection_name => 'MY_COLLECTION',
            p_c001 => v_id,  --Primary Key
            p_c002 => var1, --Number placeholder
            p_c003 => var2, --Number placeholder
            p_c004 => var3, --text placeholder
            p_c005 => var4 --Date placeholder
        END LOOP;
      CLOSE c_prepop;
      for i in 1..cntr loop
        APEX_COLLECTION.ADD_MEMBER(
            p_collection_name => 'MY_COLLECTION',
            p_c001 => 0, --designates this as a new record
            p_c002 => 0, --Number placeholder
            p_c003 => 0, --Number placeholder
            p_c004 => NULL, --text placeholder
            p_c005 => to_char(SYSDATE,'MMDDYYYY') --Date placeholder
      end loop;
    END;Now I have a collection populated with rows I can use. In this example I have 2 NUMBERS, a TEXT value, and a DATE value stored as text. Collections can't store DATE datatypes, so you have to cast it to text and play with it that way. The reason is because the user is going to see and manipulate text - not a DATE datatype.
    Now build the form/report region so your users can see/manipulate the data. Here is a sample query:
    SELECT rownum, apex_item.hidden(1, c001),  --Key ID
         apex_item.text(2, c002, 8, 8) VALUE1,
         apex_item.text(3, c003, 3, 3) VALUE2,
         apex_item.text(4, c004, 8, 8) VALUE3,
         apex_item.date_popup(5, null,c005,'MMDDYYYY',10,10) MY_DATE
    FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = 'MY_COLLECTION'This will be a report just like an SQL report - you're just pulling the data from the collection. You can still apply the nice formatting, naming, sorting, etc. of a standard report. In the report the user will have 3 "text" values and one Date with Date Picker. You can change the format, just make sure to change it in all four procedures.
    What is critical to note here are the numbers that come right before the column names. These numbers become identifiers in the array used to capture the data. What APEX does is creates an array of up to 50 items it designates as F01-F50. The F is static, but the number following it corresponds to the number in your report declaration above, ie, F01 will contain the primary key value, F02 will contain the first numeric value, etc. While not strictly necessary, it is good practice to assign these values so you don't have to guess.
    One more note: I try to align the c00x values from the columns in the collection with the F0X values in the array to keep myself straight, but they are separate values that do NOT have to match. If you have an application you think might get expanded on, you can leave gaps wherever you want. Keep in mind, however, that you only have 50 array columns to use for data input. That's the limit of the F0X array even though a collection may have up to 1000 values.
    Now you need a way to capture user input. I like to create this as a BEFORE COMPUTATIONS/VALIDATIONS procedure that way the user can see what they changed (even if it is wrong). Use the Validations to catch mistakes.
    declare
      j pls_integer := 0;
    begin
    for j1 in (
      select seq_id from apex_collections
      where collection_name = 'MY_COLLECTION'
      order by seq_id) loop
      j := j+1;
      --VAL1 (number)
      apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
          p_seq=> j1.seq_id,p_attr_number =>2,p_attr_value=>wwv_flow.g_f02(j));
      --VAL2 (number)
      apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
          p_seq=> j1.seq_id,p_attr_number =>3,p_attr_value=>wwv_flow.g_f03(j));
      --VAL3 (text)
      apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
          p_seq=> j1.seq_id,p_attr_number =>4,p_attr_value=>wwv_flow.g_f04(j));
      --VAL4 (Date)
      apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
          p_seq=> j1.seq_id,p_attr_number =>5,p_attr_value=>wwv_flow.g_f05(j));
    end loop;
    end;Clear as mud? Walk through it slowly. The syntax tells APEX which Collection (p_collection_name), then which row (p_seq), then which column/attribute (p_attr_number) to update with which value (wwv_flow.g_f0X(j)). The attribute number is the column number from the collection without the "c" in front (ie c004 in the collection = attribute 4).
    The last one is your procedure to write the changes to the Database. This one should be a procedure that fires AFTER COMPUTATIONS AND VALIDATIONS. It uses that hidden KEY value to determine whether the row exists and needs to be updated, or new and needs to be inserted.
    declare
    begin
      --Get Hourly Loads from Collection
      for y in (select TO_NUMBER(c001) x_key, TO_NUMBER(c002) x_1,
                 TO_NUMBER(c003) x_2,
                 c004 x_3,
                 TO_DATE(c005,'MMDDYYYY') x_dt
               FROM APEX_COLLECTIONS
               WHERE COLLECTION_NAME = 'MY_COLLECTION') loop
        if y.x_key = 0 then  --New record
            insert into MY_TABLE (KEY_ID, COL1,
                COL2, COL3, COL4, COL5)
              values (SEQ_MY_TABLE.nextval, y.x_1,
                  y.x_2, y.x_3, y.x_4, y.x_dt);
        elsif y.x_key > 0 then  --Existing record
            update MY_TABLE set COL1=x_1, COL2=x_2, COL3=x_3, COL4=x_4, COL5=x_dt
             where KEY_ID = x_key;
        else
          --THROW ERROR CONDITION
        end if;
      end loop;
    end;Now I usually include something to distinguish the empty new rows from the full new rows, but for simplicity I'm not including it here.
    Anyway, this works very well and allows me complete control over what I display on the screen and where all the data goes. I suggest using the APEX forms where you can, but for complex situations, this works nicely. Let me know if you need further clarifications.
    And there you have it.

  • Can we create materialized view on the top of another materialized view.

    Hi ,
    can we create materialized view on the top of another materialized view.
    Thanks
    Naveen

    Welcome , Just remember is not good apporch to do that since performance when MV refresh
    Please mark this thread as answered .

  • Can I create Materialized View base on a view?

    Dear all,
    I has a view named view01 base on scott.emp. Can I create Materialized View base on view01? How to do it.
    please help me.

    Yes, you can :
    create materialized view my_mview as select * from scott.view01;
    Of course this is the simplest syntax. You may want to add options, depending on the refresh mode and other things. For a complete documentation see
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_6002.htm#sthref4967

  • How can i create i view?

    Hi
    how can i create i view? give me some docs regarding this

    Hi,
    go thro this link
    /thread/450007 [original link is broken]
    <u></u>Re: i view
    Regards
    Bhargava
    pts r welcome

  • Can you create a template that has a header and footer to forms?

    Can you create a template that has a header and footer to forms?

    Yes but how are they going to create the Landscape versions?
    The problem with doing it in Pages '09 as rotated content is that the Headers and Footers are not rotated and there is inherent clumsiness in the rotated content usually being too large for the page when viewed at 90°.
    Best to make it in two or more separate documents.
    Peter

  • Can I create books for the iBookstore for iPad and iPhone using Pages?

    Can I create books for the iBookstore for iPad and iPhone using Pages?

    No problem, Peter. iBooks Author makes a lot of things much easier than trying to grapple with a standard epub, but it also has some big limitations, like iPad only, and ibookstore only.
    EDIT It's not really suitable for something like a novel, for example, although it's great when you need lots of illustrations and movies and such.

  • Certain Numbers templets allow you to drag and drop contacts to populate cell data, how can I create that functionality in my own tables?

    Certain Numbers templets allow you to drag and drop contacts to populate cell data, how can I create that functionality in my own tables?

    If you haven't come across the workarounds thread you may find helpful tips there on this and other ways to work with Numbers 3.
    ronniefromcalifornia discovered how to bring contacts into Numbers 3. As described in this post:
    "Open Contacts
    Select all the cards you want
    Copy
    In Numbers, in a table, select cell A1
    Paste
    Boom. Works great. Even brought in the pictures. Cool."
    So instead of drag and drop, just select in Contacts, copy, and paste into Numbers
    SG

  • Can we create a single bdc for raw materials , and for some other transacti

    hi
    can we create a single bdc for raw materials , and for some other transaction? how?

    Hi Jyothsna
    For one transaction you will have to build your bdc table according to the recording for that transaction and then call that transaction using the bdc table. For another transaction , you will again have to build the bdc table with the details of that transaction.
    You cannot call all at one shot.
    Cheers
    shivika

  • Can one create a smart playlist for multiple podcasts and to...

    Can one create a smart playlist for multiple podcasts and to play one after the other on your iPod? I want to combine podcasts of the same topic in a smart playlist. When I tried to do this I chose smart playlist, album starts with, and then did it again for each podcast I wanted. That didn't work. If it can be done how do you do it?
    I have a fifth generation iPod which is always updated to the latest as well as the itunes.

    Say for example I want to put different car related podcasts in one smart playlist. Car related podcasts such as Wall Street Journal Car Cast and NPR Car Talk. Can it be done and if so how?

  • Can I create a JAR that is an Applet and Desktop app at the same time?

    Hi mates.
    Can I create a JAR that is an Applet and Desktop app at the same time?
    Thanks.

    Ricardo_Ruiz_Lopez wrote:
    ..I have one problem, I want a JMenuBar but I can't add it inside a jPanel.
    Any idea?
    SSCCE
    It can be compiled/run as an applet or application something like this (e.g. for a Win command prompt).
    C:\Users\Andrew\Hybrid> javac Hybrid.java
    C:\Users\Andrew\Hybrid> java Hybrid
    C:\Users\Andrew\Hybrid> appletviewer Hybrid.java
    C:\Users\Andrew\Hybrid> // YES the previous line requires a '.java'  suffix - trust me.  ;-)Code
    // <applet code='Hybrid' width='600' height='400'></applet>
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class Hybrid extends JApplet {
        public void init() {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    GUI gui = new GUI();
                    getContentPane().add( gui.getMainPanel() );
                    setJMenuBar( gui.getMenuBar(false) );
                    validate();
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    JFrame f = new JFrame("Test Hybrid");
                    f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
                    GUI gui = new GUI();
                    f.setContentPane(gui.getMainPanel());
                    f.setJMenuBar(gui.getMenuBar(true));
                    f.pack();
                    f.setLocationRelativeTo(null);
                    f.setVisible(true);
    class GUI {
        private JPanel mainGui = null;
        private JMenuBar menuBar = null;
        public JPanel getMainPanel(){
            if (mainGui==null) {
                mainGui = new JPanel( new BorderLayout(3,3) );
                mainGui.setBorder( new EmptyBorder(5,5,5,5) );
                JToolBar tb = new JToolBar();
                for (int ii=1; ii<6; ii++) {
                    tb.add( new JButton( "Btn " + ii) );
                    if (ii%2==0) {
                        tb.addSeparator();
                mainGui.add(tb, BorderLayout.NORTH);
                mainGui.add( new JSplitPane(
                    JSplitPane.HORIZONTAL_SPLIT,
                    new JScrollPane(new JTree()),
                    new JTextArea(20,20)
                    ), BorderLayout.CENTER );
                mainGui.add(new JLabel("Main user interface.."), BorderLayout.SOUTH);
            return mainGui;
        public JMenuBar getMenuBar(boolean isFloating) {
            if (menuBar == null) {
                menuBar = new JMenuBar();
                if (isFloating) {
                    JMenu fileMenu = new JMenu("File");
                    fileMenu.add( new JMenuItem("Exit") );
                    menuBar.add( fileMenu );
                JMenu helpMenu = new JMenu("Help");
                helpMenu.add( new JMenuItem("About") );
                helpMenu.add( new JMenuItem("Help") );
                menuBar.add( helpMenu );
            return menuBar;
    The code is not intended to be well designed. It is just written to be brief and demonstrate a few points.
    Edit 1:
    Added some access keywords in a passing gesture that the sample aimed at encapsulation.
    Edited by: AndrewThompson64 on Sep 2, 2010 1:34 PM

  • How can I create a view of top five teams averages based on individual averages of that team?

    I have created a list that groups teams by their Team name (Team column) with the individuals members (participants column) averages and their team average (total average view option).  I want to only display the top five teams that have the overall
    top team averages.  I have a list that contains a team name, average minutes, week, and participant. The team manager plugs in each week a new entry for each participant on the team.  I have a view that computes each team average but I want a view
    of the top five teams based on the top averages of the team (not individual participant average).  Unfortunately, I can only seem to get all teams grouped with individuals of that team, their individual averages and the team average but can't figure out
    only how to show the top five teams top average.  Because it's a total (team average) and not a separate column, I can't get a view by team based on total average.  I can by top individual average but not by the team.  Can some one help me figure
    out a solution?

    A calculated column won't work because a calculated column can only reference the individual item, not the entire list or a subset.
    You could do javascript to build this, but to me it's easier to just use Excel.
    Andy Wessendorf | Solution Foundry [email protected]

  • Can't create a new SQL Azure Standard Tier db

    I'm having an issue creating a new sql azure standard tier db. Here's the basic steps I've done to migrate a web tier db.
    Register for the sql preview programme
    https://account.windowsazure.com/PreviewFeatures
    Perform a db export to blob storage
    use the + (new) button to create a new SQL db
    select the import option
    browser to your saved export
    hopefully see the new tiers as options in dialog. 
    The new tiers require a separate server to web. Can create this from the import dialog
    I have 2 independent azure accounts, the above process worked for my test account but for the live account where I was also experimenting after success on the test account I hit an issue. I request to create a new server whilst importing. This step seems
    to work but then the actual import fails with this msg
    "Error encountered during the service operation. 
     Could not import package.
     Error SQL72014: .Net SqlClient Data Provider: Msg 40823, Level 16, State 1, Line 1 Invalid value provided for parameter EDITION. Please provide a value that is valid on server version 1.0.
     Error SQL72045: Script execution error. The executed script:
     CREATE DATABASE [$(DatabaseName)] COLLATE SQL_Latin1_General_CP1_CI_AS
     (EDITION = 'Standard', MAXSIZE = 1 GB)"
    Tried a couple of times but no joy. Using the portal I can browse to the new sql server and it looks okay other than the list of ENABLED
    RESERVATION SIZES ONLY HAS P1, P2, P3 I'm requesting a standard (s1) db not premium (P1, P2, P3). On my test server I see in this list also S1,
    S2. As you can see in the error message I'm requesting Edition = Standard. I get the feeling the newly created server is not accepting standard tier dbs?
    Now the server is created if I try an import I see the server in the list of available servers but when I select a tier of Basic or Standard the new server is grayed out, not so if I select Premium or the older Web or Business? Interestingly my current live
    sql server shows up as supporting the new premium?
    Thanks
    Wayne 

    Hello,
    Glad to hear that the issue resolved and thanks for your sharing.
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here. 
    Fanny Liu
    TechNet Community Support

  • Bug: Can not create materialized view log on 11G XE

    Hi,
    I log in as HR user and try create materialized view log
    CREATE MATERIALIZED VIEW LOG ON HR.EMPLOYEES;I get error
    >
    Error starting at line 1 in command:
    CREATE MATERIALIZED VIEW LOG ON HR.EMPLOYEES
    Error at Command Line:1 Column:0
    Error report:
    SQL Error: ORA-00439: feature not enabled: Advanced replication
    00439. 00000 - "feature not enabled: %s"
    *Cause:    The specified feature is not enabled.
    *Action:   Do not attempt to use this feature.
    >
    You can create materialized view log on 10G XE without any problem.
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

    Is it a bug in 11g or 10g?
    It was reported earlier in now archived beta forum. {thread:id=2214092}
    The current doc lists MV sites only (and "No" for Advanced Replication feature):
    http://download.oracle.com/docs/cd/E17781_01/license.112/e18068/toc.htm#BABDFDAI

Maybe you are looking for

  • Calling a stored procedure from Reports

    I am trying to call a stored procedure using oracle reports in the afterparameter code. My code is: v_ain := sp_get_ain(:P_session_id); Can someone help me out by telling what is wrong. I keep getting an error stating that sp_get_ain needs to be decl

  • Problem with the file /proc/sys/kernel/hotplug which is incorrect

    Hello, Since few days, I can't import photos from my camera with my user (that work in root), I open a thread in this forum (http://bbs.archlinux.org/viewtopic.php?pid=348659). After investigations, the problem come from the content of the file /proc

  • Mail content contains MIME information

    Hi All, I use java mail to send mails. My mails are ok in most of the places. But some of the email contents contain the the following MIME information..how do i fix this? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-

  • Import photos without email or fotostream...

    there must be a way or app to import photos to the ipad or iphone without using fotostream or email. i just had to import 160MB of photos. that wasnt possible to do per email and fotostream just took to long. please help!

  • WS-Security Headers

    I am having a problem making a webservice call through a partnerlink with the wsse security headers in the webservice call. BPEL server is receiving a SOAP webservice call with ws-security headers. I want to call a partner link, external webservice,