types: begin of t_foo,
field1 type char2,
field2 type char2,
field3 type char2,
field4 type i,
end of t_foo.
data: lt_foo type HASHED TABLE OF t_foo
WITH UNIQUE KEY field1 field2 field3.
data: ls_foo like line of lt_foo.
FIELD-SYMBOLS:
* Must assign it to use it.
assign ls_foo to
clear
insert
clear
insert
If sy-subrc ne 0.
write:/ ' this is the duplidate key'.
endif.
No comments:
Post a Comment