Function module CVAPI_DOC_VIEW for opening document by webdynpro applicatio

Hello all,
i have a requierement to open the document when user click in filename i am using this function module but it is giving me error
'Screen output without connection to user.'
CALL FUNCTION 'CVAPI_DOC_VIEW'
      EXPORTING
        pf_dokar               = ls_final-dokar
        pf_doknr               = ls_final-doknr
        pf_dokvr               = ls_final-dokvr
        pf_doktl               = ls_final-doktl
     PF_HOSTNAME            = '10.141.104.40'
     pf_appl_start          = 'X'
     PF_GET_URL             = 'X'
     pf_apptp               = '1'
    PF_ASK_FILENAME        = ' '
     pf_filename            = lv_filep
    PS_FILE                =
    PF_PARENT              =
     PF_USE_DYNP            = 'X'
    PS_DRAP_AUDIT          =
  IMPORTING
    PFX_FILE               =
    PFX_URL                =
    PFX_VIEW_INPLACE       =
   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.

Hi Shilpi,
I had the same error.  I got round them by pulling parts of the FM out as below
    call function 'CV120_DOC_GET_APPLICATION'
      exporting
        pf_dokar  = ls_drad-dokar
        pf_doknr  = ls_drad-doknr
        pf_dokvr  = ls_drad-dokvr
        pf_doktl  = ls_drad-doktl
      importing
        psx_file  = lv_file
      exceptions
        not_found = 1
        no_auth   = 2
        error     = 3
        others    = 4.
    concatenate 'file://' lv_file-filename into lv_url.
    lv_url2 = lv_url.
    call method lo_window_manager->create_external_window
      exporting
        url            = lv_url2
        modal          = abap_false
        has_menubar    = abap_true
        is_resizable   = abap_true
        has_scrollbars = abap_true
        has_statusbar  = abap_true
        has_toolbar    = abap_true
        has_location   = abap_true
      receiving
        window         = lo_window.
    lo_window->open( ).
Regards
Bruce

