cancel
Showing results for 
Search instead for 
Did you mean: 

set_as_content_type method missing in class /IWBEP/IF_MGW_ODATA_PROPERTY

former_member184739
Contributor
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

kammaje_cis
Active Contributor
0 Kudos

Yes, that seems to be the only solution. But you can try raising a SAP Message and they usually release a note (for SP5) if that is possible.

former_member184739
Contributor
0 Kudos

Thanks krishna. Is there any note released already or do we need raise for the first hand?

Praba

former_member184739
Contributor
0 Kudos

Krishna,

Have you tried downloading files using gateway? Currently I am storing all documents in database table as XSTRING. But this is taking lots of performance when downloading as we have huge data in database.

Is there any solutions availability for this. ?

Your help is appreciated.

Regards

Prabaharan

kammaje_cis
Active Contributor
0 Kudos

About Note:

I do not think there is any existing note. If you raise a message to SAP, they might release a note.

About Files: What kind of files are they? I do not think you need to store them as XSTRING. If it is a Smartform or PDF, there should be FMs which give XSTRING and that can be passed to Gateway.

former_member184739
Contributor
0 Kudos

Krishna

I am uploading files from web apps to SAP. Files formats are PDF,DOCX,DOC and images. What I did is when choosing file from file dialogue,I converted file to hexadecimal string and I received it in SAP using gateway services and stored it in a table.

Regards

Prabaharan

kammaje_cis
Active Contributor
0 Kudos

For storing Documents SAP DB tables are not ideal. You might have to use Content Management Solutions. SAP has a solution called DMS.

https://help.sap.com/erp2005_ehp_04/helpdata/en/c1/1c31a243c711d1893e0000e8323c4f/frameset.htm