Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Delete the record from internal table

Former Member
0 Likes
771

Hi Everyone,

In my requirement i need to delete the task when log_count <> 1.

the condition need to be executed when the log_count =1

The condition i had given is

if ls_swpsteplog-log_count <>1.

delete lt_swpsteplog where task_id  = ?.

endif.

1 ACCEPTED SOLUTION
Read only

sivaprasad_paruchuri
Active Participant
0 Likes
690

hi,

i think no condition required just write

delete lt_swpsteplog where log_count <> 1.

which will remain the only records having log_count = 1.

Regards,

Siva Prasad.

4 REPLIES 4
Read only

Former Member
0 Likes
690

Hi

loop at lt_swpsteplog into ls_swpsteplog.

if ls_swpsteplog-log_count <>1.

delete lt_swpsteplog from ls_swpsteplog.

endif.

endloop.

regards.

laxman

Read only

sivaprasad_paruchuri
Active Participant
0 Likes
691

hi,

i think no condition required just write

delete lt_swpsteplog where log_count <> 1.

which will remain the only records having log_count = 1.

Regards,

Siva Prasad.

Read only

Former Member
0 Likes
690

hi,

do not read the Data Where log_count <> 1.

loop at lt_swpsteplog into ls_swpsteplog where log_count <> 1.

endloop.

Regards,

uday...,

Read only

madhu_vadlamani
Active Contributor
0 Likes
690

Hi,

In this what is the issue are getting.

Regards,

Madhu.