2012 Jul 30 11:35 AM
Hi,
I am trying to link attached documents of tasks to an e-mail and send it via outlook in a background job.
I have tried to use SO_DOCUMENT_SEND_API1 AND SO_OBJECT_READ.
I get the links and object content, but I don't know how to attach an object, in this chase a JPG file, to an outgoing e-mail.
Please help!
2012 Jul 30 1:02 PM
2012 Jul 30 1:02 PM
2024 Mar 01 11:59 AM
Hi there! How do you solve it? I´m trying to create a report to copy notifications but attachements are not copied.
Cheeers.
2024 Mar 04 10:02 AM
For GOS attachment, try to use class CL_GOS_SERVICE_TOOLS with a method such as COPY_LINKED_OBJECTS.
* Attachement Creation Service
ls_service-sign = 'I'.
ls_service-option = 'EQ'.
ls_service-low = 'PCATTA_CREA'.
APPEND ls_service TO lt_services.
* Source object
ls_source-instid = from_qmnum.
ls_source-typeid = 'BUS2078'.
ls_source-catid = 'BO'.
* Target object
ls_target-instid = to_qmnum.
ls_target-typeid = 'BUS2078'.
ls_target-catid = 'BO'.
* Copy the objects between Source and Target
cl_gos_service_tools=>copy_linked_objects(
is_source = ls_source
is_target = ls_target
it_service_selection = lt_services
).
* Validate
COMMIT WORK.
2024 Mar 06 9:45 AM - edited 2024 Mar 06 11:36 AM
Hi Raymond,
thanks for your reply, I´ve tried your code using on source a QM notification with attachments to a new one with no attachments and it´s not working at all, no links are read from source notification:
CALL METHOD cl_binary_relation=>read_links_of_binrel
EXPORTING
is_object = gs_lporb
ip_relation = 'ATTA'
ip_role = 'GOSAPPLOBJ'
IMPORTING
et_links = lt_links.
INSTID 290000000141
TYPEID BUS2078
CATID BO
Can be a problem with the type of attachments? I mean, how do I know are "ATTA"?
EDIT
Of course your code works, but not for all attachments I´m afraid, ones which are in SRGBTBREL with ATTA and id = notif number are copied properly, but ones which are manually attached into the notification (QM02) do not appear in SRGBTBREL table nor copied with that code.
Do you know where are stored of how to copy manual attachments?
Thanks!
Thx!
2024 Mar 06 2:48 PM
2024 Mar 08 10:24 AM
Hi there,
I can find my manual created attachments into TOA01 table (no GOS attachments).
Do you know if there is any way to link the TOA01 ones to SRGBTBREL table or... to copy the TOA01 ones to a different notification?
Thanks!
2024 Mar 08 10:42 AM - edited 2024 Mar 08 10:42 AM
For (very) recent versions, a few tools may now be available (compatibility GOS / ArchiveLink)
Else in addition to GOS tools, look also for ArchiveLink tools and FM such as those of group OPTB for example.
2024 Mar 13 12:32 PM
Hi There,
finally I´ve been able to copy archivelink atachaments using ARCHIV_CONNECTION_INSERT FM, with the notification number and data from TOA01 and TOAAT table.
Many thanks for your help!!