cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert abap internal datatype to odata gateway?

0 Kudos

Hello,

In my get entity method how to convert the values which are taken from db into odata gateway ?

I'm fetching the values from db and i want to put it into er_entity , While modeling i used sflight and changed date and currency type in my odata model.

Thanks.

Regards,

Narendra.

Accepted Solutions (0)

Answers (4)

Answers (4)

Pavan_Golesar
Active Participant
0 Kudos

Hello Narendra,

I too had this date issue in Gateway, got it Resolved.

Please check this post.

Hope it helps you.

Cheers!!

Best Regards,

Pavan Golesar

SyambabuAllu
Contributor
0 Kudos

Hi Narendra,

Adding to ashwin Comments.

Could you please check below link for Date time EDM Type modelling in OData.

0 Kudos

Hi Ashwin,

I have created ODATA model using the table sflight. Since there was an error in currency and date field in entity property attributes, i modified the fields in my odata. Now my ODATA model structure is changed when compared to SFLIGHT table.

                            In my DPC_EXT-get entity method  i'm fetching the values from SFLIGHT and i tried to put into et_entity,  now how to convert the data fetched from SFLIGHT into my odata structure.

Thank you.

AshwinDutt
Active Contributor
0 Kudos

Hello Narendra,

What is that you changed in Model for Currency & Date ? ABAP Types or EDM types ?

I don't see any conversion needed until you face any dump while mapping back the response to GW.

Normally GW frame itself will pick the appropriate data types based on the data types of the abap fields.

Are you getting any error when you consume service ? What is that made you to think some conversion is needed for the data fetched from Table before mapping it to GW response structures ?

Regards,

Ashwin

AshwinDutt
Active Contributor
0 Kudos

Hello Narendra,

Could you be little more clear regarding what conversion you are expecting ?

Conversion Routine you want to call ?

Please share the more details.

Regards,

Ashwin