cancel
Showing results for 
Search instead for 
Did you mean: 

Get Object ID using Object Name.

Former Member
0 Kudos

Hola expertos,


I want to get the Object ID like '0099293888A9499040C4549' of any BRF Plus object using Object Name.


I hope there should be some API to pass the Object Name like the expression or function name and get the Object ID for the same.


I tried to look out for sample code in SCN  but could not figure out any so far.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi

Try this:

DATA lo_brf_query         TYPE REF TO if_fdt_query.
DATA lt_brf_object_ids    TYPE if_fdt_types=>ts_object_id.

lo_brf_query   = cl_fdt_factory=>get_instance( )->get_query( ).

lo_brf_query->get_ids(
  EXPORTING iv_name        = 'BRFPLUS_OBJECT_NAME_HERE'
  IMPORTING ets_object_id  = lt_brf_object_ids ).

This will return a list of all objects that have the name specified in parameter IV_NAME. These objects could be of any type - application, function, expression, etc. If you only want a specific type of object then you can use the optional parameter IV_OBJECT_TYPE to restrict the objects returned from the GET_IDS method. For example, this will only return applications.


lo_brf_query->get_ids(

  EXPORTING iv_name        = 'BRFPLUS_OBJECT_NAME_HERE'

            iv_object_type = if_fdt_constants=>gc_object_type_application
  IMPORTING ets_object_id  = lt_brf_object_ids ).

Regards

Glen

Former Member
0 Kudos

Glenn .... muchas muchas gracias

Former Member
0 Kudos

De nada.

sunlw999
Advisor
Advisor
0 Kudos

great

Answers (0)