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

Retrieve GOS Attachment

Former Member
0 Likes
1,721

Hi All,

I am developing a program to retrieve the GOS attachment from PO attachment and send to the vendor through email. Kindly advise me to resolve this problem because I have no idea how to retrieve the attachment from the GOS table.

Many thanks and best regards,

Ting Wei Hong

Hi All,

I am developing a program to retrieve the GOS attachment from PO attachment and send to the vendor through email. Kindly advise me to resolve this problem because I have no idea how to retrieve the attachment from the GOS table.

Many thanks and best regards,

Ting Wei Hong

3 REPLIES 3
Read only

b_deterd2
Active Contributor
0 Likes
737

Hi,

There is a class CL_GOS_MANAGER. Use that.

See here for an example:


data: o_gos type ref to cl_gos_manager.
  data: o_att type ref to cl_gos_attachments.
  data: ls_borident type borident.

  ls_borident-objkey = gs_data-vgbel.
  ls_borident-objtype = zcl_word=>co_busobject_worddocument.

  free o_gos.

  create object o_gos
    exporting
      ip_no_commit = space.

  call method o_gos->start_service_direct
    exporting
      ip_service       = 'VIEW_ATTA'
      is_object        = ls_borident
    exceptions
      no_object        = 1
      object_invalid   = 2
      execution_failed = 3
      others           = 4.
  if sy-subrc <> 0.
    message 'Geen bijlagen aanwezig. Toolbox wordt getoond' type 'S'.
    o_gos->display_toolbox( is_object = ls_borident ).
  else.
    message 'Bijlagen aangepast' type 'S'.
  endif.


Read only

Former Member
0 Likes
737

Thanks for you fast replied. However, I need to export the attachment and make it available to send out together with my PO through the email.

Read only

Former Member
0 Likes
737

hi check this..

and check table SOOD SOC3 SOFFCONT1

regards,

venkat