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: 

read attachments

Former Member
0 Kudos

Hi,

Can BDS_GOS_CONNECTIONS_GET FM be used to read the Attachments for Transaction FB03..? If Yes can any one help me with a sample code.. i tried it many times but could not get the results..

If This FM cannnot be used to read attachments from transaction FB03 then which is the right FM or CL to do so..

Thanks.

3 REPLIES 3

Former Member
0 Kudos

HI,

search the forum before posting the question.

Regards,

Kiran

former_member182040
Active Contributor
0 Kudos

Example:


form read_display_attachment.

  data:
    l_objkey            type swo_typeid,
    lo_gos_service      type ref to cl_gos_document_service,
    ls_srgbtbrel        type srgbtbrel,
    lt_srgbtbrel        type srgbtbrel occurs 10.

  select *  into corresponding fields of table lt_srgbtbrel
    from srgbtbrel
    where instid_a = p_objkey
    and   typeid_a = p_objtyp
 and   reltype  = 'ATTA'.

*" Exit if no attachments found
  if lines( lt_srgbtbrel ) is initial.
    exit.
  endif.

  sort lt_srgbtbrel by utctime. 
  read table lt_srgbtbrel into ls_srgbtbrel index 1.
  l_objkey = ls_srgbtbrel-instid_b. 

  create object lo_gos_service.
break developer.
call method lo_gos_service->DISPLAY_ATTACHMENT
      exporting
      ip_ATTACHMENT = l_objkey.
endform.                    "read_display_attachment

0 Kudos

Hi,

can you please give me the same code for Down loading Documents attached in a PO.

I have got a requirement to give the list and the documents