Last active
March 21, 2020 14:40
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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