2008 Apr 22 9:05 AM
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
2008 Apr 22 9:08 AM
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.
2008 Apr 22 10:15 AM
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.
2008 Apr 22 10:23 AM