Application Development 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: 

How to create a class dynamically by ABAP code ?

Former Member
0 Kudos

How to change a class attribute?

Best regards,

1 ACCEPTED SOLUTION

Former Member
0 Kudos

to change instance attribute

<reference variable>->atribute = <value> .

to change static attribute

<class name>->atribute = <value>.

remember attribute you want to change must be in public section of the class

and not read only and not constant

6 REPLIES 6

Former Member
0 Kudos

to change instance attribute

<reference variable>->atribute = <value> .

to change static attribute

<class name>->atribute = <value>.

remember attribute you want to change must be in public section of the class

and not read only and not constant

0 Kudos

hi, Marat,

Sorry , my question is how to add a method by ABAP code, for example ,

I have a new method with the method name 'Add_speed' with return value rv_tmp return 'Hello World'.

Is it possible to add the method by ABAP code?

Best regards,

Blake Le

0 Kudos

in the abap code, as i know, is possible to create local class.

0 Kudos

Hi,

you can use function modules under SEOK function group to add methods to your class.

Eg: SEO_METHOD_CREATE to create methods

Reward points if useful.

Regards,

Siva.

0 Kudos

HI, Siva

Thanks very much. It's what we want .

Best regards,

Blake Le

Former Member
0 Kudos

Hi,

maybe this is helpful:

[Object Handling|http://help.sap.com/saphelp_nw70/helpdata/EN/c3/225b5f54f411d194a60000e8353423/frameset.htm]

Regards Rudi