2012 Oct 02 2:21 PM
Hi,
I want to delete specific table row from table type any and I getting dump,
there is specified way to do that for table type any?
Regards,
joy
2012 Oct 02 2:47 PM
Hi
It depends on the command you're using to delete the record.
The type ANY means the internal table could be STANDARD, SORTED and HASHED, so you can't use command to manage internal table uses the INDEX, but the key only:
FORM DELETE_TAB USING P_TAB TYPE ANY TABLE.
DATA WA TYPE CHAR10.
DELETE TABLE P_TAB WITH TABLE KEY (WA) = 'AAAA'.
ENDFORM. " DELETE_TAB
bu you need to define the key of course
Max
2012 Oct 02 2:47 PM
Hi
It depends on the command you're using to delete the record.
The type ANY means the internal table could be STANDARD, SORTED and HASHED, so you can't use command to manage internal table uses the INDEX, but the key only:
FORM DELETE_TAB USING P_TAB TYPE ANY TABLE.
DATA WA TYPE CHAR10.
DELETE TABLE P_TAB WITH TABLE KEY (WA) = 'AAAA'.
ENDFORM. " DELETE_TAB
bu you need to define the key of course
Max
2012 Oct 02 6:31 PM
Hi Joy,
You could also delete by index, e.g.,
DELETE itab INDEX some_index.
Or if you were looping through your table,
LOOP AT itab...
DELETE itab. " deletes the current loop index
ENDLOOP.
Cheers,
Amy
2012 Oct 02 8:44 PM
Hi joy
You can use delete statement to delete data from internal table different variant of delete statement are {-
DELETING Records:
Single Record: DELETE <ITAB> INDEX <N>.
Multiple Record: DELETE <ITAB> WHERE <Condition>
DELETE <ITAB> FROM <N1> TO <N2>.
DELETING ADJACENT DUPLICATES:
NOTE: Make Sure that the Duplicates should be Adjacent, which can be done through SORTING.
So that, Sorting the <ITAB> is Mandatory.
NOTE: The Duplication of Records(s) depends on the comparing fileds.
DELETE ADJACENT DUPLICATES FROM <ITAB>
Thanks
Anshul Mishra
COMPARING <F1><F2>……..