abaplint / abaplint-sci-client

ABAP part for running abaplint on ABAP backend
MIT License
38 stars 20 forks source link

SAP Includes not recognized in FUGR TOP include file #302

Closed ed-holland closed 4 months ago

ed-holland commented 4 months ago

Our function group Top Include contains two further includes importing definitions from SAP. These are not seen.

image

Issues shown during linter

./src/ecc/ext/#jcs#ma.fugr.#jcs#lmaf01.abap[27, 3]                           - "gc_fkkaktiv2_status_stopped" not found, findTop (check_syntax) [E]
./src/ecc/ext/#jcs#ma.fugr.#jcs#lmaf01.abap[104, 5]                          - "gc_mad_dispatcher" not found, findTop (check_syntax) [E]
./src/ecc/ext/#jcs#ma.fugr.#jcs#lmaf01.abap[145, 3]                          - "gc_fkkaktiv2_status_stopped" not found, findTop (check_syntax) [E]
./src/ecc/ext/#jcs#ma.fugr.#jcs#lmaf01.abap[213, 3]                          - "gc_appl_log_event_17[96](https://vdocker.sap.internal:8929/abap/abap-fca/-/jobs/218921#L96)" not found, findTop (check_syntax) [E]
./src/ecc/ext/#jcs#ma.fugr.#jcs#ma_prepare.abap[113, 5]                      - "gc_mem_id_aktyp" not found, findTop (check_syntax) [E]
./src/ecc/ext/#jcs#ma.fugr.#jcs#ma_prepare.abap[147, 5]                      - "gc_mad_dispatcher" not found, findTop (check_syntax) [E]

Verification of dependency repository confirmed that the FKKB package did not include these includes.

Test also performed using ZABAPLINT_LIST_DEPS.

larshp commented 4 months ago

two options: a: add the includes to the dependencies repository b: add the constants to globalConstants in the configuration

ed-holland commented 4 months ago

both would be workarounds. Should i look for a more permanent sollution in Abap?

ed-holland commented 4 months ago

Just noticed that we have LFKKAKTIV2CON already added in the deps generation. image

will investigate why it is not being included (probably because it is an include).

larshp commented 4 months ago

both would be workarounds. Should i look for a more permanent sollution in Abap?

I think SAP recommends includes to be only used once, so if you can get rid of the usage that would be the best for the code/solution IMHO

ed-holland commented 4 months ago

Not a good recommendation as they are includes used in many places to centralize the definition. Can not get rid of them as we need to be consistent with them

ed-holland commented 4 months ago

Problem with dependency check is that it only takes into account objects that have a TADIR entry. This include does not have a TADIR entry. Option a) is not possible anymore.

Was there a design decision to limit the deps to TADIR object?

larshp commented 4 months ago

I think all includes should have a TADIR entry, if not the system is inconsistent, try tcode STDR

ed-holland commented 4 months ago

That is a good one... Checked, but although it found a lot of missing TADIR, the LFKKAKTIV2CON was not there.

TADIR is related to transporting. It is only required when you create new objects. I'll go for option b)

Thanks

ed-holland commented 4 months ago

FYI: There are more than 2000 SAP prog object in our systems that do not have a TADIR entry. They always have a TRDIR entry.

Because of this, the dependencies are not generated for these includes (and maybe other objects).

closing this issue