Similar Messages

  • Function Module require for Accounting Document

    Hi All,
    Is there any Function Module available for getting Accounting document no which is created after IR.
    Regards,
    Paras

    Hi,
    You can use BAPI_ACC_DOCUMENT_POST.
    Regards,
    Eli

  • Function Module/BAPI for updating Document Status.

    Hi Experts,
    Is there any Function Module/BAPI available for updating the document status ?
    Thank You,
    Radhika.

    unresolved!

  • Function Module/BAPI For Material Document

    Dear All,
    I am looking for a function Module/BAPI to get details relevant for a Material Document.
    I can get those details using table MSEG & MKPF, but still looking for a Function Module.
    Kindly help.

    Hi
    Try with these BAPI's
    BAPI_GOODSMVT_GETITEMS
    BAPI_GOODSMVT_GETDETAIL
    Regards
    Brahmaji

  • Function Module/Method for opening path on frontend

    Hi,
    I am looking for an function module or a method of a class which can be used for opening (in windows) an explorer-window with a given path.
    I don't wanna select any files of directories there, only opening the windows and processing the normal logic of the application.
    Can you give me any hints how to do that?
    Kind regards
    Markus

    Sample Code:
    data : file_table like table of SDOKPATH with header line .
    data : dir_table like table of SDOKPATH with header line .
    data : file_count type i ,
           dircount   type i .
    parameters:p_dir(50) type c.
    CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
    EXPORTING
    DIRECTORY = p_dir
    FILTER = '*.TXT'
    IMPORTING
    FILE_COUNT = file_count
    DIR_COUNT =  dircount
    TABLES
    FILE_TABLE = file_table
    DIR_TABLE = dir_table
    EXCEPTIONS
    CNTL_ERROR = 1
    OTHERS = 2.
    write:/ 'no of files in the floder is : ', file_count .
    skip 32.
    loop at file_table .
    write:/ file_table-PATHNAME.
    endloop.
    cheers
    s.janagar

  • Replacement function modules/method for obsolete Funtion Modules in ECC 6.0

    We are working on Upgrade Project and need your help in finding the replacement Function module/ Methods for following obsolete Function Modules:
       1.   GET_FIELDTAB
       2.   WS_EXCEL
       3.  HR_DISPLAY_BASIC_LIST
       4.  LOG_SYSTEM_GET_RFC_DESTINATION
       5.  HELPSCREEN_NA_CREATE
       6. TR_RELEASE_COMM
    Thank in Advance.
    Sarita.
    Edited by: Sarita Yalamati on Mar 28, 2008 1:23 PM

    Hi sarita,
    for GET_FIELDTAB use 'DDIF_NAMETAB_GET'..here is sample code
      CALL FUNCTION 'GET_FIELDTAB'
           EXPORTING
                LANGU               = SY-LANGU
                TABNAME             = C_STRUCTURE_NAME
                WITHTEXT            = ' '
           TABLES
                FIELDTAB            = IDFIES
           EXCEPTIONS
               INTERNAL_ERROR      = 01
                NO_TEXTS_FOUND      = 02
                TABLE_HAS_NO_FIELDS = 03
                TABLE_NOT_ACTIV     = 04.
    Replacement :
    CALL FUNCTION 'DDIF_NAMETAB_GET'
      EXPORTING
        TABNAME           =  C_STRUCTURE_NAME
      ALL_TYPES         = ' '
      LFIELDNAME        = ' '
      GROUP_NAMES       = ' '
      UCLEN             =
    IMPORTING
      X030L_WA          =
      DTELINFO_WA       =
      TTYPINFO_WA       =
      DDOBJTYPE         =
      DFIES_WA          =
      LINES_DESCR       =
    TABLES
      X031L_TAB         =
       DFIES_TAB         = IDFIES
    EXCEPTIONS
       NOT_FOUND         = 1
       OTHERS            = 2
    For WS_EXCEL  use GUI_DOWNLOAD.. here is sample code
    CALL FUNCTION 'WS_EXCEL'
    EXPORTING
       FILENAME            = 'D:\FILE1.xls'
      SYNCHRON            = ' '
      TABLES
        DATA                = itab
    EXCEPTIONS
       UNKNOWN_ERROR       = 1
       OTHERS              = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Repalcement :
    data : l_filename type string.
    l_filename  = 'D:\FILE1.xls'.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = l_filename
      FILETYPE                        = 'ASC'
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab
      FIELDNAMES                      =
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
      EXPORTING
        DOCUMENT               = 'D:\FILE1.xls'
       APPLICATION            =
       PARAMETER              =
       DEFAULT_DIRECTORY      =
       MAXIMIZED              =
       MINIMIZED              =
       SYNCHRONOUS            =
        OPERATION              = 'OPEN'
      EXCEPTIONS
        CNTL_ERROR             = 1
        ERROR_NO_GUI           = 2
        BAD_PARAMETER          = 3
        FILE_NOT_FOUND         = 4
        PATH_NOT_FOUND         = 5
        FILE_EXTENSION_UNKNOWN = 6
        ERROR_EXECUTE_FAILED   = 7
        SYNCHRONOUS_FAILED     = 8
        NOT_SUPPORTED_BY_GUI   = 9
        others                 = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Is there standard function module to read "open office" in SAP

    Hi All,
    Is there any standard function module to read open office document from SAP.
    Please confirm.
    Thanks and best regards
    Rajeev Chhabra

    Hi all!
    I have a similar problem. I need  create a formatted spread sheet managed open office. The work sheet must be formatted.
    I do not find the function module for doing this.
    Do yo have any idea? The only thing I have found is the functionallity included in program BCALV_TEST_GRID.
    Also I will need a function to upload the file to fill a table control.
    Thanks in advance.
    Cristina.

  • Is there any function module which gives open invoices &open amount?

    Hello All,
    I want to use function module which gives open invoices with open amount.
    I know 'CUSTOMER_OPEN_ITEMS'  'BAPI_AR_ACC_GETOPENITEMS' function which gives open invoices but does not give open amount.
    Can anyone help me to find such function?

    From this BAPI ,
    BAPI_AR_ACC_GETOPENITEMS, You got amount for items in lc_amount field of lineitems table parameter.
    I hope, it will helpful to you.
    by
    Prasad GVK.

  • Function Module to calculate Open Contract Quantity

    Hi All,
    Is there a function module to calculate Open Contract Quantity?
    Thanks.

    Hi Ravi,
    Thanks for the reply.
    For this FM, i need to pass the Sales Doc Number. Is there an FM where i can pass the contract number?
    Best regards,
    Sindy

  • Function Module (BAPI) for Delivery Change

    Dear All,
    We have a Function Module "BAPI_SALESORDER_CHANGE" for changes in sales order, wherein we also can enter Texts in sales order.
    Please tell me similar such function module for Outbound Delivery, wherein I can enter / insert / change the Texts (both Header & Item) in a deivery document.
    Regards,
    Dhananjay

    Thanks
    Where in this Function Module do I find the table / parameter for adding text at item & header level.
    Regards
    Dhananjay

  • How do I change the default settings for opening documents on my macbook?

    Hi I would like to know how to change the default settings for opening documents on my macbook. Everytime I try to open a doc. it automatically opens with Textedit, instead of Pages or another program.

    Select any particular document you wish to fix. Press COMMAND-I to open the Get Info window. In the Open With section select the desired Default Application from the dropdown menu. Click on the Change All button to extend the change to all similar documents.
    You can only assign one default application to one type of document.

  • Function module exits for Tcode MD11.

    Please tell me, Function module exits for Tcode MD11.
    Reg .
    Praju

    Hi
    LMDR2001
    LMDZU001
    Try out these exits.
    Check the folloing BADI's
    MD_PLDORD_SCHEDULING
    MD_PIR_FLEX_CONS
    MD_PLDORD_SCHEDULING
    Regards
    Divya

  • Function module name for routing fom production orders

    Function module name for routing fom production orders

    Hi
    There are lot of fun modules related to routing
    like
    BAPI_ROUTING_CREATE
    BAPI_ROUTING_EXISTENCE_CHECK
    goto SE37 Tcode
    enter routing press F4
    you will get a lot out of that use the required one
    Reward points for useful Answers
    Regards
    Anji

  • Function module need for 0fiscvarnt

    Hi i have 0comp_code,budat and 0fiscper as a source fields,now i want to get 0fiscvarnt...please give me any logic or function module available for that
    thanks

    Hi,
    Usually fiscal year variant is constant if not getting populated from source system.
    Check with function team member what Fiscal year variant they using.
    Regards,
    Akshay

  • Function module used for ENQUEUE_EIQMEL & DEQUEUE_EIQMEL function

    Hi All,
    It should be highly appreciable if any one could please help.
    I need the name of the function module used for ENQUEUE_EIQMEL & DEQUEUE_EIQMEL function.
    waiting for help.
    Thanks
    Shaw

    Hi,
    The names 'ENQUEUE_EIQMEL' and 'DEQUEUE_EIQMEL ' you have mentioned are itself the function modules. Which other FM's you need i didnt understand.
    These are FM to ahndle lock objects 'QMEL'.
    please reframe your question in case of further issues.
    Regards,
    Mansi.

Maybe you are looking for