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

Regarding Includes

Former Member
0 Likes
1,228

Hi ,

I have a query that can we write report events in an Include program..

My problem is i hav few include programs and when i activating an include program its giving an error is statement is not accessible...

Actually the error is at TOP Include where there cursor goes to a select statement

so wht i did is i hav put "start-of-selection" in the TOP and it became syntactically correct.. can anyone plzz help me that wht i hav done correct or not.

Thanking u all.

regards,

sanjay

1 ACCEPTED SOLUTION
Read only

S0025444845
Active Participant
0 Likes
1,211

Hi,

you can use events in includes also.

What you have done is correct.

earlier you were getting error because yuo declared something in TOP and using that in main program before activating it.

you can use this also try to activate top and main program together,i think that wil work.

regards,

sudha.

reward points if helpful.

13 REPLIES 13
Read only

Former Member
0 Likes
1,211

it is correct in 2 cases:

1) you do not have any logic in main program.

2) you have specified include in the main program before all ABAP statements(logic part)

Read only

Former Member
0 Likes
1,211

Hi Sanjay,

The events should be in the main program

Reward points if useful.

Regards,

Atish

Read only

S0025444845
Active Participant
0 Likes
1,212

Hi,

you can use events in includes also.

What you have done is correct.

earlier you were getting error because yuo declared something in TOP and using that in main program before activating it.

you can use this also try to activate top and main program together,i think that wil work.

regards,

sudha.

reward points if helpful.

Read only

0 Likes
1,211

How to activate top and main program togather yaar....

regards,

sanjay

Read only

0 Likes
1,211

Hi frnds,

I am getting different views from different people so plzz clarify me with an exact one.. bcoz shuld i use Events in INCLUDES OR NOT...

thanking u all.

regards,

sanjay

Read only

0 Likes
1,211

Hi Sanjay,

Go to SE80, give program name , right click on the program, say activate, you will get list of all objects of the program, now Activate

Regards,

Atish

Read only

0 Likes
1,211

Sorry for the earlier reply, but you can use the Events in Includes.

Regards,

Atish

Read only

0 Likes
1,211

you can do that in 2 cases: <b>(you proved it yourself by avoiding syntax error)</b>

1) you do not have any logic in main program.

2) you have specified include in the main program before all ABAP statements(logic part)

<b>

you can do that if only one program has that include. and if others are sharing the same one then you should keep events in the main programs. </b>

Plz reward points.

Read only

0 Likes
1,211

Hi Atish,

Thank u for showing interest . Can u plzz provide any help link where i can get more information regarding this.

regards,

sanjay

Read only

0 Likes
1,211

Hi Sanjay,

the best place is help.sap.com and sdn itself.

Let me know what are you exactly looking for so that I can provide you the links.

Reward all useful answers.

Regards,

Atish

Read only

0 Likes
1,211

Regarding events in includes.....

regards,

sanjay

Read only

Former Member
0 Likes
1,211

Thank u all for giving this necessary help.

regards,

sanjay