Skip to Content

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

loop at itab where..

Hi all,

Can I restrict for more than one value in my where condition for looping at internal table?

For ex. I have an internal table(ITAB) for purchase order details of different document types.I'ld like to call the data of only document type(BSART) = 'XXXX','YYYY','ZZZZ' only. How can write the loop statement . I have tried with LOOP AT ITAB WHERE BSART CS ( 'XXXX' , 'YYYY' , 'ZZZZ' ).But it's showing syntax error.please help.

Former Member

You can use Ranges and use IN in Where condition.

data: r_basrt type range of bsart.

"populate the range values.

loop at itab where bsart in r_bsart.


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question