Inserting Lines to Z table

Hi All,
We have a custom screen (Z Transaction and Z Screen) through which End User will be entering the data.
The data should be inserted into a Z Table.
No Line of the Z Table should be overweritten or modified... Each time, the data should be inserted as new line.
Please guide me how to perform this operation..
Thanks and Regards
Pavan

Table Maintenance Generator
When creating table, you will find a check box 'Table maintenance allowed'. If we check that option, we can manually enter entries using SE16 or table maintenance generator screen.
SE16 is for data browser.
How to create table maintenance generator?
Go to Se11, give the table name and click on change. Then Go to utilities--> Table maintenance generator.
In the table maintenance generator screen, we should give Authorization Group, Function Group name (Function Group name can be same as table name), Maintenance type can be one step or two step, usually we will create with one step. we should give maintenance screen number.
After clicking on create button, a table maintenance generator will be created.
To check it go to SM30 . In SM30, we find display, Maintain options.
We can view the table contents by choosing Display and we can create table entries by choosing Maintain.
Thank you,
Gopi.S

Similar Messages

  • Can't insert line into a table

    Hi every, I got a problem which is simple for you.
    In se16 when I want to insert a line of a table, from the second line it dosen't allow me to insert with an error message: data record exists already with the key indicated. What's that?
    Thanks!

    Hi!
    I can imagine it like that, you have to append a new key column into your table:
    1st key field: LANGUAGE
    2nd key field: LINE_COUNTER
    So you can enter into the table entries like these:
    EN 0001
    EN 0002
    EN 0003
    and so on...
    In a table it is not allowed to have 2 lines with the same key.
    Regards
    Tamá

  • Call Abap FM from XI mapping to insert lines to abap table

    Hi All,
    I'm trying to insert data from an XML file into a Z table during mapping in XI. I have an ABAP function module that takes in parameters and inserts into the corresponding fileds of the Z-table.
    How do I make use of this ABAP Function module in a user defined function in XI mapping.
    Any tips would be really helpful.
    Thanks
    Karthik

    Hi Karthik,
    have a look in this document:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4fbe7b8e-0a01-0010-b69b-b7e717378f22
    In the document look at: "Step 3 – Coding User-Defined Java Function in Message Mapping".
    This should solve your problem.
    Regards Mario

  • How to insert line or row in a table?

    Hi OAF experts,
    can anyone show me how to insert row or line in a table bean by setting the table.setAutoInsertion(false) ?
    Thank you.
    Jon

    As per Dev Guide:---
    The other change you can make is to suppress the default Add Another Row button behavior of adding a
    single row to the view instance associated with the table, so that you can handle the event with your own code.
    The following code example illustrates how to accomplish this:
    processRequest
    // Enabled add row and turn off the default "Add Another Row" table event
    // The add row event has to be auto-handled by developer in processFormRequest
    tableBean.setInsertable(true);
    tableBean.setAutoInsertion(false);
    processFormRequest
    if ((tableBean.getName()Equals(pageContext.getParameter(SOURCE_PARAM))) &&
    (ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM))))
    OAApplicationModule am = pageContext.getApplicationModule(tableBean);
    am.invokeMethod("handleInsertRow", null);
    // The ***AMImpl.java in which method "handlInsertRow" has been defined
    public void handleInsertRow()
    OAViewObject vo = findViewObject("voName");
    vo.invokeMethod("handleInsertRow");
    // The ***VOImpl.java which is associated with the table; and in which the
    // handleInsertRow is defined
    public void handleInsertRow()
    Row row = createRow();
    // Set any default attributes
    row.setAttribute(...);
    // Insert the row into the VO
    insertRow(row);
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problems inserting huge ammount of lines in a table

    Dear all:
    I have a process that reads data from one table (table A), makes some calculations and writes the modified data into another table (table B).
    For each line on table A the process will write from 1 to 4 lines in table B. The calculation is VERY simple.
    The process reads 1 million lines from table A and writes 4 million lines into table B, and I need to do this in 2 hours.
    I have a sun/solaris server with 8 processors and an EMC storage (the machine is really fast), but I can not complete the process in a reasonable time.
    The problem is that after 15 minutes the Oracle Database slows A LOT. If I query the v$session_wait view, I receive "log buffer wait" messages, and there is nothing I can do to solve this problem (many DBAs tried to solve it).
    Is there a special way to insert a huge amount of data into a table in a fast way?
    I really appreciate any help!

    I am extracting once from the source and inserting into the destinations table making calculations from the cursor variables.
    I heard that the problem is a big contention at the Oracle i/o slave. I will try to use direct load and paralellize the process, I hope this can work!
    Thank you!
    Josi,
    Since you are extracting from one source table and inserting into a target table, and you mentioned your are generating for each source 4 rows into the target, i like know knwo what your OWB mapping look like; i.e. how did you model the "row-multiplier" in the OWB mapping editor.... using a splitter like this:
    +----> Calculate()-->Target1
    +
    Source1 ---> Splitter +----> Calculate()--> Target1
    +
    +----> Calculate()--> Target1
    +
    +----> Calculate()--> Target1
    If you use the splitter and run the map in set-based mode, you are effectively extracting the table Source1 four times... quite costly... you probably get better performance by running the map in row-based mode and using the bulk mode..... again my recommendations are based on guesses what your mapping looks like and where/when you do the calculation in the dataflow graph.
    In 9i there is a multi table insert statement which will provide you with a set-based splitter operation; we will make support available for multi table insert in our upcoming release.

  • How can I do to insert a 1D array in a line of a table or a 2D array ?

    I have some vectors I concatenate in a 1D array when I pushed a button. Furthermore, when I pushed the same button, I would like to insert this 1D array in a line of a 2D array or in a line of a table. How can I do ?
    Thanks.
    Cyril.

    Hi,
    to insert 1D array into 2D array you must use
    Functions->Array->Insert Into Array.
    Wire your 2D array to array input of this vi, then specify the row index you want your 1D array will be, and then wire your 1D array to element input. The output will be what you want. The length of all 1D arrays must be the same, otherwise you may loose some data.
    If you want to add data to text table then you need first to convert your numeric array to textual form with
    Function->String->String/Number Coversion VIs
    Good luck.
    The example is attached.
    Oleg Chutko.
    Attachments:
    Insert.vi ‏17 KB

  • Wizard generated table control: bug in insert line function?

    Hi,
    I added a table control to a dynpro using the wizard in the screen painter. Now I have an issue with the inserting line button:
    If I add a new line the first time, a new empty line is added to the table control before my last line. So far so good.
    If I add now another line, again a new line empty is added before my last line and two lines are added after my last line: one empty line and a line with the same content as my former second last line.
    The following should explain it a bit better:
    table before inserting new line:
    line 1
    line 2
    line 3
    line 4
    line 5
    after inserting a new line:
    line 1
    line 2
    line 3
    line 4
    new empty line
    line 5
    table before inserting the second line:
    line 1
    line 2
    line 3
    line 4
    line 5
    line 6
    after inserting the second line:
    line 1
    line 2
    line 3
    line 4
    line 5
    new empty line
    line 6
    new empty line
    line 5
    I didn't change the generated coding yet!
    Thanks in advance and regards,
    Martin
    Edited by: fischerman on May 29, 2008 9:08 AM

    Here is the code of the form which is called in PAI if the insert button was pressed:
    FORM fcode_insert_row
                   USING    p_tc_name           TYPE dynfnam
                            p_table_name             .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
       DATA l_lines_name       LIKE feld-name.
       DATA l_selline          LIKE sy-stepl.
       DATA l_lastline         TYPE i.
       DATA l_line             TYPE i.
       DATA l_table_name       LIKE feld-name.
       FIELD-SYMBOLS <tc>                 TYPE cxtab_control.
       FIELD-SYMBOLS <table>              TYPE STANDARD TABLE.
       FIELD-SYMBOLS <lines>              TYPE i.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
       ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE p_table_name '[]' INTO l_table_name. "table body
       ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: get looplines of TableControl                              *
       CONCATENATE 'G_' p_tc_name '_LINES' INTO l_lines_name.
       ASSIGN (l_lines_name) TO <lines>.
    *&SPWIZARD: get current line                                           *
       GET CURSOR LINE l_selline.
       IF sy-subrc <> 0.                   " append line to table
         l_selline = <tc>-lines + 1.
    *&SPWIZARD: set top line                                               *
         IF l_selline > <lines>.
           <tc>-top_line = l_selline - <lines> + 1 .
         ELSE.
           <tc>-top_line = 1.
         ENDIF.
       ELSE.                               " insert line into table
         l_selline = <tc>-top_line + l_selline - 1.
         l_lastline = <tc>-top_line + <lines> - 1.
       ENDIF.
    *&SPWIZARD: set new cursor line                                        *
       l_line = l_selline - <tc>-top_line + 1.
    *&SPWIZARD: insert initial line                                        *
       INSERT INITIAL LINE INTO <table> INDEX l_selline.
       <tc>-lines = <tc>-lines + 1.
    *&SPWIZARD: set cursor                                                 *
       SET CURSOR LINE l_line.
    ENDFORM.                              " FCODE_INSERT_ROW

  • How to insert data into a table only when data has changed its value (when compared to the previous inserted value)

    I wish to insert data into a table only when the value of the inserted data has changed. Thus, in a time series, if the value of the data at time, t-1, is 206 then if the data to be inserted at time t is 206, then it is skipped (not entered).
    If the value of the data at time t+1 is 206, it is skipped also; until the value changes, so if the value at t+1 was 205, then that would be inserted, and if at time t+2 the data is 206, it would be inserted too.
    What is the best way to do it without increasing overheads?

    This view works:
    SELECT
    i.IDNO,i.[Date],i.[Level]
    FROM
    mytable i
    INNER
    JOIN mytable
    d
    ON
    d.IDNO
    = i.IDNO-1
    WHERE
    i.[Level]
    <> d.[Level]
    on this mytable below.  A trigger could be quite useful here although I am cautious using them. However I wish to avoid the overhead by not having a temp table (which could be sizable).  mytable below
    should give 3 lines. The IDNO is an identity column.
    IDNO
    Item
    Date
    Level
    1
    X24
    12/23/13 10:41
    22996
    2
    X24
    12/23/13 10:41
    22996
    3
    X24
    12/23/13 9:21
    23256
    4
    X24
    12/23/13 9:21
    23256
    5
    X24
    12/23/13 9:22
    23256
    6
    X24
    12/23/13 9:22
    23256
    7
    X24
    12/23/13 9:22
    22916

  • How to insert into two differents tables at the same time

    Hi
    I'm newer using JDev, (version 3.1.1.2 cause the OAS seems to support just the JSP 1.0)
    and I want to insert into two differents tables at the same time using one view.
    How can I do that ?
    TIA
    Edgar

    Oracle 8i supports 'INSTEAD OF' triggers on object views so you could use a process similar to the following:
    1. Create an object view that joins your two tables. 'CREATE OR REPLACE VIEW test AS SELECT d.deptno, d.deptname, e.empname FROM DEPT d, EMP E'.
    2. Create an INSTEAD OF trigger on the view.
    3. Put code in the trigger that looks at the :NEW values being processed and determines which columns should be used to INSERT or UPDATE for each table. Crude pseudo-code might be:
    IF :NEW.deptno NOT IN (SELECT deptno FROM DEPT) THEN
    INSERT INTO dept VALUES(:NEW.deptno, :NEW.deptname);
    INSERT INTO emp VALUES (:NEW.deptno, :NEW.empname);
    ELSE
    IF :NEW.deptname IS NOT NULL THEN
    UPDATE dept SET deptname = :NEW.deptname
    WHERE deptno = :NEW.deptno;
    END IF;
    IF :NEW.empname IS NOT NULL THEN
    UPDATE emp SET empname = :NEW.empname
    WHERE deptno = :NEW.deptno;
    Try something along those lines.
    null

  • Powl- how to make one line editable for 'Insert line' button

    Hi,
    I have a powl in which I have two buttons of 'Insert Line' & 'Save'.
    Now in my result table - c_result_tab - I need to give one editable line, in which user can enter new record.
    & after entering it when they click on 'SAVE' i'll append the record in c_result_tab.
    Now my Que is - How to give Editable Line in ALV Display table of POWL, where User can enter New Record ??
    or is there any other std. procedure, like popup or something - which can help to enter record in same format as c_result_tab.??

    z-order for what? the Canvas class itself? It's AWT, so why would they be adding to that? For Graphics? That's not really needed, since to paint you have to override paint in a subclassed component and in there by definition you can fully control your painting.

  • Inserting Data into nested table

    I am exploring the differences between OBJECT & RECORD.
    As i am still in process of learning, I found that both are structures which basically groups elements of different datatypes or columns of different datatypes, one is used in SQL and other is used in PL/SQL, please correct me if I am wrong in my understanding.
    Below i am trying to insert data into an table of type object but i am unsuccessful can you please help.
    CREATE OR REPLACE type sam as OBJECT
    v1 NUMBER,
    v2 VARCHAR2(20 CHAR)
    ---Nested Table---
    create or replace type t_sam as table of sam;
    --Inserting data----
    insert into table(t_sam) values(sam(10,'Dsouza'));
    Error Message:
    Error starting at line 22 in command:
    insert into table(t_sam) values(sam(10,'Dsouza'))
    Error at Command Line:22 Column:13
    Error report:
    SQL Error: ORA-00903: invalid table name
    00903. 00000 -  "invalid table name"
    *Cause:   
    *Action:

    Ariean wrote:
    So only purpose of equivalent SQL types concept of nested tables is to use them as one of the data types while defining an actual table?
    Sort of - you can definitely use them for more than just "defining an actual table". (I'm fairly certain you could pass a nested table into a procedure, for example - try it, though - I'm not 100% sure on that - it just "makes sense". If you can define a type, you can use it, pass it around, whatever.).
    Ariean wrote:
    And that nested table could be a record in SQL or an Object in PLSQL or just simple datatype(number,varchar etc)?
    Nested tables are just like any other custom data type. You can create a nested table of other data types. You can create a custom data type of nested tables.
    It could get stupidly .. er, stupid O_0
    CREATE TYPE o_myobj1 AS object ( id1   number, cdate1  date );
    CREATE TYPE t_mytype1 AS table of o_myobj1;
    CREATE TYPE o_myobj2 AS object ( id2   number,  dumb  t_mytype1 );
    CREATE TYPE t_dumber AS table of o_myobj2;
    O_0
    Ok, my brain's starting to hurt - I hope you get the idea
    Ariean wrote:
    Secondly is my understanding correct about OBJECT & RECORD?
    I can't think of any benefit of describing it another way.

  • Insert row in a table (not ALV)

    Hi there,
    i know, i can insert a row in a table in 3 steps:
    1. get_static_attributes_table
    2. insert line into table
    3. bind_table
    Is there another way possible maybe one without reading the whole table?

    Hello,
    If your requirement is to add a row to the TABLE i.e. adding a context element to the context node which is bound to the TABLE, then you can do the following:
    DATA lo_nd_scarr TYPE REF TO if_wd_context_node.
    DATA lo_el_scarr TYPE REF TO if_wd_context_element.
    lo_nd_scarr = wd_context->get_child_node( name = wd_this->wdctx_scarr )."get the reference to the context node
    lo_el_scarr = lo_nd_scarr->create_element( ). "create a context element
    lo_el_scarr->set_attribute( name = 'attr_name' value = 'attr_value') "set the attributes
    lo_nd_scarr->bind_element(
    new_item = lo_el_scarr
    set_initial_elements = abap_false ). "bind the created element to the context node
    Hope this helps!
    If this is not the info which you are looking for, please revert back!
    Regards,
    Srilatha M
    Edited by: Srilatha M on Jul 23, 2010 11:31 AM

  • Need to insert rows into 100 tables at a time

    hi there,
    below is our script for creation of 100 tables...
    we need a plsql script, to insert rows into 100 tables at a single time...
    please help us...vey urgent...
    DECLARE
    counter NUMBER;
    sql_string VARCHAR2(2000);
    BEGIN FOR counter IN 1..100 LOOP sql_string := 'CREATE TABLE emp_table'||counter||'
    (id integer primary key, col_a VARCHAR2(42),col_b date,col_c number,col_d varchar2(20),col_e varchar2(20),
    col_f varchar2(20),col_g varchar2(20),col_h date,col_i varchar2(20),col_j varchar2(20),col_k date)';
    EXECUTE IMMEDIATE sql_string;
    END LOOP;
    END;
    /

    hi,
    below is our procedure and the error we are getting...
    Name Null? Type
    ID VARCHAR2(10)
    COL_A VARCHAR2(10)
    COL_B VARCHAR2(10)
    COL_C VARCHAR2(10)
    COL_D VARCHAR2(10)
    COL_E VARCHAR2(10)
    COL_F VARCHAR2(10)
    COL_G VARCHAR2(10)
    COL_H VARCHAR2(10)
    COL_J DATE
    DECLARE
    counter NUMBER;
    sql_string VARCHAR2(4000);
    BEGIN FOR counter IN 1..100 LOOP sql_string := 'CREATE TABLE emp_a'||counter||'
    (id varchar2(10), col_a varchar2(10), col_b varchar2(10), col_c varchar2(10), col_d varchar2(10), col_e varchar2(10),
    col_f varchar2(10), col_g varchar2(10), col_h varchar2(10), col_j date)';
    EXECUTE IMMEDIATE sql_string;
    END LOOP;
    END;
    DECLARE
    counter NUMBER;
    sql_string VARCHAR2 (2000);
    BEGIN
    FOR OuterCounter IN 1 .. 100 LOOP --- table prefix in which it is to be inserted
    FOR InnerCounter IN 1 .. 100 LOOP --- records to be inserted
    sql_string := 'INSERT INTO emp_a' || Outercounter || ' (id, col_a, col_b, col_c, col_d, col_e, col_f, col_g, col_h, col_j)
    VALUES ('
    || InnerCounter || ', to_char( ''col_a''' || innercounter || '),'
    || InnerCounter || ', to_char( ''col_d''' || innercounter || '),'
    || ', to_char( ''col_e''' || innercounter || '),'
    || ', to_char( ''col_f''' || innercounter || '),'
    || ', to_char( ''col_g''' || innercounter || '),'
    || ', to_char( ''col_h''' || innercounter || '),'
    || ', to_char( ''col_j''' || innercounter || '), SYSDATE)';
    EXECUTE IMMEDIATE sql_string;
    END LOOP;
    END LOOP;
    END;
    DECLARE
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    ORA-06512: at line 17
    please check the procedure and write the correct one...

  • How do I run a database procedure that inserts data into a table from withi

    How do I run a database procedure that inserts data into a table from within a Crystal report?
    I'm using CR 2008 with an Oracle 10i database containing a number of database tables, procedures and packages that provide the data for the reports I'm developing for my department.  However, I'd like to know when a particular report is run and by whom.  To do this I have created a database table called Report_Log and an associated procedure called prc_Insert_Entry that inserts a new line in the table each time it's called.  The procedure has 2 imput parameters (Report_Name & Username), the report name is just text and I'd like the username to be the account name of the person logged onto the PC.  How can I call this procedure from within a report when it's run and provide it with the 2 parameters?  I know the procedure works, I just can't figure out how to call it from with a report.
    I'd be grateful for any help.
    Colin

    Hi Colin, 
    Just so I'm clear about what you want: 
    You have a Stored procedure in your report.  When the report runs, you want that same procedure to write to a table called Report_Log. 
    If this is what you want the simple answer is cannot be done.  Crystal's fundamental prupose is to read only, not write.  That being said, there are ways around this. 
    One way is to have a trigger in your database that updates the Report_Log table when the Stored Procedure is executed.  This would be the most efficient.
    The other way would be to have an application run the report and manage the entry. 
    Good luck,
    Brian

  • XML PARASE and insert /update in corresponding tables

    Hi,
    I have a XML in which master details tables 3 tables.I want to separate element and insert/update in corresponding tables dynamically.
    Table invlovled in A,B,C
    Thanks
    Reena

    Reena
    The easiest way to do this is along the following lines..
    (1) register an XML Schema that describes the XML you wish to process with theh database.
    (2). create a relational view for the top level elements and for each repeating element (element where maxOccurs > 1 in the XML Schema)
    (3) Use 'insert as select' or other SQL type processing to update your relational tables from the contents of the view
    It is normally recommended that you add the following annotations to the XML Schema before registering it with the database
    (1) At the schema level set xdb:storeVarrayAsTable="true".
    (2) At the complexType level set xdb:maintainDOM="fasle".
    If you search the forum you will find a lot of examples of creating relational views of XML content stored in the XML database. Typically these examples will include key words like 'create or replace view' and 'table(xmlsequence(extract' or 'xmltable'.
    Hope this helps...
    -Mark

Maybe you are looking for