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

Similar Messages

  • 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.

  • 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

  • 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.

  • Error with quantity field:Datasource Creation Using Function Module method

    Problem with DATASOURCE Creation using Function Module method :
    I have created a datasource ZSTANDARD_COST_PRICE using Function Module method . The datasource creation is successfull when I remove the quantity field from the Z table . If I dont remove the quantity field from my Z table it gives an error as "Units Field WAERS for field STPRS of datasource ZSTANDARD_COST_PRICE is hidden". I am not able to remove this error . Please someone guide.
    Let me know if my explanation is not clear enough.
    Thanks in advance,
    Neha.
    Z table definition is as below :
    MATNR MATNR CHAR 18 0 Material Number
    BWKEY BWKEY CHAR 4 0 Valuation area
    LFGJA LFGJA NUMC 4 0 Fiscal Year of Current Period
    STPRS STPRS CURR 11 2 Standard Price   " Here the currency field is WAERS and table T001
    PEINH PEINH DEC 5 0 Price Unit
    VJSTP VJSTP CURR 11 2 Standard price in previous year
    VJPEI VJPEI DEC 5 0 Price unit of previous year.
    Edited by: Neha Rathi on Jan 30, 2009 3:03 PM

    Hi,
    You should add it as one of the main fields as you have added other fields and not as the currency fields...that is..it should be part of the data source and you should be able to see it in RSO2...
    Also if added as i said then it will come as new field in the data source...you can either let it be there...or hide it..
    also if you want to populate it then you will have to write the code for this fields as well.
    Thanks
    Ajeet

  • 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 to find the path of application server

    Hi can any one say me what is the function module to find the path of the application server

    Hi ,
    What i understand from ur question is that u need path for application server from the presentation layer i.e user screen.
    u can achive the path this way
    parameter: file type filename-fileintern.
    when user presses F4 here, it will show the directories and path in the AL11.
    I didnt find any FM which will get the path of Al11.
    revrt back if any issues,
    Regards,
    Naveen

  • I need to know thelist of bapi's and function modules used for transaction

    I need to know thelist of bapi's and function modules used for transaction in order to use these FM or BAPI in reading some fields of equipment master and functional loocation.Can any one suggest me some methods...or do i need to write  a report for the same.

    Steps to find the BAPI/function modules used in a transaction
    1) Find the package of the transaction thro' SE93.
    For example the package for the transaction VA03 is VA
    2) Go to Se80, key-in the package (say VA)
    3) You can see the function modules under the folder finction group and
    you can see the BAPI's under the folder Business Engineering-> Business Objects-> double click on the released methods of the Business Objects

  • To know thelist of bapi's and function modules used for transaction IH10

    I need to know thelist of bapi's and function modules used for transaction in order to use these FM or BAPI in reading some fields of equipment master and functional loocation.Can any one suggest me some methods...or do i need to write a report for the same.

    hi,
    provide report name (here: RIEQUI20)
    goto se38 - utilities - cross reference - function modules
    or use report RPR_ABAP_SOURCE_SCAN
    with search string call function
    A.
    Message was edited by:
            Andreas Mann

  • 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.

  • Bapi or method for opening and closing quantity of material

    Hi Friends,
    Is there any Bapi or Method for Opening and Closing Balence quantity of material
    plz tell me if any.
    Thanks And Regards.
    Devalla T Kr.

    Hi ,
    try this one.
    https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action&pageid=15856
    from this code u need to ignore Ztables.
    regards
    Prabhu

  • 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 (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

  • 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

Maybe you are looking for

  • Multiple account assignment (auto) - not split valuation

    Hi I have a requirement to make postings to two G/L accounts (automatically) via material group. Does anyone know if this is possible either using material group and val class or PO pricing conditions (without increasing the value of the PO)?? This i

  • Reading attachments

    I get emails from mutiple sources on PCs to my Yahoo program but I can't read the attachments on my new iMac. How do I do this?

  • SPDD & SPAU  and EhP4  before or after ?

    Hello all               We intend to go for upgrade from 4.6c to ECC6 with EHP4 ..We are planning to have SPDD & SPAU first then install EhP4 and then  again SPDD & SPAU. But my question is in order to save time can we skip the initial SPDD & SPAU an

  • I can not find the safe mode option

    Once again, my address bar had vanished. This time, the option is still checked to display it, and turning it off and on again does nothing. The help pages suggest going into Safe Mode to fix this, but the .exe is not in my Mozilla folder. I tried se

  • My ipod mini wont turn on at all no matter what i try

    I've tried toggling the hold button while holding down the menu and select buttons, and i've tried a few other things that i have been told to in the situation that my ipod wont turn on, but none of them will work. right now it's hooked up to the usb