cancel
Showing results for 
Search instead for 
Did you mean: 

Delete attachments from GOS

Former Member
0 Kudos

Dear All,

Can help me on below questons:

i have a requirment is to add pdf attachment files in the GOS (service of object).after one week or 10 days ,need to delete PDF attached files from GOS through custom program in the back ground based on selection criteria(date & time and user name).

can you help What is max pdf can attach in the GOS?

i have a requirment is to add pdf's attachments using application server files(using AL11) not localdesktop.how to read the files from application server and attach in the GOS?

Thanks & regards,

K.Rana

Accepted Solutions (1)

Accepted Solutions (1)

pavan_rachamalla
Explorer
0 Kudos

Hi,

I am not sure what is the exat requirement.

However here is the way to upload file from application server

ws_file-storagecategory = 'DMS_C1_ST'.

ws_file-wsapplication = 'PDF'.

ws_file-originaltype = '1'.

ws_file-docfile = v_file.

CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'

EXPORTING

documentdata = ws_docdata

pf_ftp_dest = 'SAPFTPA'

pf_http_dest = 'SAPHTTPA'

IMPORTING

documentnumber = v_docnum

documentpart = v_docpart

documentversion = v_docver

return = v_ret

TABLES

objectlinks = it_links

documentfiles = it_files.

This will create a new document in DMS with files from application server.

About deletion, I am assuming you want to delete only attachments for the document,

call function module BAPI_DOCUMENT_CHANGE2 with files passing deletion indicator as 'X'.

If you want to delete the document itself, use BAPI_DOCUMENT_DELETE.

Thanks

Pavan

Answers (0)