Hi,
I referred to different blogs on how to get data using RFC and HTTP. I am now successfully able to read the data from my on-premise system into the ABAP instance on the SAP Cloud Platform.
The below code was used to read the data:
METHOD if_oo_adt_classrun~main.
TRY.
DATA(lo_destination) = cl_http_destination_provider=>create_by_cloud_destination(
i_name = 'G3D_HTTP'
i_service_instance_name = 'ZSAP_COM_0276_G3D_SER_INSTANCE'
i_authn_mode = if_a4c_cp_service=>service_specific ).
DATA(lo_http_client) = cl_web_http_client_manager=>create_by_http_destination( i_destination = lo_destination ).
DATA(lo_request) = lo_http_client->get_http_request( ).
DATA(lo_response) = lo_http_client->execute( i_method = if_web_http_client=>get ).
out->write( lo_response->get_text( ) ).
CATCH cx_root INTO DATA(lx_exception).
out->write( lx_exception->get_text( ) ).
ENDTRY.
ENDMETHOD.
Now the data is also available in the ABAP Console of Eclipse. As mentioned in the tutorial' - https://developers.sap.com/tutorials/abap-environment-deploy-cf-production.html, it is clear that until there is a service binding available on the ABAP instance on Cloud Platform, we cannot consume the service in a Fiori application on Web IDE. So the data which is available now in the ABAP console of Eclipse, how can we ensure that its corresponding service binding is also created and available on the ABAP instance on Cloud Platform for consumption in Web IDE?
Attaching screenshot of the abap console for reference.
Regards,
Udita
