Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

set_as_content_type method missing in class /IWBEP/IF_MGW_ODATA_PROPERTY

Dear Experts,

I am trying to download a file using ECC as a source system via SAP Netweaver gateway OData service. I created a Entity type and marked as "Media = X' in service builder. But when i tried to redefine the method method using below code snippet

method DEFINE.

DATA: lo_entity_type TYPE REF TO /iwbep/if_mgw_odata_entity_

typ,

lo_property TYPE REF TO /iwbep/if_mgw_odata_property.

super->define( ).

lo_entity_type = model->get_entity_type( 'Product' ).

lo_entity_type->set_is_media( ).

lo_property = lo_entity_type->get_property( 'PictureURI' ).

lo_property->set_as_content_source( ).

lo_property = lo_entity_type->get_

property( 'PictureMIMEType' ).

lo_property->set_as_content_type( ).

endmethod.

Upon syntax check i am getting error as "set_as_content_source is unknown or protected" because i couldn't find above highlighted methods in the class "/IWBEP/IF_MGW_ODATA_PROPERTY"(SP5). However i could find the above methods in SAP NW Gateway demo system(SP6).

Should i have to update Gateway service pack level? Is this the only option?

Any ideas is appreciated.

Please suggest.

Regards

Prabaharan

Not what you were looking for? View more on this topic or Ask a question