cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding explaination of ABAP code

Former Member
0 Kudos
55

hai

pls tell me what this code means

<b>Delete int_equipment where zpmtechid is initial.

Delete adjacent duplicates from int_equipment.</b>

Here , int_equipment is internal table with zpmtechid is column

pls tell me the code explanation

txs

rizwan

Accepted Solutions (1)

Accepted Solutions (1)

sachin_kulshrestha2
Active Contributor
0 Kudos

Hi,

1 .Delete int_equipment where zpmtechid is initial.

will delete all records from internal table wher zpmtechid field is blank

2. Delete adjacent duplicates from int_equipment.

wil delete duplicated data from your internal table.

Hope this helps!!!

Answers (3)

Answers (3)

edwin_harpino
Active Contributor
0 Kudos

hi Rizwan,

for delete adjacent, from sap help

http://help.sap.com/saphelp_nw2004s/helpdata/en/06/aafd54fc4011d195280000e8353423/frameset.htm

...

Deleting Adjacent Duplicate Entries

To delete adjacent duplicate entries use the following statement:

DELETE ADJACENT DUPLICATE ENTRIES FROM itab

COMPARING f1 f2 ... .

The system deletes all adjacent duplicate entries from the internal table itab. Entries are duplicate if they fulfill one of the following compare criteria:

· Without the COMPARINGaddition, the contents of the key fields of the table must be identical in both lines.

· If you use the addition COMPARING f1 f2 ... the contents of the specified fields f1 f2 ... must be identical in both lines. You can also specify the fields f1 f2… dynamically using (n1) (n2) … as the contents of a field n1 n2. If n1 n2 is empty when the statement is executed, it is ignored. You can also restrict all fields f1 f2 … to subfields by specifying offset and length.

· If you use the addition COMPARING ALL FIELDS the contents of all fields of both lines must be identical.

You can use this statement to delete all duplicate entries from an internal table if the table is sorted by the specified compare criterion.

...

hope this helps.

Former Member
0 Kudos

Delete from the list everything is not filled or redundant...

Bye,

Roberto

edwin_harpino
Active Contributor
0 Kudos

hi Rizwan,

Delete int_equipment where zpmtechid is initial.

-> delete all records from int_equipment for zpmtechid field/column = blank.

Delete adjacent duplicates from int_equipment.

-> delete duplicated data, normaly specify certain field(s)/column(s),

e.g you have

zpmtechid

a

a

b

c

d

d

after performed delete adjacent duplicates, table became

a

b

c

d

hope this helps.