Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Find logo from binary or hex string

Former Member
0 Likes
588

HI All ,

I have file 2 strings one with HEX and one binary this to string is contain the value

for attachment (logo) ,which FM or method i should use to see the logo, the picture itself ?

Regards

James

Edited by: James Herb on Feb 28, 2010 5:32 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
527

Hi James,

This methods and function modules should work for you.

CALL METHOD cl_binary_relation=>read_links_of_binrel

EXPORTING

is_object = is_object

ip_relation = 'ATTA'

IMPORTING

et_links = et_links.

catch

cx_obl_parameter_error into icx_obl_parameter_error.

exception_string = icx_obl_parameter_error->get_longtext( ).

catch cx_obl_internal_error into icx_obl_internal_error .

exception_string = icx_obl_internal_error->get_longtext( ).

catch

cx_obl_model_error into icx_obl_model_error.

exception_string = icx_obl_model_error->get_longtext( ).

ENDTRY.

SORT et_links BY utctime.

LOOP AT et_links INTO et_links_s.

v_tbx = sy-tabix.

document_id = et_links_s-instid_b.

CALL FUNCTION 'SO_DOCUMENT_READ_API1'

EXPORTING

DOCUMENT_ID = document_id

  • FILTER = 'X '

IMPORTING

DOCUMENT_DATA = document_data

TABLES

OBJECT_HEADER = object_header

OBJECT_CONTENT = object_content

  • OBJECT_PARA =

  • OBJECT_PARB =

  • ATTACHMENT_LIST =

  • RECEIVER_LIST =

  • CONTENTS_HEX =

EXCEPTIONS

DOCUMENT_ID_NOT_EXIST = 1

OPERATION_NO_AUTHORIZATION = 2

X_ERROR = 3

OTHERS = 4.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDLOOP.

3 REPLIES 3
Read only

Former Member
0 Likes
528

Hi James,

This methods and function modules should work for you.

CALL METHOD cl_binary_relation=>read_links_of_binrel

EXPORTING

is_object = is_object

ip_relation = 'ATTA'

IMPORTING

et_links = et_links.

catch

cx_obl_parameter_error into icx_obl_parameter_error.

exception_string = icx_obl_parameter_error->get_longtext( ).

catch cx_obl_internal_error into icx_obl_internal_error .

exception_string = icx_obl_internal_error->get_longtext( ).

catch

cx_obl_model_error into icx_obl_model_error.

exception_string = icx_obl_model_error->get_longtext( ).

ENDTRY.

SORT et_links BY utctime.

LOOP AT et_links INTO et_links_s.

v_tbx = sy-tabix.

document_id = et_links_s-instid_b.

CALL FUNCTION 'SO_DOCUMENT_READ_API1'

EXPORTING

DOCUMENT_ID = document_id

  • FILTER = 'X '

IMPORTING

DOCUMENT_DATA = document_data

TABLES

OBJECT_HEADER = object_header

OBJECT_CONTENT = object_content

  • OBJECT_PARA =

  • OBJECT_PARB =

  • ATTACHMENT_LIST =

  • RECEIVER_LIST =

  • CONTENTS_HEX =

EXCEPTIONS

DOCUMENT_ID_NOT_EXIST = 1

OPERATION_NO_AUTHORIZATION = 2

X_ERROR = 3

OTHERS = 4.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDLOOP.

Read only

0 Likes
527

hi

S P

This is what i use to read attch from VA02 and its works just fine.

i get table with HEX and i want to do test and see the logo after the conversion .

how i can do that.

i.e. i read the link to hex with the logic you write but how convert the opposite again ->get the logo again.

Regards

James

Read only

0 Likes
527

You can use the function SO_DYNP_DOCUMENT_DISPLAY for converting the Binary format to the Logo display