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

BDS_BUSINESSDOCUMENT_CREATEF

Former Member
0 Likes
1,980

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

6 REPLIES 6
Read only

former_member194669
Active Contributor
0 Likes
1,423

Hi,

Try to use class "cl_bds_document_set" with method "create_with_files"

aRs

Read only

Former Member
0 Likes
1,423

thank you for your reply but i tried using this method and it still doesn't solve my 2 issues.

Neera.

Read only

Former Member
0 Likes
1,423

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.

Read only

former_member194669
Active Contributor
0 Likes
1,423

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

Read only

Former Member
0 Likes
1,423

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.

Read only

0 Likes
1,423

I am having the same problems is this one succesfully solved?

I also don't get the right title?

thanks in advance.