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

Conversion exit in ABAP RESTful Programming Model - Need Solution

2,355

Area - ABPA RESTful Programming model.

I created CDS view with below fields. Data element behind the attributes have the conversion exit.

Because of the Conversion exit, my service Binding Preview tool, is not loading the application.

So I checked the transaction code /IWBEP/ERROR_LOG. I have error Message, Conversion exit not allowed for entity attribte << attribute name >>.

But I need the attribute, should be shown on my application.

Attribute use the Standard data element Domain.

Example : PS_PSPID ( Domain )

/BOBF/TIMESTAMP ( Domain )

Accepted Solutions (0)

Answers (4)

Answers (4)

sharanjee_186716
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

You can cast field to the data element which doesn't have conversion exit. Then it will work. Refer to below code.

cast( created_on as changedatetime ) as CreatedOn,

Here changedatetime dataelement doesn't have conversion exit.

Thanks
Gaurav

CarineTchoutouo
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

the conversion exit (from BOPF) mentioned in the question is only meant for dynpros (SAP GUI) and therefore, leads to a dump in OData.

In general, only data elements with no conversion exit should be used together with the built-in CAST expression in the CDS data model when building OData services.

For example, the standard reuse data element `ABP_CREATION_TSTMPL` or any data element with domain `TZNTSTMPL` can be used instead of the mentioned /BOBF/ Timestamp.

Hope this helps.

Kind regards,

Carine

kretschj
Explorer
0 Likes

any solution for this problem ?

StarDev
Participant
0 Likes

Hi. Could you try doing a casting of the field to Timestamp field in the wrapper CDS. Might help.

cast(zfield as timestamp) as zfield.