ā2017 Jun 10 8:31 AM

Hi All,
We have a table where there are two columns called material_from and material_to. Here āZā stands for alphanumeric character.
I need to get the key fields for a material if the material is in between material_from and material_to.
For example: if the material code is 23030232A6 then I need to get the key field as 0002 and 3.
Please help.
regards,
ā2017 Jun 10 9:07 AM
Do you need the theoretical possible material numbers, or the materials that exist in database table MARA?
ā2017 Jun 10 10:15 AM
It sounds like a very basic question. Use "LOOP AT table WHERE material_from <= material AND material_to >= material" or "SELECT key FROM table WHERE material_from <= material AND material_to >= material" to answer your question "how to know if material is in between material_from and material_to".
ā2017 Jun 12 7:36 AM