Skip to Content
2
Former Member
Aug 30, 2016 at 11:36 AM

Cleaner syntax for filling up internal tables with VALUE?

76 Views

Hello SDNers,

Let's consider this scenario.

I have a method fill_table( ) defined as

      fill_table
        IMPORTING it_integer TYPE int4_table
        CHANGING  ct_integer TYPE int4_table.

Implementation is:

  METHOD fill_table.
    ct_integer = VALUE #( BASE ct_integer ( LINES OF it_integer ) ).
    APPEND LINES OF it_integer TO ct_integer. " Looks cleaner compared to VALUE??
  ENDMETHOD.

Imho, the old APPEND/APPEND LINES OF constructs are cleaner than the VALUE. What are your thoughts?

BR,

Suhas