Skip to content

Check 24 - Exclude TYPES from identical code bloc check #972

Open
@AlexandreHT

Description

@AlexandreHT

As I write an ALV report, check 24 was triggered by 2 different TYPES structure declarations with a large number of identical components. I think TYPES instructions should be excluded from the check.

Unit test

  method test002_01.
* ===========

    _code 'types: begin of ty_alv,'.
    _code '         bzobj type keko-bzobj,'.
    _code '         kalnr type keko-kalnr,'.
    _code '         kalka type keko-kalka,'.
    _code '         kadky type keko-kadky,'.
    _code '         tvers type keko-tvers,'.
    _code '         bwvar type keko-bwvar,'.
    _code '         kkzma type keko-kkzma,'.
    _code '         matnr type keko-matnr,'.
    _code '         werks type keko-werks,'.
    _code '         bwkey type keko-bwkey,'.
    _code '         bwtar type keko-bwtar,'.
    _code '         kokrs type keko-kokrs,'.
    _code '         hwaer type ckhs-hwaer,'.
    _code '         vprsv type mbew-vprsv,'.
    _code '         valuation_price type mbew-stprs,'.
    _code '         peinh type mbew-peinh,'.
    _code '       end   of ty_alv,'.
    _code '       tty_alv type standard table of ty_alv.'.
    _code 'types: begin of ty_cost_estimate_header,'.
    _code '         bzobj type keko-bzobj,'.
    _code '         kalnr type keko-kalnr,'.
    _code '         kalka type keko-kalka,'.
    _code '         kadky type keko-kadky,'.
    _code '         tvers type keko-tvers,'.
    _code '         bwvar type keko-bwvar,'.
    _code '         kkzma type keko-kkzma,'.
    _code '         matnr type keko-matnr,'.
    _code '         werks type keko-werks,'.
    _code '         bwkey type keko-bwkey,'.
    _code '         bwtar type keko-bwtar,'.
    _code '         kokrs type keko-kokrs,'.
    _code '         kadat type keko-kadat,'.
    _code '         bidat type keko-bidat,'.
    _code '       end of ty_cost_estimate_header,'.
    _code '       tty_cost_estimate_header type standard table of ty_cost_estimate_header.'.

    ms_result = zcl_aoc_unit_test=>check( mt_code ).

    cl_abap_unit_assert=>assert_initial( ms_result ).

  endmethod.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions