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

data in public section and private section swapping no diffrence

Former Member
0 Likes
1,667

dear all,

my question when we define data type in private or protected section and when we shift these declaration

to public section or if we swap these declaration among these section sometime or every time we find no difference

in output.

and my second question

in my programme we define interface in starting of report and again they define within a class,in class interface define with typesin public section and and in starting in report it define with a method with importing parameter

thanks

tarun

f1

Edited by: tarun99 on Jun 11, 2010 11:04 PM

13 REPLIES 13
Read only

naimesh_patel
Active Contributor
0 Likes
1,553

When you change the attribute visibility from Private to Public or vice versa, the consumer or user of that class would get affected. So, if you have a global class which has a public attribute which is being used in a program and when you change this to Private attribute, your program would give the runtime error is you run it or syntax error if you compile it.

The same way, when you change the visibility of Protected Attributes to Private Attributes, you need to make sure all of your Subclasses are error free.

For your second question, you define the interface using the INTERFACE and you use this interface in your concrete class using the keyword INTERFACES. You would write the implementation of the methods of this interfaces in this concrete class once your use it with keyword INTERFACES.

Regards,

Naimesh Patel

Read only

0 Likes
1,553

dear naimesh ,

first of all thanks to reply

you are right , can you please brief me about types declaration in different section and how can we relate

with respect to execution steps.

tarun

Read only

0 Likes
1,553

dear naimesh ,

first of all thanks to reply

you are right , can you please brief me about types declaration in different section and how can we relate

with respect to execution steps.

tarun

Read only

0 Likes
1,553

dear naimesh ,

first of all thanks to reply

you are right , can you please brief me about types declaration in different section and how can we relate

with respect to execution steps.

tarun

Read only

0 Likes
1,553

dear naimesh ,

first of all thanks to reply

you are right , can you please brief me about types declaration in different section and how can we relate

with respect to execution steps.

tarun

Read only

0 Likes
1,553

dear naimesh ,

first of all thanks to reply

you are right , can you please brief me about types declaration in different section and how can we relate

with respect to execution steps.

tarun

Read only

0 Likes
1,553

dear naimesh ,

first of all thanks to reply

you are right , can you please brief me about types declaration in different section and how can we relate

with respect to execution steps.

tarun

Read only

0 Likes
1,553

dear naimesh,

you answer is very helpful ,will you kindly give me detail about types and data declaration in different section

how can we use .i am little bit confuse about.

thanks

tarun

Read only

0 Likes
1,553

dear naimesh,

you answer is very helpful ,will you kindly give me detail about types and data declaration in different section

how can we use .i am little bit confuse about.

thanks

tarun

Read only

0 Likes
1,553

dear naimesh,

you answer is very helpful ,will you kindly give me detail about types and data declaration in different section

how can we use .i am little bit confuse about.

thanks

tarun

Read only

0 Likes
1,553

dear naimesh,

thanks to your reply,kind provide me types decleration steps with respect to the execution steps

in various section and in terfaces

tarun

Read only

0 Likes
1,553

Hi tarun,

public protected and private section define the visibility of attributes and methods: PUBLIC can be seen and used from outside and inside the object. PROTECTED is only visible in the class it self and any inherited classes. PRIVATE is visible only in the class.

Attributes should be always private, their values should be used only by SETter and GETter methods. Other languages and development environments like ECLIPSE for JAVA can generate SET and GET methods.

The transition of ABAP is still under way.

Regards

Clemens

Read only

Former Member
0 Likes
1,553

answered