on 09-17-2013 2:25 PM
hi this is totally new stuff for me, i don't know from where to start and would be great if someone can guide me regarding it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Abhishek,
1. Create an Entity , add properties u want and set it as Media Type.
2. Generate Run-time Objects.
3. Go to DPC_EXT class and in that implement Create_Stream method and call the appropriate business logic inside it which will upload content in ur BE
3. Fire the service as below.
Sample with URL -> Please change the URL as per your inputs
U can test your operation by disabling virus scan in the SPRO setting but it is not advised to disable it.
U need to define profile for virus scan. As far as i know it should already been defined with a default one during the configuring GW systems.
Pass the key inside SLUG header.
If at all if u get error related to Mapping or Context or Data Type then please do the below.
Got to MPC_EXT class and redefine Define method and add the below code.
super->define( ).
lo_entity TYPE REF TO /iwbep/if_mgw_odata_entity_typ,
lo_property TYPE REF TO /iwbep/if_mgw_odata_property.
lo_entity = model->get_entity_type( iv_entity_name = 'Customer' ).
IF lo_entity IS BOUND.
lo_property = lo_entity->get_property( iv_property_name = 'CustomerID' ).
lo_property = lo_entity->get_property( iv_property_name = 'mimeType' ).
lo_property = lo_entity->get_property( iv_property_name = 'Title' ).
lo_property = lo_entity->get_property( iv_property_name = 'FirstName' ).
lo_property = lo_entity->get_property( iv_property_name = 'LastName' ).
lo_property = lo_entity->get_property( iv_property_name = 'Gender' ).
lo_property->set_as_content_type( ).
ENDIF.
This shud resolve those errors.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Abhishek,
Try this link..
This is really helpful.
Please specify the problem you are getting.
Hope this helps.
Thanks,
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhishek,
You need to understand concept of "Media Links" in OData..
Below blog might be useful for getting you started with uploading/downloading.
Below blog tells you how to upload a photo from a Backend system and access it in the OData service.
Thanks
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please refer to thread http://scn.sap.com/thread/3262540 which is regarding uploading an image using OData service.
Hello Krishna,
The links that you provide really confused me a lot because i can not land up creating a successful upload by following any of those blogs.
Rashmi's blog - i got some error.
Jan's blow - again some error.
i have posted them both about the error. Let me know if u have complete working example which I can replicate.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.