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