ABAP 740 Convert Range table to internal table and opposite

Ebrahim Hatem
1 min readNov 21, 2019

--

I had a bad story in the past about range table and internal table. I have really struggled to convert range table to internal table to work with internal table and also another problem I wanted to convert table to range table to use it in selection the database. It was boring to do loop and endloop with some statments. Now with ABAP 740, we can convert it both internal table and range table easily. Let me to explain how can we do it.

  1. Convert range table to internal table

You can convert it the range table to internal table by using statement mapping.

lt_but000 = CORRESPONDING #( range_partner MAPPING partner = low ).

2. Convert internal table to range table by using Mapping.

Range_partner2 = CORRESPONDING #( lt_but000 MAPPING low = partner ).

3. Convert also internal table to range table by using For Loop.

Range_partner3 = VALUE #( FOR wa IN lt_but000 ( sign = ‘I’ option = ‘EQ’ low = wa-partner ) ).

For more codes about ABAP 740 you can find it in this link.

--

--