2023 Sep 12 8:33 AM
Hello,
we can put code in Adobe form interface (SFP t-code) - Code initialization section.
Lets say we call a method zcl_adobe-initialization there.
Now in SE24 it is unfortunately not possible to find where-used of class nor method. It is because form interface code is not the usual "generated" code.
Now if someone changes the class method, he/she does not know about the Adobe interface. Not even syntax check knows about the Adobe interface.
Does anyone have a trick how to at least reference/connect Adobe interface to ABAP object (Z class)?
2023 Sep 12 12:32 PM
I'm trying to think of some reason why someone might change the interface of zcl_adobe=>initialization. I'm guess it's used by more than one Adobe form interface?
Are the parameters of the type of a data element or some other simple type? The solution there would be to define a structure for the parameter. Then instead of adding new parameters, you just add another field to the structure.
As for a where-used. The interface is stored in table FPINTERFACE. Field interface holds the interface definition as XML. (You can see it if you set a breakpoint at CL_FP_WB_OBJECT->SAVE_OBJECT - just choose the XML view of the field). You could search the XML of each interface for a reference to the class.
If you want to integrate that into the general where-used, then I guess there's somewhere in implicit enhancement point you could use, or even make a repair.
You could always ask SAP to add it to their where-used code. 🙂
2023 Sep 12 9:53 AM
You mean, in addition to providing clear documentation at class and method level?
2023 Sep 12 10:47 AM
raymond.giuseppi yes 🙂 Docu/comments are already in class/method. But some kind of "where-used trick" is needed. To directly point to Adobe interface from class/method.
I do not want to rely on documentation being kept up-to date.
2023 Sep 12 12:32 PM
I'm trying to think of some reason why someone might change the interface of zcl_adobe=>initialization. I'm guess it's used by more than one Adobe form interface?
Are the parameters of the type of a data element or some other simple type? The solution there would be to define a structure for the parameter. Then instead of adding new parameters, you just add another field to the structure.
As for a where-used. The interface is stored in table FPINTERFACE. Field interface holds the interface definition as XML. (You can see it if you set a breakpoint at CL_FP_WB_OBJECT->SAVE_OBJECT - just choose the XML view of the field). You could search the XML of each interface for a reference to the class.
If you want to integrate that into the general where-used, then I guess there's somewhere in implicit enhancement point you could use, or even make a repair.
You could always ask SAP to add it to their where-used code. 🙂
2023 Sep 12 12:56 PM
Approach of "not needing" a reference at first place is interesting 🙂 But still it is a method called from one (or more) places. And I think developer should be able to easily find where it is called?
Developing own "where-used" could be a way indeed. I am looking for some universal trick or something easily doable on any system.
I will mark the answer later. If nobody else have some other input to this. Thank you!
2023 Sep 12 1:00 PM
Look at Customer Influence and Adoption to submit a new improvement request, you're not in too much of a hurry?
(Or go to enhancement of SAP where-used/X-ref tools as suggested by matthew.billingham)
2023 Sep 12 1:57 PM
So I suppose a Knowledge Transfer Documents won't either do the trick (even if this kind of document can be found in a where-used search from class or method, it wont jump to Adobe)