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

Reading DMS content into internal table

Former Member
0 Likes
2,909

Hi,

I want to read the attachment contents of a sales order (usually an XML document) into an internal table and then attach it to an email. These documents are usually stored in an external server, which is marked as ARCHLINK (Storage Type HTTP content server) in OAC0 transaction.

I am using the function module BDS_ALL_CONNECTIONS_GET to get all the attachments linked to a sales order and can use the FM ARCHIVOBJECT_DISPLAY to display the document in a separate windows but I do not know how to read this XML document contents into an internal table and attach it with an email.

I have seen some articles on how to read the contents from DMS using BDS function modules but do not any articles in the case of a HTTP content server.

Could anyone please guide me if they have handled a similar scenario before.

1 ACCEPTED SOLUTION
Read only

former_member209703
Active Contributor
0 Likes
1,591

Hi

If the file is stored in a Content Server you can get it in an internal table using the FM ALINK_RFC_TABLE_GET

You just have to specify the Document ID and the Content Repository ID you just retrieved after using BDS_ALL_CONNECTIONS_GET .

Regards

Hi,

I want to read the attachment contents of a sales order (usually an XML document) into an internal table and then attach it to an email. These documents are usually stored in an external server, which is marked as ARCHLINK (Storage Type HTTP content server) in OAC0 transaction.

I am using the function module BDS_ALL_CONNECTIONS_GET to get all the attachments linked to a sales order and can use the FM ARCHIVOBJECT_DISPLAY to display the document in a separate windows but I do not know how to read this XML document contents into an internal table and attach it with an email.

I have seen some articles on how to read the contents from DMS using BDS function modules but do not any articles in the case of a HTTP content server.

Could anyone please guide me if they have handled a similar scenario before.

3 REPLIES 3
Read only

former_member209703
Active Contributor
0 Likes
1,592

Hi

If the file is stored in a Content Server you can get it in an internal table using the FM ALINK_RFC_TABLE_GET

You just have to specify the Document ID and the Content Repository ID you just retrieved after using BDS_ALL_CONNECTIONS_GET .

Regards

Read only

0 Likes
1,591

Hi,

Thanks for the answer. Pardon me for this naive question, I see the output in the resultant table but this data is in raw data format, how can I convert it to the original format and attach it to an email.

Read only

0 Likes
1,591

Hi,

I found that the FM SCMS_HTTP_DOC_GET_RAW can give the raw data and the FM SCMS_HTTP_DOC_GET_FILES can be used to download the attachment directly to the desktop or the application server directory (but it does not have its default extension when we use this FM nor can we can specify the name of the file when use SCMS_HTTP_DOC_GET_FILES)