02-14-2014 3:53 PM
Hi,
we are using a tool for static code analysis which displays the remarks in an HTML dashboard.
To access the ABAP resources directly out of the dashboard we wanna integrate links with ABAP Resource URLs into it.
My question is if there exists a documentation how the resource URLs for the different objects must look like. Of course I can create an URL for each object manually, but maybe there exists a documentation which we can use.
Thx & regards, Florian
02-17-2014 9:47 AM
Hi Florian,
currently there is no documentation on how the different URLs look like. However, there are utility classes in the ABAP backend which generate the URLs for you. So my question is: did you implement the HTML dashboard on the ABAP server? Then you could use the utility classes which has the nice side effect that whenever the structure of the URLs change the dashboard links will not break.
cheers
Thomas
02-17-2014 10:03 AM
Hi Thomas,
thx for your answer. The dashboard is not generated in the ABAP backend. But we export all sources in "text" files with additional information. During the export we could add the ABAP Resource URL.
Do you know the utility classes which generate the URLs?
Regards, Florian
02-17-2014 1:43 PM
Hi Florian,
first, I have to add the disclaimer:
These classes are internal APIs. They might change in the future.
If you are willing to accept this risk then have a look at the following classes:
adt://SYSTEMID/sap/bc/adt/oo/classes/cl_sedi_adt_uri_builder_prog
adt://SYSTEMID/sap/bc/adt/oo/classes/cl_oo_adt_uri_builder_intf
adt://SYSTEMID/sap/bc/adt/oo/classes/cl_oo_adt_uri_builder_class
adt://SYSTEMID/sap/bc/adt/oo/classes/cl_fb_adt_uri_builder_fugr
As you can see they all follow the pattern cl*uri*builder*.
Hope this helps.
cheers
Thomas
By the way, always nice to see what interesting stuff people do with the ADT links
02-17-2014 2:30 PM
Hi Florian,
a colleague just pointed out another solution. If you have the workbench type for the objects then you can do this:
"Get workbench object
wb_object = cl_wb_object=>create_from_transport_key(
p_object = |{ objtype }|
p_obj_name = |{ objname }|
).
"Get URI mapper
objref = cl_adt_uri_mapper=>get_instance( )->if_adt_uri_mapper~map_wb_object_to_objref( wb_object ).
"Get URI
objref->ref_data-uri
This API is already public. The SAPlink team is using this technique as well (branches/adt-2.0/CEX/SAPLINKADT/CLAS/CEX/CL_SAPLINK_ADT_SLNK_RES.slnk | SVN | Assembla).
cheers
Thomas
02-17-2014 2:31 PM