sap - Type conflict within deleting table from internal table -
i've had dump recently,
data: gt_data type sorted table of ty_data non-unique key bukrs gaapnm, ... lt_tabdel type standard table of ty_data. loop @ gt_data assigning <gf_data>. if <gf_data>-kansw + <gf_data>-kaufw = 0. append <gf_data> lt_tabdel. endif. endloop. if lt_tabdel not initial. delete gt_data lt_tabdel. endif.
and on line deleting table internal table - i've had dump: in statement convert object integer numerical type data objects supported @ argument position "object". in present case, operand "object" has non-numerical data type "table of ty_data". can't understand - why? both of had same type... so, great if provide advice , bit of explanation of error origins.
you have (inadvertently) used this variant of delete
statement uses from
, to
specify indexes, i. e. numbers of table lines. in sense, coding delete lines in gt_data
below 1 identified line number in lt_tabdel
, , system goes belly-up when trying convert contents of lt_tabdel
integer.
as far can see - i. e. if you've provided complete code sample - should sufficient:
loop @ gt_data assigning <gf_data>. if <gf_data>-kansw + <gf_data>-kaufw = 0. delete gt_data. continue. " safety measure endif. endloop.
for explanation of continue
statement, check this answer.
Comments
Post a Comment