06-27-2008 1:18 PM
Hi,
I'm trying to create a class and activate it using some ABAP code. I began by copying a template class into a new class called ZKMOD_COPY.
Now I want to activate this class. I tried SEO_METHOD_ACTIVATE but all it does is set the flag to 'A' in the table. It doesn't really activate the whole class I see in SE24.
Going through the forums, I came across where someone said to call these in order: SEO_ATTRIBUTE_ACTIVATE, SEO_EVENT_ACTIVATE, SEO_METHOD_ACTIVATE, SEO_TYPE_ACTIVATE
Now my class does not contain any attributes, events or types. It contains just one method, so I suppose except SEO_METHOD_ACTIVATE I don't really need the others.
Now this method (called EXIT) is implemented from an Interface IF_RSCNV_EXIT. In the class definition of ZKMOD_COPY, it shows this method by the name IF_RSCNV_EXIT~EXIT.
The problem is that I'm not able to activate this method. I can't figure out what parameters to give in CIFKEYand MTDKEYS
I tried all permutations of "zkmod_copy", "if_rscnv_exit" as classes, "exit" and "if_rscnv_exit~exit" as the methods, but it kept throwing exceptions like not specified or not existing. Debugging the FM also did not give me any clues.
So what I really need is, what parameters should I give there? Alternatively, is there any way I can programmatically activate my class? This may sound a silly question, since I'm a BI guy with not too much ABAP knowledge, but I'd be really grateful if someone could help out with this.
06-27-2008 2:49 PM
OK,
You've created a class that implements an interface with one method. When you do this manually, you have to activate seperately:
o The private section
o The public section
o The protected section
o The method
o The class local types -> you might need the include name for this
o The class local definitions -> you might need the include name for this
o The class local implementations -> you might need the include name for this
So I think you have to activate these sections, even if not used.
CIFKEYS I think is the -> IF_RSCNV_EXIT
MTDKEYS-CLSNAME is IF_RSCNV_EXIT
MTDKEYS-CMPNAME is EXIT.
You might have to do a db commit to get changes in.
matt
06-27-2008 2:32 PM
>
> So what I really need is, what parameters should I give there? Alternatively, is there any way I can programmatically activate my class? This may sound a silly question, since I'm a BI guy with not too much ABAP knowledge, but I'd be really grateful if someone could help out with this.
I'm fascinated to understand why a BI guy is doing some heavy duty ABAP programming?
You definitely need to activate the class AND each component. I'll have a little check and see if I can be more definite.
matt
Edited by: Matthew Billingham on Jun 27, 2008 3:33 PM
--> read the question again
06-27-2008 2:49 PM
OK,
You've created a class that implements an interface with one method. When you do this manually, you have to activate seperately:
o The private section
o The public section
o The protected section
o The method
o The class local types -> you might need the include name for this
o The class local definitions -> you might need the include name for this
o The class local implementations -> you might need the include name for this
So I think you have to activate these sections, even if not used.
CIFKEYS I think is the -> IF_RSCNV_EXIT
MTDKEYS-CLSNAME is IF_RSCNV_EXIT
MTDKEYS-CMPNAME is EXIT.
You might have to do a db commit to get changes in.
matt
06-27-2008 4:35 PM
Matt,
We have some Customer Exits in BI. I'm trying to develop a kind of program that will generate the code for a customer exit class. So probably I would have an FM take some params, create the class with some static member attributes (not yet fully designed), so that it is ready to be used as a customer exit.
It's all still nebulous - I'm finding the various things that I feel I will need.
CIFKEYS I think is the -> IF_RSCNV_EXIT
MTDKEYS-CLSNAME is IF_RSCNV_EXIT
MTDKEYS-CMPNAME is EXIT.
In this, the name of the class ZKMOD_COPY is not used anywhere. But IF_RSCNV_EXIT is an interface, it can be implemented by any number of classes. So shouldn't the class name (ZKMOD_COPY) be mentioned somewhere? How would the system know which implementation of IF_RSCNV_EXIT should be activated?
At present I'm not in front of a system; I'll try this on Monday and get back to you. Thanks for the help anyway, Matthew!