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

Rename method with class SEO_CLASS_CREATE_COMPLETE

Former Member
0 Likes
833

Hello ,

I am using SEO_CLASS_CREATE_COMPLETE to create class with methods ,In every call I send the new method's

with the respective implementation ,the issue here that I have case where we want to rename some method (during RT),

so how can I do that .how can I inform to the API that the method should be renamed ,I.e. keep the old implementation without add new source code.

or maybe should i use different FM for this issue?

Maybe I can use my own logic but there is option to read some method code in RT?

Thanks,

Joy

Edited by: Joy Stpr on Feb 27, 2012 1:54 PM

Hello ,

I am using SEO_CLASS_CREATE_COMPLETE to create class with methods ,In every call I send the new method's

with the respective implementation ,the issue here that I have case where we want to rename some method (during RT),

so how can I do that .how can I inform to the API that the method should be renamed ,I.e. keep the old implementation without add new source code.

or maybe should i use different FM for this issue?

Maybe I can use my own logic but there is option to read some method code in RT?

Thanks,

Joy

Edited by: Joy Stpr on Feb 27, 2012 1:54 PM

1 REPLY 1
Read only

franois_henrotte
Active Contributor
0 Likes
542

basically you have to do it in two steps:

1) copy the method into a new one

call function 'SEO_METHOD_COPY'
        exporting
          mtdkey              = mtdkey
          new_mtdkey          = new_cmpkey
          save                = seox_false
        exceptions
          not_existing        = 1
          deleted             = 2
          target_not_existing = 3
          is_event            = 4
          is_type             = 5
          is_attribute        = 6
          not_copied          = 7
          db_error            = 8
          others              = 9.

2) delete the original

cmpkey-clsname = mtdkey-clsname.
      cmpkey-cmpname = mtdkey-cpdname.

      call function 'SEO_METHOD_DELETE_W_DEPS'
        exporting
          mtdkey       = cmpkey
          save         = seox_false
        exceptions
          not_existing = 1
          is_event     = 2
          is_type      = 3
          is_attribute = 4
          not_deleted  = 5
          db_error     = 6
          others       = 7.

look at standard method PROCESS_OP_RENAME of class CL_OO_CLASS_BUILDER in order to have a sample