Application Development 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: 

E-Mail attached documents linked in QM02 (Quality Notifications)

mornee_parsons
Explorer
0 Kudos

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!

1 ACCEPTED SOLUTION

mornee_parsons
Explorer
0 Kudos

Solved myself

8 REPLIES 8

mornee_parsons
Explorer
0 Kudos

Solved myself

JSM
Explorer
0 Kudos

Hi there! How do you solve it? I´m trying to create a report to copy notifications but attachements are not copied.

Cheeers.

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.

0 Kudos

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!

0 Kudos

Try to use multiple roles such as GOSAPPLOBJ or PNOT

0 Kudos

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!

 

0 Kudos

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.

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!!