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: 

How to download attachments in a purchase order

Former Member
0 Kudos

hi,

We need to download attached documents of Purchase orders, Work centers, Material docs , Equipment into Presentation server folders. Can you provide some existing programs or leads on how to do it.

Regards,

Sat

3 REPLIES 3

former_member241258
Active Participant
0 Kudos

hi

u need report automatically download or user interaction downloading.

reafer below

tables: SGOSSTXT

SRGBTBREL

Table : SRGBTBREL
Fields : Values
RELTYPE : ATTA
INSTID_A : 5000000157 (PO)
TYPEID_A : BUS2012
CATID_A : BO

Functional Module: GOS_EXECUTE_SERVICE

reference package: SGOS

raymond_giuseppi
Active Contributor
0 Kudos

To get list of attached documents use a class like cl_binary_relation=>read_links* then loop at links and read their content with a function module like so_document_read_api1. Then download those data to presentation server with methods of class cl_gui_frontend_services.

0 Kudos

Hi,

maybe you can help me with my situation.

I need to download material documents linked to tables DRAD/DRAW.

First I get entries from DRAD table where OBJKY = material_number.

Then I loop at DRAD entries and get entry from DRAW table where DOKAR, DOKNR, DOKVR and DOKTL are the same.

When should I call this cl_binary_relation=>read_links?

What should I pass as an argument inside IS_OBJECT?

Also, so_document_read_api1 accepts document ID, is it even returned by cl_binary_relation=>read_links?

Thanks in advance and kind regards.