Quantcast
Viewing all articles
Browse latest Browse all 9063

Re: Graphic Reference in Adobe form not working!! Urgent!!

Hi Siva

 

You can use below code to get XSTRING from URL

 

TRY.

      " Create the HTTP client

      CALL METHOD cl_http_client=>create_by_url

        EXPORTING

          url                = url   //pass the URL here

        IMPORTING

          client             = lo_client

        EXCEPTIONS

          argument_not_found = 1

          plugin_not_active  = 2

          internal_error     = 3.

 

      IF sy-subrc = 0.

        " Set header fields.

        CALL METHOD lo_client->request->set_header_field

          EXPORTING

            name  = '~request_method'

            value = 'GET'.

 

        CALL METHOD lo_client->request->set_header_field

          EXPORTING

            name  = '~server_protocol'

            value = 'HTTP/1.1'.

 

        CALL METHOD lo_client->request->set_header_field

          EXPORTING

            name  = 'Content-Type'

            value = 'image/jpeg'.

 

        "send and receive

        lo_client->send( ).

        lo_client->receive( ).

 

        "get status

        lo_client->response->get_status( IMPORTING code = lv_return_code ).

 

        "get the response as binary data

        ls_parent_attributes-logo = lo_client->response->get_data( ).

 

        "close connection

        lo_client->close( ).

      ENDIF. "sy-subrc = 0

    CATCH cx_root.

  ENDTRY.

 

Hope it will work

Thanks
Jitendra


Viewing all articles
Browse latest Browse all 9063

Trending Articles