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

Abap Object .

herzelhaimharel_gilor
Participant
0 Likes
522

Hi Folks ,

i'm writing a program which contain one class and it's implemetation .

i choose to put the code that related to the(Definition and implementation ) class in INCLUDE file , so that my program looks like this :

report repname .

include class_stuff.

DATA: cref type ref to class_struct ,

....

....

.

CREATE OBJECT cref .

...

cref->meth(var1 = val1 var2 = val2 .... ) .

....

...

and so on .

when i try to execute the program it doesn't run properly , i wachted closely with the debugger and i noticed that after the INCLUDE class_stuff statement it's terminate .

can someone know how to explain this situation and how to avoid from short execution of the program ?

is it possible to define local class inside include ?

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
473

Do you have a start-of-selection statement?

Put one after your "DATA" statement and before your "CREATE OBJECT" statement. Should work then.

Regards,

Rich Heilman

Message was edited by: Rich Heilman

Read only

0 Likes
473

i'll try this .

you can tell me what is the reason for this order ?

Read only

0 Likes
473

Not sure why its like that, but if you put your implementations at the end of the program, then you don't need the start-of-selection statement. Kinda weird.

Regards,

Rich Heilman