cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the O Data Service Names and Technical Names of an Entity Set

0 Kudos

Hi Experts ,

How to Get the List of Properties of an Entity set with respective Technical Field names

using any standard method.

Eg :

i want to get the list of Property name and ABAP Field names of an Entity set

Please suggest

thank you..

Accepted Solutions (1)

Accepted Solutions (1)

cwolter90
Participant
0 Kudos

Hi,

some code example (called in a DPC_EXT-class):

DATA: lo_metadata_provider TYPE REF TO /iwbep/if_mgw_med_provider,
      lo_model             TYPE REF TO /iwbep/cl_mgw_odata_model,

lo_metadata_provider = /iwbep/cl_mgw_med_provider=>get_med_provider( ).

lo_model ?= lo_metadata_provider->get_service_model(
                      iv_svc_ext_name           = mr_service_document_name->*
                      iv_svc_namespace          = mr_service_namespace->*
                      iv_svc_version            = mr_service_version->*
                      iv_do_check_for_extension = abap_true
                    ).

DATA(lr_entity) = lo_model->get_entity( *name of your entity* )

"lr_entity->properties contains the fieldmapping

I hope this will help you.

Best regards

Christian Wolter

0 Kudos

Hi Christian ..

Thanks for Reply.

How to get the list of properties from lr_entity.

Answers (1)

Answers (1)

0 Kudos

Hi Christian ..

Thanks for Reply.

How to get the list of properties from lr_entity.

cwolter90
Participant
0 Kudos

Hi Anu,

you can access lr_entity->properties directly. lr_entity is TYPE REF TO /IWBEP/IF_MGW_MED_ODATA_TYPES=>TY_S_MED_ENTITY_TYPE.

Thats a reference of a structure.

Best regards

Christian Wolter