cancel
Showing results for 
Search instead for 
Did you mean: 

SEGW - CDS - Map data source to an oData model with complex types

Nicolas
Active Contributor
0 Kudos

Hello,

I am trying to map a CDS view with my oData model in SEGW. My oData model uses a complex type PaymentAmount which has 2 properties: Amount and Currency. It has the following structure:

Root
-- ID
-- URL
-- STOREID
-- PAYMENTAMOUNT
---- AMOUNT
---- CURRENCY

In the "mapping editor", I cannot map the properties of the complex type with the corresponding fields of the CDS view. When I click on "Generate Mapping" the Elements remain blank and if I type manually the CDS field I want to map the message Definition of structure 'X6' is empty (fragment 'DUMMY') is displayed on top of the screen:

I also tried to redefine method IF_SADL_GW_EXTENSION_CONTROL~SET_EXTENSION_MAPPING in the DPC class with

    if iv_entity_set_name = 'PaymentSet'.<br>      io_extension_mapping->set_property_mapping( value #(<br>        ( business_entity_element = 'AMOUNT' property_abap_name = 'AMOUNT' ) ) ).<br>    endif.<br>

No error is returned during the oData request but the value is not returned.

Is there a way to map a Business entity field to a property of a complex type ?

I am on a SAP Netweaver 7.40 SP22 system.

Regards,

Nicolas
Active Contributor
0 Kudos

I contacted SAP for this issue and mapping a complex type is not supported on SAP Netweaver 7.40.

Accepted Solutions (0)

Answers (0)