Hi ,
As per my understanding you need to delete rows to which entry exist in column cancelled doc no . And again back you need to delete all those entry for which in billing doc no any cancelled doc is there . you can achieve this requirement as below :
declare one more internal table itab2 with field cancelled doc no .
then
loop at itab1 into wa_itab1.
if wa_itab1-cancelled_doc_no is not initial.
wa_itab2-cancelled_doc_no = wa_itab1-cancelled_doc_no.
append wa_itab2 to itab2.
delete itab1 index sy-tabix.
endloop.
then delete from itab1 the rows for which doc no lies in itab2. you can easily do it by creating a range from itab2.
hope it helps.
regards,
Manish