‎2007 Jun 20 5:02 AM
Hi,
I am using FM BDS_BUSINESSDOCUMENT_CREATEF to attach a document against a material. Although this FM works fine and attaches the document I am coming across two errors that I need resolved.
1. When displaying the attachment list the relevant icon is not appearing ie; if PDF, PDF icon should appear, if Word then Word icon should appear.
2. I can not delete the document from the list by clicking on the bin. When a document is attached manually the delete works fine but not when it is attached using this FM.
Anyones assistance in these issues would be greatly appreciated.
Regards,
Neera
‎2007 Jun 20 5:28 AM
Hi,
Try to use class "cl_bds_document_set" with method "create_with_files"
aRs
‎2007 Jun 20 5:50 AM
thank you for your reply but i tried using this method and it still doesn't solve my 2 issues.
Neera.
‎2007 Jun 20 5:58 AM
Hi again,
My apologies. This method you suggested did actually resolve one of my issues in displaying the PDF icon by setting the BDS_DOCUMENTTYPE to PDF in the signatures table. I am still not sure how to resolve the deleting of the document from the list issue. Is there a list of entries somewhere of what entries can be used in the signatures PROP_NAME field??
Neera.
‎2007 Jun 20 6:13 AM
Hi,
Check this code may this will help you
wa_signature-doc_count = '1'.
wa_files-doc_count = lwa_signature-doc_count.
wa_signature-comp_count = '1'.
wa_signature-doc_ver_no = '1'.
wa_signature-doc_var_id = '1'.
wa_signature-prop_name = 'FILE_NAME'.
wa_signature-prop_value = lv_file.
APPEND wa_signature TO lt_signature1.
wa_files-directory = lv_dir.
wa_files-filename = lv_file.
APPEND wa_files TO lt_files1.
CALL METHOD cl_bds_document_set=>create_with_files
EXPORTING
classname = p_clname
classtype = p_ctype
client = p_clnt
CHANGING
files = lt_files1
object_key = lv_objkey
signature = lt_signature1
EXCEPTIONS
internal_error = 1
error_kpro = 2
parameter_error = 3
not_allowed = 4
not_authorized = 5
nothing_found = 6
OTHERS = 7.
aRs
‎2007 Jun 20 7:21 AM
Hi,
The PROP_NAME = 'FILE_NAME' doesn't exist so it comes back with an error. I have managed to find the various values for PROP_NAME in table SDOKCLPROP. Is there any other way I can enable the deletion of the files from the list once they have been attached??
Neera.
‎2008 May 23 3:40 PM
I am having the same problems is this one succesfully solved?
I also don't get the right title?
thanks in advance.