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: 

ABAP Resource URL documentation

pfefferf
Active Contributor
0 Kudos

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

5 REPLIES 5

thomasalexander_ritter
Active Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

Thank you Thomas for the information.