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

Problem with variable declared in TOP Include

manoj_goyal2
Participant
0 Likes
2,426

Hi,

I have declared a variable P_TEXT in TOP include ZPGM_TOP. In main program ZPGM, I have declared this TOP include ZPGM_TOP and another include ZPGM_F01.

I am accessing P_TEXT in include ZPGM_F01, but it is giving me following error when I do syntex check.

Error : Field P_TEXT is unknown. It is neither in one of the specified tables nor defned by DATA statement.

But when I double click on P_TEXT in ZPGM_F01, it takes me to TOP include declaration.

Please advise what I am doing wrong.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
1,120

Check the sequence in which your includes are declared e.g.

include zpgm_top. "data
include zpgm_f01. "code

would work, but:

include zpgm_f01. "code
include zpgm_top. "data

will give syntax error in "zpgm_f01".

Jonathan

5 REPLIES 5
Read only

Former Member
0 Likes
1,120

Hi,

Have you activated all the programs (Main + includes) together. If not try it.

Go to SE80->program name->right click->Activate.

Regards,

Atish

Read only

Former Member
0 Likes
1,120

Activate first your TOP include program and then you activate / syntax check the FORMs program. As TOP include is inactive, it is not able to activate your ZPGM_F01 program.

Hope this helps.

ashish

Read only

Former Member
0 Likes
1,120

Hi,

You can try this.

Goto the main program do this.

goto UTILITIES->Update Navigation Index

Do the same thing in TOP include also and in the form include also.

This solves the problem in most cases.

Regards

Nishant

Read only

Former Member
0 Likes
1,120

Activation problem..

Make sure each n every include and ur main prog is activated

First activate the include which has that variable

Hope this will solve ur query

Reward all helpful answers

Read only

Former Member
1,121

Check the sequence in which your includes are declared e.g.

include zpgm_top. "data
include zpgm_f01. "code

would work, but:

include zpgm_f01. "code
include zpgm_top. "data

will give syntax error in "zpgm_f01".

Jonathan