2014 Mar 27 10:01 AM
Hi Experts,
There are some images available in se78.
Now my requirement is to transfer that image to GOS.
Please share your ideas regarding how can i perform this..
Any ideas will be appreciated..
Hi Experts,
There are some images available in se78.
Now my requirement is to transfer that image to GOS.
Please share your ideas regarding how can i perform this..
Any ideas will be appreciated..
2014 Mar 27 11:06 AM
2014 Mar 27 11:13 AM
2014 Mar 27 3:49 PM
Hi,
I did something similar as a test: after reading image 'LOGO_IER' I attach it to the object 'ZBUONO_PAG' with key 'CECE201300013'.
Here's my code:
DATA: objcont TYPE soli_tab,
objhead TYPE soli_tab,
objcontx TYPE solix_tab,
document_id TYPE sofmk,
img TYPE xstring,
folder_id TYPE sofdk,
so_obj_id TYPE soodk,
attach_id TYPE borident,
object_id TYPE borident,
object_hd_change LIKE sood1.
* Read bitmap from SE78
cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp(
EXPORTING
p_object = 'GRAPHICS'
p_name = 'LOGO_IER'
p_id = 'BMAP'
p_btype = 'BCOL'
RECEIVING
p_bmp = img
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3
).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
EXPORTING
region = 'B'
IMPORTING
folder_id = folder_id
EXCEPTIONS
OTHERS = 1.
* Convert to SOLI_TAB to call SO_OBJECT_INSERT
objcontx = cl_bcs_convert=>xstring_to_solix( iv_xstring = img ).
CALL FUNCTION 'SO_SOLIXTAB_TO_SOLITAB'
EXPORTING
ip_solixtab = objcontx
IMPORTING
ep_solitab = objcont.
object_hd_change-objdes = 'Image from SE78'. "image name
object_hd_change-file_ext = 'bmp'. "image extension
CALL FUNCTION 'SO_OBJECT_INSERT'
EXPORTING
folder_id = folder_id
object_type = 'EXT'
object_hd_change = object_hd_change
IMPORTING
object_id = so_obj_id
TABLES
objcont = objcont
objhead = objhead
EXCEPTIONS
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
dl_name_exist = 4
folder_not_exist = 5
folder_no_authorization = 6
object_type_not_exist = 7
operation_no_authorization = 8
owner_not_exist = 9
parameter_error = 10
substitute_not_active = 11
substitute_not_defined = 12
system_failure = 13
x_error = 14
OTHERS = 15.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Read image details
document_id-foltp = folder_id-foltp.
document_id-folyr = folder_id-folyr.
document_id-folno = folder_id-folno.
document_id-doctp = so_obj_id-objtp.
document_id-docyr = so_obj_id-objyr.
document_id-docno = so_obj_id-objno.
* Link bmp to object as attachment
object_id-objtype = 'ZBUONO_PAG'. " object type to attach to
object_id-objkey = 'CECE201300013'. " object name to attach to
IF document_id IS NOT INITIAL.
attach_id-objkey = document_id.
attach_id-objtype = 'MESSAGE'.
CALL FUNCTION 'BINARY_RELATION_CREATE'
EXPORTING
obj_rolea = object_id
obj_roleb = attach_id
relationtype = 'ATTA'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
COMMIT WORK.
ENDIF.
ENDIF.
regards,
Marco
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |