FM 'DOCUMENT_SHOW_DIRECT'

Hi,
as in transaction 'CV04N', I have in my report programmed functionality to open an arhcived document directly from the selected alv row.
This is done by calling FM DOCUMENT_SHOW_DIRECT' and works almost as i want it.
Apart from when a file is opened, it already has concatenated SY-UNAME + a number from 1-20 assigned to the opened file. So this name is displayed in the topframe of the opened document.
Anyone know if its possible to just retrieve the actual filename, instead of the FM generating this temporary name?
I also tried the FM CVAPI_DOC_VIEW.
Regards
Jakob

Hi,
you can use the FM CVAPI_DOC_VIEW with the following parameters
CALL FUNCTION 'CVAPI_DOC_VIEW'              
              EXPORTING                                   
                pf_dokar      = ls_draw-dokar        
                pf_doknr      = ls_draw-doknr        
                pf_dokvr      = ls_draw-dokvr        
                pf_doktl      = ls_draw-doktl        
                pf_filename   = lv_url      "this is the path and filename you want
                                            "to save the document
                pf_appl_start = space                      
              EXCEPTIONS                                   
                error         = 1                          
                not_found     = 2                          
                no_auth       = 3                          
                no_original   = 4                          
                OTHERS        = 5.                        
            IF sy-subrc <> 0.                            
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ENDIF.
Kostas

Similar Messages

  • DMS - Print of PDF through  'DOCUMENT_SHOW_DIRECT'

    Hi
    After upgrading our Adobe Acrobat from version 5 to 7, we can't any longer print our attached PDF-documents.
    We have created a program, based upon PSFC_DOCLINK_DIST, where we print various types of documents, Word, Excel, PDF and so on.
    The print-process is started when a production-order is printed.
    When using Adobe Acrobat 5 this also worked for PDF-documents.
    Does anyone have any clue of what’s wrong?
    Regards
    Torben

    Hi Torben,
    can you give some informations how to print PDF documents via "'DOCUMENT_SHOW_DIRECT".
    Thank you.
    Regards Gunter

  • Remote function copy of DOCUMENT_SHOW_DIRECT

    Hi!
    I've made a WebDynpro-application in WAS, that uses the function "ZDOCUMENT_SHOW_DIRECT", that is a remote function copy of DOCUMENT_SHOW_DIRECT, to view a pdf-file from R/3.
    If I execute the WebDynpro and I put a breakpoint before 'CALL FUNCTION' and then I execute, the document is shown, but if there isn’t a breakpoint, the pdf document
    doesn´t opens. What’s happening? And how it can work?
    Thanks in advance.
    Ana.

    Hi,
    do you have any commit work statement higher in the coding of an rfc that creates
    the pdf? or on a table where you need the pdf key from?
    or maybe your RFC connection is not free, check if it's possible to do the connection
    before you actually call the RFC
    grtz,
    Koen

  • How to open files from the SAP DMS (DOC Mgt. System) ?

    Hello All,
            I making the Transaction CV04N in BSP.
    When I execute this CV04N I should give a DOC Nr and the list is generated for this DOC.Now in the List if I select one Record and then Press Display Icon then the content of this list is opened in a new window in it's respective format (PDF,Word,GIF,Image file  etc).These are stored in the SAP DMS.
            I want to open a file from this SAP DMS .
    This can be done in ABAP using the standard FMs. But in BSP we can't use these FMs as it will call a screen.
    The Fm which I'm using is " DOCUMENT_SHOW_DIRECT ".
    In Report prog. To this FM I'll pass the
    a, DOC Type
    b, DOC Number
    c, Document part and
    d, Document version.
    then It'll directly open a PDF file in a new window.
    But in BSP how should I acheive this as the FM calls a screen internally.
    The content of the documents are stored in the DMS. Is there any TCODE or Table to get the files from the DMS ?
    How should I proceed ? can any one help me out.....
    Regards,
    Deepu.K

    Hello All,
             I found the FM : <b>CVAPI_DOC_OPEN_CAD</b> which wil return the file path.
    But when I execute this in my BSP since the FM internally calls a screen it fails.
    But can anyone tell me the alternative for this.
    Should I create a FM omitting the GUI code ?
    I found one more thread which says that I can use classes starting with cl_gos*.
    But all the classes use a gui.
    Dowload a document from R/3 DMS to BSP page
    Am I wrong in the interpretation of the logic from the above thread ?
    Please suggest me .
    I too went thru the BSP Applications <b>CVAW_ENTIRE, CVAW_DOCUMENT_DISPLAY.</b>
    But these are used to display only the <b>thumbnails.</b>
    There is no code for displaying other formats like PDF,XLS etc.
    Please correct me if I'm wrong and let me know the correct path to solve my problem.
    Regards,
    Deepu.K

  • Want to open specific file from DMS Doc. thorugh Function

    HI,
    is there any function module to open specific file from DMS Document. ?
    There is already one function module DOCUMENT_SHOW_DIRECT to open File from document. But
    in case of there are more than one file in DMS Document is it giving me Popup menu to open file from List.
    I just want to open any single file without any popup from DMS Document.

    Hi,
    from standard point of view this kind of pop-up is always raised by the function module in case there are multiple originals assigned to the document info record.
    Best regards,
    Christoph

  • Got data from the TBL1024 table,but can;t able to open PDF

    Hi all,
    I currently working on a program where I am reading an archived document(PDF file)
    using the FM ARCHIVOBJECT_GET_TABLE.This FN returns the document in form of a table of type TBL1024.
    For my application(Servlet class),I am reading x bytes of the binary representation of the document.Since the document is inside a table as binary format.
    When i download the PDF file it will not open but it will error window "the current file is either not supported or becasue
    the file has been damaged".
    Is that I am missing some thing...

    I think your issue will be length conversion needed to be done before downloading .
    For display a archieve document you can use fm DOCUMENT_SHOW_DIRECT
    a®s

Maybe you are looking for