Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to delete datawindow row by loop?

I try to go through datawndow rows by for loop and delete those rows I found with condition.  Something like:

For i = 1 to dw_1.RowCount()

....

  if expression then 

    dw_1.DeleteRow(i)

  end if

Next

Looks like not working properly. if DeleteRow dynamically change RowCount()? how to resolve this problem?

Former Member
Former Member replied

HI Kent;

  Suggestion: Try it in reverse ....

Long     ll_max

ll_max     =     dw_1.RowCount()

For i = ll_max to 1 STEP  -1

....

  if expression then 

    dw_1.DeleteRow(i)

  end if

Next

HTH

Regards ... Chris

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question