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

what is the difference between code and declaration while creating explicit enhancement

Former Member
0 Likes
1,904

Hi ,

I have a doubt about the difference between the code and  declaration while creating the explicit enhancement.

Regards

khaleel

4 REPLIES 4
Read only

Former Member
0 Likes
1,146

Hi khaleel,

Pls refer the following link:

http://wiki.scn.sap.com/wiki/display/ABAP/How+to+do+Explicit+Enhancement

Feel free to ask in case any doubts.

Regards,

Ashish

Read only

0 Likes
1,146

Hi Ashish,

Thanks for reply.

Already I have gone through this document previously.But this document not addressed my doubt.

Regards

khaleel

Read only

0 Likes
1,146

Hi Khaleel,

Can you please be more specific on your doubt?

Regards,

Ashish.

Read only

PeterJonker
Active Contributor
0 Likes
1,146

I think the enhancements are separate objects which are merged at runtime. if you want to define a variable which should be visible in the whole program (so also in other enhancements and possible user exits) then a declaration is needed.

The declaration will merge with the top include of the program.

If you use the code part to declare a variable it will only be visible In the enhancement where it has been defined and maybe in the same process block.

That's why I think you need to use declaration for declaring variables in an enhancement.

Please correct me if I am wrong