Delete information in a TAble

I have a table Z99 ( I create it on SAP , se11 ).
When I refresc a TableControl ( table ITAB )... I want to delete all the informaction  on Z99 and insert all the information on ITAB ( for update information base).
I try to do :
Refresh z99 .
But error appears because is not an internal table.

Hi Marc,
Use the statement MODIFY for your requirement.
<b>MODIFY Z99 FROM TABLE ITAB.</b>
Check this link to know more about MODIFY statement
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/modify_d.htm
Thanks,
Vinay
Message was edited by:
        Vinaykumar G

Similar Messages

  • Deleting Text from a Table

    I want to know the shortcut for deleting text from a table on a macbook pro with the latest version of Microsoft Word. I want to keep the table and it's formatting but I want the current information deleted and don't want to have to do this cell by cell. I highlight all the text I want deleted and then.........???????
    Please help, this is very frustrating!!!

    Thanks David! You are the best!

  • Need information about Internal Tables

    Hi Every one!
    I Need some information about Internal tables. Pls help be above the same.
    Thanks & with Regards,
    Chandra.

    Hi..,
    <b>
    Internal tables </b>
    Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.
    Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.
    <b>Internal Tables as Data Types</b>
    Internal tables and structures are the two structured data types in ABAP. The data type of an internal table is fully specified by its line type, key, and table type.
    <b>Line type</b>
    The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.
    <b>Key</b>
    The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
    If a table has a structured line type, its default key consists of all of its non-numerical columns that are not references or themselves internal tables. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
    The user-defined key can contain any columns of the internal table that are not references or themselves internal tables. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.
    <b>
    Table type</b>
    The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
    <u>Standard tables</u> have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries.
    <u>
    Sorted tables</u> are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be unique or not. Standard tables and sorted tables are known generically as index tables.
    <u>
    Hashed tables</u> have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.
    <b>
    Generic Internal Tables</b>
    Unlike other local data types in programs, you do not have to specify the data type of an internal table fully. Instead, you can specify a generic construction, that is, the key or key and line type of an internal table data type may remain unspecified. You can use generic internal tables to specify the types of field symbols and the interface parameters of procedures . You cannot use them to declare data objects.
    <b>Internal Tables as Dynamic Data Objects</b>
    Data objects that are defined either with the data type of an internal table, or directly as an internal table, are always fully defined in respect of their line type, key and access method. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
    <b>
    Choosing a Table Type</b>
    The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.
    <b>
    Standard tables</b>
    This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.
    <b>Sorted tables</b>
    This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
    <b>
    Hashed tables</b>
    This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
    regards,
    sai ramesh

  • Stored Procedure to delete a number of tables with a common name attribute

    Hi All,
    This is my first post so I hope I have posted to the required level with sufficient information. This is my first stored procedure (SP) and is for Oracle 10.
    I am trying to write a script to delete 11 tables and some rows from another 3 tables, all of which are named with a number that I would like to input at the point of creation of the SP. Below is the script I have written and edited. My original has been lost by crashing servers!
    When I run the script it gives me the following output:
    "Warning: execution complete with warning
    procedure ScenarioDelete compiled"
    The SP hasn't deleted any of the tables and I'm not sure if it's because my script is poor or because of something else. Any help is greatly appreciated!!
    -- table delete SP
    -- Run begin ScenarioDelete ('x'); with x as the ScenarioId
    create or replace procedure ScenarioDelete (ScenarioNo IN varchar2);
    countstable := 'C_' || ScenarioNo;
    changetable := 'CG_' || ScenarioNo;
    countsinfotable := 'CI_' || ScenarioNo;
    datatable1 := 'D_0_' || ScenarioNo;
    datatable2 := 'D_1_' || ScenarioNo;
    datatable3 := 'D_2_' || ScenarioNo;
    hietable1 := 'HI_0_' || ScenarioNo;
    hietable2 := 'HI_1_' || ScenarioNo;
    hietable3 := 'HI_2_' || ScenarioNo;
    hielinktable1 := 'HL_1_' || ScenarioNo;
    hielinktable2 := 'HL_2_' || ScenarioNo;
    AS
    execute immediate 'drop table ' || countstable;
    execute immediate 'drop table ' || changetable;
    execute immediate 'drop table ' || countsinfotable;
    execute immediate 'drop table ' || datatable1;
    execute immediate 'drop table ' || datatable2;
    execute immediate 'drop table ' || datatable3;
    execute immediate 'drop table ' || hietable1;
    execute immediate 'drop table ' || hietable2;
    execute immediate 'drop table ' || hietable3;
    execute immediate 'drop table ' || hielinktable1;
    execute immediate 'drop table ' || hielinktable2;
    execute immediate 'delete from USERACESS where SCENARIOID = ' || ScenarioNo;
    execute immediate 'delete from SCENARIO where SCENARIOID = ' || ScenarioNo;
    execute immediate 'delete from SCENARIOINFO where SCENARIOID = ' || ScenarioNo;
    -- or --
    execute immediate 'delete from USERACESS where SCENARIOID = '' || ScenarioNo || ''';
    execute immediate 'delete from SCENARIO where SCENARIOID = '' || ScenarioNo || ''';
    execute immediate 'delete from SCENARIOINFO where SCENARIOID = '' || ScenarioNo || ''';
    END;

    Hi,
    Welcome to the forum!
    When you compile a stored procedure, you get only the vaguest of error messages by default.
    Always say SHOW ERRORS immediately after compiling, to get more detailed error messages. (And, of course, post the complete error message, including line number, when you need help.)
    Remember to specify a datatype (and, in the case of VARCHAR2 variables, a maximum length) for all local variables you declare:
    create or replace procedure ScenarioDelete (ScenarioNo IN varchar2)     -- no semicolon here
    AS  -- AS or IS (it doesn't matter which) required here
        countstable  VARCHAR2 (50) := 'C_'  || ScenarioNo;
        changetable  VARCHAR2 (50) := 'CG_' || ScenarioNo;
    ...You're not actually wasting any space if you decalre the variable as 50 characters, but only use 3.
    It really helps if you format code, so that, for example,
    all the local variables are indented before the word BEGIN
    everything between BEGIN and its corresponding END is indented
    everything between IF and its corresponding END IF is indented,
    and so on.
    You're probably already doing that, but it doesn't show up on this site unless you type these 6 characters
    (small letters only, inside curly brackets) before and after the formatted text.
    That's what I did for the code fragement above.
    Edited by: Frank Kulash on Mar 23, 2009 12:04 PM
    Formatting stuff added.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Concurrent delete queries on one table

    Hi folks,
    I just recently started working with SQL server. I did my research and I guess that the post http://social.msdn.microsoft.com/Forums/en-US/7fe7499e-10a5-4371-84a4-aa1df8187a04/can-i-prevent-deadlock-during-concurrent-delete?forum=transactsql hits and somehow
    sovles my problem 100%.
    I am glad to have my issue resolved but I am also interested in understanding what went wrong deep inside as much as learn what I might do better. My scenario:
    4 processes updating disjunct entries at different intervals within the same table and issuing delete queries on that table. Sometimes (maybe once a day) that gives me a deadlock. colums: value, mainclass, subclass, timestamp with a clustered index at timestamp
    (My statement is of the form "delete from table where maintype=sth  and subtype=sth and timestamp=st")
    I'll append a sample deadlock graph. My main questions, which I couldn't answer so far:
    1. Is this expected behaviour or should SQL Server be able to handle such requests, or to put it right do I have to care for structures that avoid the above scenario, do I have to reconfigure or is there sth else to look at?
    2. Is this a configuration problem?
    3. I also do not understand why the report states that the processes fought for page ids when the lock escalation type was set to table.
    4. As far as I got to know until now having a clustered index on the timestamp colum is likely to boost my problem rather than solving it?
    I am really looking forward to any insights you can give.
    Bye,
    Lamu
    <deadlock>
    <victim-list>
    <victimProcess id="process56d746188" />
    </victim-list>
    <process-list>
    <process id="process56d746188" taskpriority="0" logused="0" waitresource="PAGE: 5:1:210559 " waittime="3120" ownerId="2642852343" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.683" XDES="0x5a36bd740" lockMode="U" schedulerid="4" kpid="3204" status="suspended" spid="72" sbid="1" ecid="4" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.990" lastbatchcompleted="2014-09-05T11:16:12.683" lastattention="1900-01-01T00:00:00.683" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="6504" isolationlevel="read committed (2)" xactid="2642852343" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
    DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]&lt;@3 </frame>
    <frame procname="adhoc" line="1" sqlhandle="0x02000000e1914b015d3b4d5ca54af4b548f2990acfe909ec0000000000000000000000000000000000000000">
    DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </frame>
    </executionStack>
    <inputbuf>
    DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </inputbuf>
    </process>
    <process id="process7edeee188" taskpriority="0" logused="0" waitresource="PAGE: 5:1:196655 " waittime="3124" ownerId="2642852343" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.683" XDES="0x8747f1740" lockMode="U" schedulerid="2" kpid="7108" status="suspended" spid="72" sbid="1" ecid="2" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.990" lastbatchcompleted="2014-09-05T11:16:12.683" lastattention="1900-01-01T00:00:00.683" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="6504" isolationlevel="read committed (2)" xactid="2642852343" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
    DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]&lt;@3 </frame>
    <frame procname="adhoc" line="1" sqlhandle="0x02000000e1914b015d3b4d5ca54af4b548f2990acfe909ec0000000000000000000000000000000000000000">
    DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </frame>
    </executionStack>
    <inputbuf>
    DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </inputbuf>
    </process>
    <process id="process7edeefc38" taskpriority="0" logused="0" waitresource="PAGE: 5:1:196655 " waittime="3119" ownerId="2642852529" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.973" XDES="0x87f3ddbb0" lockMode="U" schedulerid="2" kpid="5216" status="suspended" spid="62" sbid="1" ecid="2" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.980" lastbatchcompleted="2014-09-05T11:16:12.973" lastattention="1900-01-01T00:00:00.973" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="1308" isolationlevel="read committed (2)" xactid="2642852529" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
    DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]&lt;@3 </frame>
    <frame procname="adhoc" line="1" sqlhandle="0x02000000dd48f433f7e565ecccaaf5283c2e99548dd371d20000000000000000000000000000000000000000">
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </frame>
    </executionStack>
    <inputbuf>
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </inputbuf>
    </process>
    <process id="process681871868" taskpriority="0" logused="0" waitresource="PAGE: 5:1:210559 " waittime="3118" ownerId="2642852529" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.973" XDES="0x87bb39740" lockMode="U" schedulerid="1" kpid="8088" status="suspended" spid="62" sbid="1" ecid="3" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.980" lastbatchcompleted="2014-09-05T11:16:12.973" lastattention="1900-01-01T00:00:00.973" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="1308" isolationlevel="read committed (2)" xactid="2642852529" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
    DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]&lt;@3 </frame>
    <frame procname="adhoc" line="1" sqlhandle="0x02000000dd48f433f7e565ecccaaf5283c2e99548dd371d20000000000000000000000000000000000000000">
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </frame>
    </executionStack>
    <inputbuf>
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </inputbuf>
    </process>
    <process id="process6e959f0c8" taskpriority="0" logused="10000" waittime="3087" schedulerid="4" kpid="6624" status="suspended" spid="62" sbid="1" ecid="0" priority="0" trancount="2" lastbatchstarted="2014-09-05T11:16:12.980" lastbatchcompleted="2014-09-05T11:16:12.973" lastattention="1900-01-01T00:00:00.973" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="1308" loginname="LocSystem" isolationlevel="read committed (2)" xactid="2642852529" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
    DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]&lt;@3 </frame>
    <frame procname="adhoc" line="1" sqlhandle="0x02000000dd48f433f7e565ecccaaf5283c2e99548dd371d20000000000000000000000000000000000000000">
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </frame>
    </executionStack>
    <inputbuf>
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </inputbuf>
    </process>
    </process-list>
    <resource-list>
    <pagelock fileid="1" pageid="210559" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock707200480" mode="U" associatedObjectId="72057594045464576">
    <owner-list>
    <owner id="process6e959f0c8" mode="U" />
    </owner-list>
    <waiter-list>
    <waiter id="process56d746188" mode="U" requestType="wait" />
    </waiter-list>
    </pagelock>
    <pagelock fileid="1" pageid="196655" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock6ddb9e400" mode="U" associatedObjectId="72057594045464576">
    <owner-list>
    <owner id="process681871868" mode="U" />
    </owner-list>
    <waiter-list>
    <waiter id="process7edeee188" mode="U" requestType="wait" />
    </waiter-list>
    </pagelock>
    <pagelock fileid="1" pageid="196655" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock6ddb9e400" mode="U" associatedObjectId="72057594045464576">
    <owner-list>
    <owner id="process7edeee188" mode="U" requestType="wait" />
    </owner-list>
    <waiter-list>
    <waiter id="process7edeefc38" mode="U" requestType="wait" />
    </waiter-list>
    </pagelock>
    <pagelock fileid="1" pageid="210559" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock707200480" mode="U" associatedObjectId="72057594045464576">
    <owner-list>
    <owner id="process56d746188" mode="U" requestType="wait" />
    </owner-list>
    <waiter-list>
    <waiter id="process681871868" mode="U" requestType="wait" />
    </waiter-list>
    </pagelock>
    <exchangeEvent id="Pipe59935a700" WaitType="e_waitPipeGetRow" nodeId="1">
    <owner-list>
    <owner id="process7edeefc38" />
    <owner id="process681871868" />
    </owner-list>
    <waiter-list>
    <waiter id="process6e959f0c8" />
    </waiter-list>
    </exchangeEvent>
    </resource-list>
    </deadlock>

    >1. Is this expected behaviour or should SQL Server be able to handle such requests, or to put it right do I have to >care for structures that avoid the above scenario, do I have to reconfigure or is there sth else to look at?
    Basically yes.  Because your queries are non-trivial the DELETE query plans for different queries may conflict.
    >2. Is this a configuration problem?
    It's influenced by your table indexing, and especially how well your DELETE statements are supported by the physical data structures in your table.  The bigger and more complicated the physical design, the more likely that concurrent DELETES will conflict.
    >3. I also do not understand why the report states that the processes fought for page ids when the lock escalation >type was set to table.
    Page locks are never the result of lock escalation.  Row locks escalate to Table locks.  Period.  When a query uses Page locks it's an optimization to avoid taking lots of row locks to begin with.  But this comes at the possible cost
    of some concurrency.  The
    ROWLOCK query hint, possibly along with the READPAST hint can force more granular locking.
    >4. As far as I got to know until now having a clustered index on the timestamp colum is likely to boost my problem >rather than solving it?
    You minimize the locking conflicts by ensuring that it's very simple to find the rows affected by your DELETE. There's not enough information here to speculate on which physical design (partition scheme, clustered index, non-clustered indexes...) is optimal
    for this.
    A threshold question is whether you really _need_ these deletes to run concurrently on the table.  If not, then you can simply serialize them (eg with TABLOCK).
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • Deleting the values from table control

    HI,
    I need to remove the selected line from the Table control on my screen.
    The point is that the Internal table does not have any records,.
    for example in the Customer Create screen,
    while entering the bank details we will enter it in a tbale contraol.
    but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
    please guide me.
    please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
    regards

    Hi..
    The solution to your problem - deleting values from table control.
    Here: it_wizard is the internal table which is holding the value of table control.
             wa_wizard is the work are of the internal table it_wizard.
             it_delete is the internal table which holds the deleted record of table control.
             wa_delete is the work area of the internal table it_delete
    Also here the field ZSEL is the character field which is used to select the entire record in the table control.
    LOOP AT it_wizard into wa_wizard WHERE zsel = 'X'.
           MOVE-CORRESPONDING wa_wizard TO wa_delete.
           APPEND wa_delete TO it_delete.
           delete table it_wizard from wa_wizard.
    DELETE  FROM zfin_goods WHERE ZFG = WA_delete-ZFG.
    ENDLOOP
    if sy-subrc eq 0.
    Message 'Delete Successful' type 'S'.
    endif.
    The above code will delete the record from both the table control.internal table and the database table.
    I think this will help you to great extent.
    Ward regards,
    Bhuvaneswari
    Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:39 AM

  • Delete entries from the table

    Hi folks,
    I have delete program to delete entries from a custom table and has only one feld in it.
    tables: ZABC
    selection-screen begin of block B1 with frame title text-110.
    select-options: P_KOSTL for ZABC-KOSTL.
    selection-screen end of block B1.
    delete from ZABC where KOSTL in P_KOSTL.
    Upon executing I am entering certain cost center ids on the selection screen to delete them from the table.It did not work.
    what is it I am missing?
    Thanks,
    SK

    Hi,
    Try this sample code..Replace ZABC with your table..
    TABLES: ZABC.
    selection-screen begin of block B1 with frame title text-110.
    select-options: P_KOSTL for ZABC-KOSTL.
    selection-screen end of block B1.
    START-OF-SELECTION.
    * Delete the records from the table.
    DELETE FROM ZABC where KOSTL IN P_KOSTL[ ].  " [] for the select-options.
    IF sy-subrc <> 0.
      ROLLBACK WORK.
    ELSE.
      COMMIT WORK.
    ENDIF.
    Thanks,
    Naren

  • How to delete data from the table PA0007

    Hi Friends,
    Thank you for your kindly help.
    When I upload data to infotype 0007(planed working time),
    there is something wrong with the infotype 2011. So I want
    to delete the data of  infotype 0007. While using the program RPUREOPN to delete the data, the system will say:0007 cannot be deleted because of time constraint 1/A.
    Now how can I delete the data from table PA0007?
    Pls help me urgently.
    Best wishes
    Anne

    Hi Sikindar,
       Thank you for your help.
      There is another question. There are five clients (Client 300,310,320,330,350) in my HR DEV system. I just want to delete the data of infotype 0007 in client 350. When I change the the time constraint and delete the data in client 350, the data of infotype 0007 in other clients will be safe or not?
    Thank you again for your help!
    Best wishes
    Anne

  • How to trigger a 'delete' across different related tables in ABAP?

    Hello All,
    I am creating database tables for storing different values of features coming under different countries. I have eight tables in my design and there are fields repeating in different tables, which i am connecting through foreign key relationship.
    After entering values to all my tables, if i need to delete a particular field value which is repeating in more than two tables, is it possible to trigger a delete event by which if am deleting the field value in a particular table, all the related field values also get deleted from the respective tables?
    For example, if i have a PRODUCT field in three tables, and if one of the PRODUCT is deleted from a particular table, can i trigger a delete event by which i can delete all the values related to that particular PRODUCT from all the related tables? The PRODUCT is a primary keyfield, and i have maintained proper foreign key relations also.
    I have tried deleting entries using the views and using the database table itself, but only that particular table value is being deleted.
    Is there any function module for triggering a delete?
    Can anyone help me with some solution?Sample code will be helpful.
    Thanks in Advance,
    Shino

    Hi,
    My friend it is not advisable to delete any field from a database  table bcoz it's creats incosistance data for all the other related tables, but there r few Function Modules that provide u this functionality.
    Such As:
    G_REPORT_DELETE_ADDFLD_ENTRY
    G_CATT_DELETE_TABLE_ENTRY
    RKE_DELETE_FIELDS_FROM_TABLE
    Regards

  • WSo2 BDC to delete line item in table control

    Hi all,
    My requirement is to delete material from wso2 table control.
    The only way to delete a line item in this table control is to select the line in table control and delete it.
    The recording doesnt captures any selection of row.
    Any input on how to caputre particular row ??
    Please dont send me links to work with table control in bdc
    Regards
    Bhanu

    DaveL  wrote:
      I am not aware of any way to make the BDC delete the row, other than by running in 'A'-all mode and letting the user step through each screen and delete the rows that should be deleted.
    Well , if the user has to run it in "A" all screen mode why a BDC is required
    DaveL  wrote:
    Deleting them from the table control would obviously have no effect upon the database table though, would it....it would just hide a row from view in this particular table control
    Really ? Well it will delete it from database too i dont know what makes you think that it wont be deleted from database.
    Anways i have figured out how to capture row selection in BDC .
    Thanks for your reply it proves nothing i guess

  • How to delete a row of table in Word using powershell.

    I want to search for a word which is present in Table. If that word is present than I want to delete that row from table.
    Can anybody help me with that. The script I am using is:
    $objWord = New-Object -ComObject word.application
    $objWord.Visible = $True
    $objDoc = $objWord.Documents.Open("C:\temp\Recipe.docx")
    $FindText = "DP1"
    $objSelection.Find.Execute($FindText)
    $objWord.Table.Cells.EntireRow.Delete()
    $objDoc.SaveAs("C:\Temp\P.docx")
    $Doc.Close()

    Maybe try this:
    $objWord = New-Object -ComObject word.application
    $objWord.Visible = $True
    $objWord.Documents.Open("C:\temp\Recipe.docx")
    $FindText = "DP1"
    $objWord.Selection.Find.Execute($FindText) | Out-Null
    $objWord.Selection.SelectRow()
    $objWord.Selection.Cells.Delete()
    $objWord.Documents.SaveAs("C:\Temp\P.docx")
    $objWord.Close()
    $objWord.Quit()
    [System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.__ComObject]$objWord) | Out-Null
    This definitely assumes the text you're trying to find only exists in a table, per your specified requirements.  If it exists anywhere else, or in multiple tables, the code above is inadequate.
    I hope this post has helped!

  • To delete multiple entries in table control in module pool

    Hi,
    Please help me out to know , <b>how to delete multiple entries from table control</b> when multiple lines in table control are selected.
    Regards,
    Irfan Hussain

    hai,
        you can do it inthis way.
    in the PAI event.
    loop at <table control name>
      module del_itab.
    endloop.
    in the nodule,write the folowing code.
    if <tablecontrol>-fieldname = 'X'.
    delete <tablecontrol-itab>
    endif.
    cheers

  • Unable to delete a row in table control

    Hi,
    I'm unable to delete a row in table control.
    I have defined a selection column for my table control but it is not getting value 'X' when i'm selecting a row for deletion.
    Also, when I press enter, some of the columns in table control are getting initialized. I'm passing these values to the internal table along with other columns.
    Please help.
    Regards,
    Manasee
    Message was edited by: Manasee Chandorkar

    hi,
    kindly chk this.
    PROCESS BEFORE OUTPUT.
    MODULE status_9010.
    LOOP WITH CONTROL tab_control.
    MODULE move_data_to_table.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP WITH CONTROL tab_control.
    MODULE move_data_from_table.
    ENDLOOP.
    *& Module move_data_to_table OUTPUT
    This is to move the data from the internal table to the table control
    MODULE move_data_to_table OUTPUT.
    This is to move the data from the internal table to the table control
    zmpets_mode-modecode,zmpets_range-rangeid,zmpets_servfacto-factor are column name of table control
    READ TABLE int_factor INDEX tab_control-current_line.
    IF sy-subrc = 0.
    zmpets_mode-modecode = int_factor-modecode.
    zmpets_range-rangeid = int_factor-rangeid.
    zmpets_servfacto-factor = int_factor-factor.
    ENDIF.
    ENDMODULE. " move_data_to_table OUTPUT
    *& Module move_data_from_table INPUT
    Date is moved from the table control to the Internal Table
    MODULE move_data_from_table INPUT.
    To move the data from the table control to internal table 'INT_FACTOR'.
    int_factor-modecode = zmpets_mode-modecode.
    int_factor-rangeid = zmpets_range-rangeid.
    int_factor-factor = zmpets_servfacto-factor.
    int_factor-chk = line.
    *here if the data is there, it will modify
    MODIFY int_factor INDEX tab_control-current_line.
    IF sy-subrc NE 0. "data not exixting in table control . ie new data, then append it
    APPEND int_factor.
    CLEAR int_factor.
    ENDIF.
    ENDMODULE. " move_data_from_table INPUT
    *delete a line from table control
    MODULE user_command_9010 INPUT.
      CASE sy-ucomm.
    When an entry is deleted, and the entry is removed from the table
    control.
        WHEN 'DELETE'.
          PERFORM f_del_frm_tab_cntrl.
      ENDCASE.
    ENDMODULE.
    FORM f_del_frm_tab_cntrl .
      LOOP AT int_factor WHERE chk = 'X'.
        DELETE int_factor WHERE chk = 'X' .
        CONTINUE.
      ENDLOOP.
      CLEAR int_factor.
    ENDFORM.
    for any clarifiaction pls mail me.
    pls reward points, if this helped u.
    regards,
    anversha.
    [email protected]
    Message was edited by: Anversha s

Maybe you are looking for

  • I pod not recognised by pc

    i have had my ipod for a few months its always worked fine then recently when pluged in to pc via usb2 it says on pc the usb devise you connected has malfunctioned and i can no longer transfer music to it. how can i fix this

  • Boot Camp Update to 2.1 don't work

    Hello, I am new here. My MacBookPro runs now 2 years without problems. I upgrade my HDD to a 500 GB model and it works fine. The Windows Vista Business(now the English Version) don't accept the Boot Camp Update to Version 2.1. Before I have used the

  • Creating a join in a data model

    I'm still a fairly rookie java developer, so I hope someone can help me with this question. I'm working on learning the data modeling aspect in JDeveloper (TopLink or ADF Business Components). If the Creating Business Components from Tables wizard do

  • Oracle TimeZones and Daylight savings time

    Hi, I am working on converting a bunch of old data to a new system. I ran a couple of validation reports for the end user to verify, it seems the times were off. I am in the EST but it seems the times in the db were stored as UTC. So when you convert

  • Locked out due to wrong password, can it be reset

    locked out of ipod due to wrong password can it be reset