Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sandraros/7227260de931cbab5cd9acf5622a34c6 to your computer and use it in GitHub Desktop.
Save sandraros/7227260de931cbab5cd9acf5622a34c6 to your computer and use it in GitHub Desktop.
Code used to support discussion at https://github.com/SAP/styleguides/issues/115
CLASS ltc_main DEFINITION
FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PRIVATE SECTION.
CONSTANTS iterations TYPE i VALUE 50000.
DATA: sflight_s TYPE STANDARD TABLE OF sflight.
METHODS setup.
METHODS reference_into FOR TESTING.
METHODS assigning FOR TESTING.
ENDCLASS.
CLASS ltc_main IMPLEMENTATION.
METHOD setup.
SELECT * FROM sflight INTO TABLE @sflight_s.
ENDMETHOD.
METHOD assigning.
DO iterations TIMES.
LOOP AT sflight_s ASSIGNING FIELD-SYMBOL(<sflight>).
IF <sflight>-carrid <> '**'.
<sflight>-carrid = '**'.
ENDIF.
ENDLOOP.
ENDDO.
ENDMETHOD.
METHOD reference_into.
DO iterations TIMES.
LOOP AT sflight_s REFERENCE INTO DATA(sflight).
IF sflight->carrid <> '**'.
sflight->carrid = '**'.
ENDIF.
ENDLOOP.
ENDDO.
ENDMETHOD.
ENDCLASS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment