Function module to check if a given file/folder path is valid or not?

Hi,
I am using function modules GUI_DOWNLOAD and GUI_UPLOAD.
Is there any function module to check if a given file/folder path is valid or not?
Thanks.

Hi Kumar ,
REPORT  zdir_test.
TYPE-POOLS: abap.
DATA: v_dir TYPE string.
DATA: v_bol TYPE abap_bool.
v_dir = 'c:\sap\'.
CALL METHOD cl_gui_frontend_services=>directory_exist
  EXPORTING
    directory            = v_dir
  RECEIVING
    result               = v_bol
  EXCEPTIONS
    cntl_error           = 1
    error_no_gui         = 2
    wrong_parameter      = 3
    not_supported_by_gui = 4
    OTHERS               = 5.IF NOT v_bol IS INITIAL.
  WRITE:/ 'Directory exists.'.
ELSE.
  WRITE:/ 'Directory does not exist.'.
ENDIF.
Regards,
Sachin M M

Similar Messages

  • Webutil - to check the file/folder path is valid in client pc

    I'm using oracle 10g forms. OS is Windows.
    When i try to write a file from DB to Client in order to open the file in client system,
    i 'm using CLIENT_HOST('CMD /C '||<filename>); => which saves the file in desktop.
    In order to specify a different location, i assigned a local variable and concatenating it with the file name. But my requirement is, before i specify a different path, i want to know whether the path is valid or not?
    Say for example:
    var_temp_folder := 'C:\DB_File\';
    var_success :=
    webutil_file_transfer.DB_To_Client_with_progress(
    clientFile => <filename>
    ,tableName => <tablename>
    ,columnName => <columnname>
    ,whereClause => <where_clause_condition>
         ,progressTitle => 'Download from Database in progress'
         ,progressSubTitle=> 'Please wait');
    CLIENT_HOST('CMD /C '||var_temp_folder||<filename>);
    -- On the above, var_temp_folder is the local variable i specified, i 'm opening the file from DB to Client PC.
    But before that i want to check whether this path in var_temp_folder variable is available in client pc (Note: Client PC runs on windows).
    For that, can i use the CLIENT_HOST or any other function/procedure in WEBUTIL available for the same?
    Any immediate help would be appreciated..
    Regards
    Muthu

    Yea... i found the solution...
    webutil_file.file_is_directory(<folder_path>) will help to check the whether the path is valid or not in client pc.
    if not webutil_file.file_is_directory(<folder_path>) then
    user_message('Path does not exist');
    raise form_trigger_failure;
    end if;
    Any other suggestions also be appreciated..
    Thanks
    Muthu

  • Function module to check if a file is already open

    Hi All,
    Could any one of you tell me a function module which checks whether a given file on the application server is currently being open or not.
    Regards
    Amit Mishra

    Amit,
    Try GET DATASET.
    Basic form
    GET DATASET dsn.
    Extras:
    1. ... POSITION pos
    2. ... ATTRIBUTES attr
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. For details, see File Interface.
    Effect
    Used to get the properties of a file already open.
    You can use this statement without additions to determine whether the file is open.
    If the file is not open, an exception of the type CX_SY_FILE_OPEN_MODE is triggered.
    Regards,
    Rao A
    Message was edited by: Rao Arimilli

  • Function module to check source system

    Hello
    Can some one help me by providing the name of the function module to check the Source system connection?
    I know that in the source system we can right click and check.
    But i want to know the function module to check the status.
    Thanks in advance
    Kind regards
    M.A
    Edited by: M.A on Aug 19, 2008 12:42 PM

    Hi shasank,
    Thanks for the info.
    I had given the tech name of the source system as an input to the function module.
    But it raises an exception that destination does not exists.
    But the source system connection is ok.
    Regards
    M.A

  • Function module to check whether Goods Receipt of a Purchase Order is done.

    Hi,
    Is there any function module to check whether Goods Receipt of a Purchase Order is already done?
    Taking into consideration reversals.
    Thanks.

    Hi,
    I think u can do this by using a simple select query.
    u have to go in EKBE table.
    put the PO no. in field EBELN + EBELP(line item)  and get the material docuement no.  in field BELNR + BUZEI(line item).
    Thanks
    Jitendra

  • Function Module tto check special characters in a field

    Hi All,
    I have a requriemnt where i need to make sure there are no special characters allowed
    in a paremeter ( is there any functional module to check it)
    r anyway to work with
    Thank in advance for u replies.
    Regards,
    Riyaz.

    DATA: vergleich_string(100) VALUE
              'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.
      CONCATENATE vergleich_string ' 1234567890,./!@#$%&*-_+=~|\[{]}()"'
                                                   INTO vergleich_string.
    use condition.
    if var ca vergleich_string.
    raise error message.
    endif.

  • Function module for checking existance of rfc destination?

    hi all,
       is their any function module for checking existance of rfc destination?
    regards
    deepak

    Hi,
    check teh table 'RFCDES'.
    reward if helpful.
    Regards,
    nagaraj

  • Standard function module for checking the sales organization and plant

    Hi all,
        Does have standard function module for checking the relationship between sales organization and plant?
    Thanks a lot!
    Nina

    hi
    good
    check these BAPIS
    BAPI_SALESGROUP_GET_DETAIL     Sales Group: Display Name                                                
    BAPI_SALESOFFICE_GET_DETAIL    Sales Office: Display Name                                               
    BAPI_SALESOFFICE_GRP_EXIST     Sales Office / Sales Group: Existence Check                              
    BAPI_SALESORG_EXIST            Sales Organization: Existence Check                                      
    BAPI_SALESORG_GET_DETAIL       Sales Organization: Display Data                                         
    BAPI_SALESORG_OFFICE_EXIST     Sales Organization / Sales Office: Existence Check                       
    PLANT=>
    BAPI_PROMO_GETSITEPLANNING     Detailed Data for the Plants Involved in a Promotion   
    thanks
    mrutyun^

  • Can not Update icloud for win7 Sheep error during transformation. check that the indicated transmitter propagating path is valid. tryet in appel updater and tryet downloading from apple but the same

    Can not Update icloud for win7 Gets
    Sheep error during transformation. check that the indicated transmitter propagating path is valid.
    tryet in appel updater and tryet downloading from apple but the same

    Hi,
    Found a note explaining the significance of these errors.
    It says:
    "NZE-28862: SSL connection failed
    Cause: This error occurred because the peer closed the connection.
    Action: Enable Oracle Net tracing on both sides and examine the trace output. Contact Oracle Customer support with the trace output."
    For further details you may refer the Note: 244527.1 - Explanation of "SSL call to NZ function nzos_Handshake failed" error codes
    Thanks & Regards,
    Sindhiya V.

  • Function module to get PPM for given product and/or location

    Hi,
    I want to check whether any PPM is existing for given product, location.which function module i can use for the same.

    There is a BAPI that might help - BAPI_PPMSRVAPS_GETLIST which has product and location selection criteria.
    Regards
    Laurence

  • Function module to find users for given authorization object

    Hi Experts,
    I have to develop new report which display all the users who has authorization object  which is given by us. i need some function modules to make my program simple.
    Please help me on this..
    Thanks and regards,
    Raja

    Hi
    check the fun modules
    SUSR_BAPI_USER_PROFS_GET
    or check the tables
    AGR_USERS
    AGR_1252
    UST12
    AGR_PROF
    AGR_TCODES
    check the transactions PFCG and SSUIm and SU53 etc
    Regards
    Anji

  • Function module to download data into excel file

    Hi Friends,
    Please tell me the function module name which popsup a popup box to specify a filename and the location and when clicking on the OK button, the file should be downloaded to the specified location.
    I need it ASAP.
    Thanks,
    Jaffer Ali.S

    Hi Shamshudeen,
    You have to use two funtion modules to acheive this.
    1. To get the file path from user.
    2. To download the excel sheet in prescribed path.
    For 1 use following code
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath .
        CALL FUNCTION 'F4_FILENAME'
         EXPORTING
           program_name        = syst-cprog
           dynpro_number       = syst-dynnr
      FIELD_NAME          = ' '
         IMPORTING
           file_name           = p_fpath  .
    The file path will be stored in p_fpath.
    Now use GUI_DOWNLOAD function module and pass the file name p_fpath to it along with filetype as .xls
    Hope this helps you.
    Thanks,
    Arun

  • Function Module to check posting date

    Hi,
    Is there any function module avilable to check whether the posting date is open or not.
    Regards
    Suresh.

    check G_POSTING_DATE_OF_PERIOD_GET
    Reward points if useful, get back in case of query...
    Cheers!!!

  • I generated web service from function module.Where can I find .wsdl file ?

    Hi,
    I generated web service from function module.
    Where can I find .wsdl file ?
    I want to use .wsdl file in .Net application.
    Thanks.

    Hii Cemil Bozlagan,
      All Remote enabled Function Modules in Web AS 6.20 and Above are available as Webservices and the WSDL documents are available in the web service repository at
    [http://<host>:<port>/sap/bc/bsp/sap/webservicebrowser/search.html]
    Find the respective BAPI.
    Click on the WSDL link in the browser and download the WSDL document and use it as per the requirement
    Regards,
    Varun

  • Functional module to check a remove system is up

    Hi all,
    Could anyone of you tell me whether any function module exists using which whether we can know a remote system
    is pinging(up) or not?
    Thanks in advance.
    Thanks and Regards, Pradeep

    Try this:
    SALK_SYS_AVAILABILITY_RFC_PING
    Also try:
    RFC_PING_AND_WAIT
    RFC_PING (Specify the destination that you want to ping in the RFC Call)
    RFCPING (Specify the destination that you want to ping in the RFC call)
    Regards,
    Ravi kanth

Maybe you are looking for

  • Is there a way to specify a number of vlookup results?

    I'm trying to make a kind of loose pivot-table-like date record lookup. Probably best if I show something analogous to what I'm wanting: Table1 Date BookRead 1/1/13 Les Miserables 1/2/13 The Hunchback of Notre Dame 1/3/13 Les Miserables 1/4/13 The Ph

  • Safari will not open Quick Time Video

    Safari can't seem to recognize many QT Videos. I have to open them in Netscape browser to view them. Any cure for this problem? PowerBook G4 17-inch   Mac OS X (10.3.9)  

  • File Permissions in Solaris 10

    Hi, I have a problem with permissions on a shell script file. Although the file permissions are "-rwxrwxr-x" anyone else in the group, apart from file owner can't execute this file. Regards,

  • Pixma Pro-100 Printer

    Can any one please advise if they have had difficulty getting colour cast free B&W prints from the Pro-100 when printing an image file that has been converted to B&W using Photoshop CS5 even when using Canon paper (Paper Plus Glossy II) and the corre

  • Pending for billing.

    Hi, Is there similiar screen to let user to view what is pending for billing but not allow then to run the billing job as VF04. How this requirement can be meet? Please guide. Regards