Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AlexandreHT opened this issue Aug 28, 2020 · 0 comments
Open

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

AlexandreHT opened this issue Aug 28, 2020 · 0 comments

Comments

@AlexandreHT
Copy link
Contributor

AlexandreHT commented Aug 28, 2020

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant