Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Code completion not working for local classes

Former Member
0 Likes
1,257

Hello, everyone.

Need help with a weird code completion issue that I'm facing since upgrade to SAP GUI 7.40.

The problem is the following. I'm writing a report with a set of local classes; each class resides in its own include. Say, I have LCL_A in ZINCL_A and LCL_B in ZINCL_B. I try to use LCL_A from LCL_B, but the code completion does not "see" the LCL_A's members (neither methods nor its parameters), so I have to type everything manually.

The same happens if I put definition and implementation in separate includes: in implementation include the code completion does not show any of the class members (even method parameters).

I've updated client to patch level 7 (the latest one), but that does not seem to help. Am I missing something?

Thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,167

Solved it.


What I was missing is the place where my includes are "included". I used to organize includes as following:


REPORT zz_rep.


INCLUDE zz_rep_top.      " TOP include

INCLUDE zz_rep_cl_def_a. " LCL_A definition

INCLUDE zz_rep_cl_def_b. " LCL_B definition

...

INCLUDE zz_rep_cl_imp_a. " LCL_A implementation

INCLUDE zz_rep_cl_imp_b. " LCL_B implementation


This works fine in 7.30, but in 7.40 all global definitions should go to TOP-include, in this case code completion will process them properly. So, these lines:


INCLUDE zz_rep_cl_def_a. " LCL_A definition

INCLUDE zz_rep_cl_def_b. " LCL_B definition


need to be moved to the TOP-include.

4 REPLIES 4
Read only

ThangaPrakash
Active Contributor
0 Likes
1,167

Hi Alex,

Once you got to SE38 editor --> click on this icon

Go to code completion --> check on the check boxes indicated and try reducing the seconds to lower value.

Regards,

Thanga

Read only

0 Likes
1,167

Thank you for looking into this, but things are not that easy. The code completion is on, and it works fine when, e.g., the whole class code (definition and implementation) is in one include. But once I move definition to a separate include, code completion does not show class memebers in implementation section any more. Local and global types/variables are still visible.

Read only

0 Likes
1,167

Is that Non-keywords check box is checked?

Read only

Former Member
0 Likes
1,168

Solved it.


What I was missing is the place where my includes are "included". I used to organize includes as following:


REPORT zz_rep.


INCLUDE zz_rep_top.      " TOP include

INCLUDE zz_rep_cl_def_a. " LCL_A definition

INCLUDE zz_rep_cl_def_b. " LCL_B definition

...

INCLUDE zz_rep_cl_imp_a. " LCL_A implementation

INCLUDE zz_rep_cl_imp_b. " LCL_B implementation


This works fine in 7.30, but in 7.40 all global definitions should go to TOP-include, in this case code completion will process them properly. So, these lines:


INCLUDE zz_rep_cl_def_a. " LCL_A definition

INCLUDE zz_rep_cl_def_b. " LCL_B definition


need to be moved to the TOP-include.