cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

OData Service from CDS-View: CONVERSION_EXIT_SDURA_OUTPUT Error

Former Member
0 Likes
1,473

I have created a cds-view for spfli, which contains the field FLTIME (type I. An OData-Service is created for the CDS-View by using the annotaiton @OData.publish: true.

A call of the OData-Service yields the following error:

Failed to call CONVERSION_EXIT_SDURA_OUTPUT (output is assignet to a not compatible field).

Code: /IWBEP/CL_MGW_DATA_HELPER=====CM008 (Line 214)

CALL FUNCTION lv_function "value = CONVERSION_EXIT_SDURA_OUTPUT

EXPORTING
input = iv_source_property " value 361, I(4)
IMPORTING
output = ev_target_property " value 361, I(4)

Why is the function called with integer values? It seems to be a software error from SAP.

Note: In the method INTERNAL_ENTITYSET_OUTB (/IWBEP/CL_MGW_DATA_HELPER) one can see that the internal type is an Integer and the corresponding EXIT is SDURA (in the structure LS_PROPERTY_INFO).

Accepted Solutions (0)

Answers (2)

Answers (2)

rafal_d
Explorer

I know the topic is old, but maybe my comment will be useful for somebody.

I faced some similar issue and could not find a solution.

In my case error in 'CONVERSION_EXIT_SDURA_OUTPUT' happens when I tested created oData Service which was build based on the structure SFLIGHT_T.

Error:

"The function call of CONVERSION_EXIT_SDURA_OUTPUT failed; a field may have been assigned to the parameter OUTPUT whose type is not compatible with this parameter"

The problem is field FLTIME using data element S_FLTIME.

S_FLTIME is using domain S_DURA.

If you open S_DURA you see routine SDURA which is using 'CONVERSION_EXIT_SDURA_OUTPUT'.

I guess this is kind of SAP bug, but since SFLIGHT is used for demo probably nobody cares about it.

In my case I simply removed field FLTIME (in SEGW) and not used it. otherwise it shall be reported to SAP Support.

evillafuerte
Explorer
0 Likes
Thank you so much! it worked it after i deleted that column from the entity type . Now i Can proceed with my test. Thanks again .
mmcisme1
Active Contributor
0 Likes

To help you out I did a quick search.

sap cds int4

It did come up with what I was looking for. There is a group of blogs for CDS that are all good to read. The one you are looking for is

https://blogs.sap.com/2019/10/23/part3.-cds-view-with-expressions-and-session-variables/

I'm not sure why you needed to create the definition unless it is the parameter. Anyway take a look at this, and then the entire blog list if you can.