cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

Hi experts,

I have a requirement to print Graphic from URL . I have created a Graphic node and given the url = 'C:\Users\Public\Pictures\Sample Pictures\Chrysanthemum.jpg' . But it is not displayed in the form output.

Please let me know how to resolve this issue.

Thanks,

Sivashankaran G

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

hi ,

You can use 2 ways to display image in adobe form

1. Static

take the image field from object library and double click on that field and select the

image and enable the check box , Embed image.

2. Dynamic image

-Upload image in se78 .

-Create graphic node in form context and specity the global variable n the properties ,contents the xstring of uploaded image by BDS_GRAPHIC function.

- Bind the graphic node to the image field.


Thanks

Jitendra

Former Member
0 Kudos

Hi Jitendra,

Thanks for your reply. But i forgot to mention its only dynamic image from web and it can be in any format like .jpg etc. Since SE78 only support TIFF and BMP images i could not upload those images, so only i went for Graphic reference.

Thanks,

Sivashankaran G

0 Kudos

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

Former Member
0 Kudos

Hi Jitendra,

Thank you . I tried to use URL but couldn't display .Meanwhile FC's said the image will be loaded into content server and from there i can pick. so i converted the  content server- image into xstring and bind the value to the field in graphic content , thus it works.

Thanks,

Sivashankaran G

0 Kudos

hi Shiva

You are right.

I forgot to mention about the image  that should be on internal server.

Please close this thread if you got your answer.

Thanks

Jitendra