ABAPDELETE_ITAB_LINE - DELETE ITAB LINE
TXBHW - Original Tax Base Amount in Local Currency Addresses (Business Address Services)This documentation is copyright by SAP AG.
DELETE itab - itab_line
Syntax
... {TABLE itab table_key}
| {itab INDEX idx [USING KEY keyname]}
| {itab [USING KEY loop_key]}.
Alternatives:
1. ... TABLE itab table_key
2. ... itab INDEX idx [USING KEY keyname]
3. ... itab [USING KEY loop_key]
Effect
These alternatives specify which single row of the internal table itab is to be deleted.
Alternative 1
... TABLE itab table_key
Effect
If you use the variant with the TABLE addition, you specify the row by using the primary tablekey table_key.
Alternative 2
... itab INDEX idx [USING KEY keyname]
Addition:
Effect
If the INDEX addition is used, the DELETE statement deletes the row of the row number specified in idx with respect to a table index. idx is anumerical expression position of the operand type i. If idx contains a value of 0 or less, an exception is raised that cannot be handled.
If the addition USING KEY is not used, the addition INDEX can only be used withindex tables and determines the row to be deleted from theprimary table index.
Example
Deletes the table row that has the same value as carrid in the key field p_carrid, by specifying a primary table index.
PARAMETERS p_carrid TYPE scarr-carrid.
DATA scarr_tab TYPE SORTED TABLE OF scarr
WITH UNIQUE KEY carrid.
SELECT *
FROM scarr
INTO TABLE scarr_tab.
READ TABLE scarr_tab WITH TABLE KEY carrid = p_carrid
TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
DELETE scarr_tab INDEX sy-tabix.
ENDIF.
Addition
... USING KEY keyname
Effect
If the addition USING KEY is used, a table key can be declared in keyname to declare the table index to be used explicitly.
If the table has a sortedsecondary key, this can be specified in keyname. The row to be deleted is then determined from itssecondary table index. You cannot declare a secondaryhashed key.
If the primary table key is specified, the table must be an index table, and the behavior is the same as when USING KEY is not specified.
Note
If a sorted secondary key exists, the INDEX addition can be used for all table types, if USING KEY is used.
Alternative 3
... itab
Addition:
Effect
This variant is only possible within a LOOPacross the same internal table. The current table row of the LOOP is then deleted implicitly.If the addition USINGKEY is specified in LOOP, then the variant USING KEY loop_key must be specified for this variant.
If the current row has already been deleted in the same loop, however, the behaviour is undefined.
This variant is not allowed outside of a LOOP and raises a warning in the syntax check, if the check cannot detect (statically) its presence in a loop.
Note
We do not recommend that you use this alternative. Instead, use the INDEX addition to specify the row number explicitly.
Addition
... USING KEY loop_key
Effect
This addition is required if the table key used by the LOOP is specified explicitly in the statementLOOP. It states explicitly that the current table row is deleted by the LOOP. No otherkey can be specified apart from the predefined name loop_key.If no explicit table key is specified for LOOP, then the addition USING KEY loop_key is optional.
BAL_S_LOG - Application Log: Log header data General Material Data
This documentation is copyright by SAP AG.
Length: 6825 Date: 20120522 Time: 050104 triton ( 191 ms )






