cancel
Showing results for 
Search instead for 
Did you mean: 

odata service with GUID issue

Former Member
0 Kudos


Hi,

We have an issue in our OData service. When we try to get GUID from created odata service (based on Calculation view), we receiving following xml tag:
<d:PARTNER_GUID m:type="Edm.Binary">ABVdEOINHtKB4DfNz7Jkqg==</d:PARTNER_GUID>

Do anyone know how to get GUID with odata in usual SAP format: 00155D10E20D1ED281E037CDCFB264AA ?

Thanks and best regards,

Markus

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Markus,

this is the Base64 encoding of the GUID (16 bytes) in binary format.

The value for the GUID in the XML is actually: 105d1500 d21e0de2 cd37e081 aa64b2cf

So you probably have to find a Base64-Decoder in the language you use to consume the OData service.

I hope this helps.

Albrecht

Former Member
0 Kudos

Hi Albrecht,

Thanks for your reply. You were right it was encoding.

Method that decodes nicely:

CALL METHOD cl_http_utility=>if_http_utility~decode_x_base64

    EXPORTING

      encoded = l_string_base64

    RECEIVING

      decoded = l_string.


BR,

Markus

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey,

how do you call the OData-Service with that '=='?

MY_SERVICE_SRV/ProductNameSet('37phXeg1IPG3PAB4V5pFQw==') does not seem to work.

Thanks,

Martin