Hello experts:
I want to use http method 'post' to upload file to internal table,and after I redefine 'create_stream' in my DPC and test it in Client,It shows "Invalid or no mapping to system data types found".
this is my MPC:
lo_entity_type = model->create_entity_type('File').
lo_entity_type->set_is_media( 'X' ).
lo_property = lo_entity_type->create_property( iv_property_name ='Mandt iv_abap_fieldname = 'MANDT').
lo_property = lo_entity_type->create_property( iv_property_name ='Filename' iv_abap_fieldname = 'FILENAME').
lo_property->set_is_key( ).
lo_property = lo_entity_type->create_property( iv_property_name ='Sydate' iv_abap_fieldname = 'SYDATE').
lo_property = lo_entity_type->create_property( iv_property_name ='Sytime' iv_abap_fieldname = 'SYTIME').
lo_property = lo_entity_type->create_property( iv_property_name ='Value' iv_abap_fieldname = 'VALUE').
lo_property = lo_entity_type->create_property( iv_property_name ='Mimetype' iv_abap_fieldname = 'MIMETYPE').
lo_entity_type->bind_structure( 'Z_CL_MODEL_PROVIDER=>FILE' ).
lo_entity_type->create_entity_set( 'FILESET' ).
this is my DPC:
method/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_STREAM.
DATA ls_excel TYPE ZEXCELDETAIL.
ls_excel-mimetype = is_media_resource-mime_type.
ls_excel-filename = iv_slug.
ls_excel-value = is_media_resource-value.
copy_data_to_ref( EXPORTING is_data = ls_excel
CHANGING cr_data = er_entity ).
Is anyone knows how to fix with it?
Thanks!!!!!!!
Regards,
Cao