Application Development 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: 

How read values between two variables(fields) from the internal table

Former Member
0 Kudos
222

Hi Experts,

My requirement is , i had two Fields  matnr1 and matne2, using these two values(Fields), i want to read  all values between these two values from  an internal table.

Thank you

Abhinav N

Moderator message - please try this yourself. It's pretty basic programming.

Locked.

Message was edited by: Rob Burbank

1 REPLY 1

Former Member
0 Kudos
91

Assuming that the two fields mentioned are simple variables (Integer, string,etc)  & not part of complex data types(internal table), You can directly read values using them.

You can directly delete entries from internal table with where condition.

Example:
Build a range from those 2 values:

lr_matnr-sign  = 'E'. "Exclude
lr_matnr-option = 'EQ'.
lr_matnr-low = matnr1.
lr_matnr-high = matne2.
APPEND lr_matnr.

DELETE itab WHERE MATNR IN lr_matnr.