FM to check whether directory exist on both PC and AS??

hi all,
I want to check the directory name given by user. basically its an option, it cud be either for Application server or PC. I want to knw if any FMs exist for the same.
One i knw is CL_GUI_FRONTEND_SERVICE but i dont knw the implementation.
Also wud it be different FMs for application server and PC?
thanks and regards,
Gaurav

Hi,
      <b>Pick up the file path from the presentation server</b>
FORM f1000_browse_presentation_file .
  CONSTANTS: lcl_path TYPE char20 VALUE 'C:\'.
  CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
      def_path         = lcl_path
      mask             = c_mask  "',.,..'
      mode             = c_mode
      title            = text-003
    IMPORTING
      filename         = p_f1
    EXCEPTIONS
      inv_winsys       = 1
      no_batch         = 2
      selection_cancel = 3
      selection_error  = 4
      OTHERS           = 5.
  IF sy-subrc <> 0.
  File does not exist
    flg_pre = c_x.
  ENDIF.
ENDFORM.                    " f1000_browse_presentation_file
*&      Form  f1001_browse_appl_file
      Pick up the file path from the application server
FORM f1001_browse_appl_file .
  DATA:  lcl_directory  TYPE char128.
  lcl_directory  = p_direct.
  CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
    EXPORTING
      directory        = lcl_directory
      filemask         = c_mask
    IMPORTING
      serverfile       = p_f2
    EXCEPTIONS
      canceled_by_user = 1
      OTHERS           = 2.
  IF sy-subrc <> 0.
   MESSAGE e000(zmm) WITH File does not exist
   flg_app = 'X'.
  ENDIF.
ENDFORM.                    " f1001_browse_appl_file
Reward points if this Helps.
Manish

Similar Messages

  • How to check any directory existance in TestStand?

    How to check any directory existance in TestStand?
    Is there TestStand function? Or other option without writing my own code in external program (e.g. LabVIEW or C)?
    Thanks in advance
    Solved!
    Go to Solution.

    At Least according to the NI TestStand 2012 documentation, Engine.FindPath and Engine.FindFile work only within the NI TestStand SearchDirectories.
    Maybe related: remote paths (\\server\path\to\file.ext) are considered "invalid" by Engine.FindPath.

  • I cannot get my bookmarks and reading lists to sync over my devices.  I've checked the iCloud settings on both devices and still nothing.  Using a retina iPad and a new mac book pro

    I cannot get my bookmarks and reading lists to sync over my devices.  I've checked the iCloud settings on both devices and still nothing.  Using a retina iPad and a new mac book pro

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")
    In order to change your Apple ID or password for your iTunes account on your iOS device, you need to sign out from your iOS device first, then sign back in using your updated details. (Settings > store, scroll down and tap your ID)

  • Check whether element exists in hierarchy

    Hi together,
    I've got a profit center hierarchy in BW and I need to develop a function module to check, whether a profit center exists under a certain hierarchy node.
    Does anyone has an approach how to do that?
    Kind regards
    Stefan

    HI Stefan,
    You can do it in 2 ways:-
    <b>1)</b> Use the Function Module <b>'G_SET_TREE_IMPORT'</b>
    <b>  CALL FUNCTION 'G_SET_TREE_IMPORT'
        EXPORTING
          no_descriptions = ' '
          no_rw_info      = 'X'
          setid           = p_setid
        TABLES
          set_hierarchy   = lt_hier
          set_values      = lt_val.</b>
    here, in lt_hier table you will get all the Nodes and in lt_val talbe you will get all the values under that nodes, so loop the lt_val Internal talbe and see whether the value is existed or not.
    <b>2)</b> you can use SETNODE and SETLEAF tables to get the value and the Hierarchy Node.
    i will show the way how to do this
    By using the Fm you will get all the nodes and the values, so loop that internal tales and get waht you want and if you want to check a profit center then use the table SETLEAF, you will get the child node, then use the SETNODE to get the next node for that node. do like this up to get the parent node.
    Hope you understand my point
    Regards
    Sudheer

  • Is there any function to check whether table exist in the dictionary

    In the program, i want to dynamicly check whether the table exists in the dictionary, and return the result to me.

    hi
    good
    i dont think there is any such function to check the presence of the table.
    bcz you can check it directly in se11 rather than using any function.
    thanks
    mrutyun^

  • How to check whether file exist or not?

    hello,
    i wanted to know that how can i check whether a file exist or not independent of underlying Operating system?
    please help .
    Thank you.

    Use exists() on a File instance.

  • Checking whether data exists in a BLOB type database column in Forms 6i

    I am developing an application regarding inventory of a plant's spare parts. I am storing photo (.bmp) of spares in the database in a column of BLOB type. Once user punches spare's code, form displays spares data on screen using EXECUTE_QUERY. At this stage I want to check whether picture (.bmp) data was found in BLOB type database column or not. I want to take action accordingly. How to check this. If it would be a numeric column, I would have checked NULL but NULL does not work with BLOB type coloumns.
    Pl. help.
    Thanks in anticipation.

    Did you look in the database documentation? The DBMS_LOB package has the method you need: getlength().
    This was more of a database question than a Forms question, so you'd probably have more luck with these types of questions on one of the other forums, like the database or SQL forums.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • Oracle.DataAccess.Client.OracleDataAdapter exists in both v2 and v4

    Hi there,
    I am developing ASP Net application with ODP.NET 11.2.0.2.1 and VS 2010. The target framework is .Net framework 3.5 and I've explicitly Oracle.DataAccess reference to v.2, with
    <add assembly="Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
    , but when it compiled, it throw error
    The type 'Oracle.DataAccess.Client.OracleDataAdapter' exists in both
    'c:\WINDOWS\assembly\GAC_32\Oracle.DataAccess\2.112.2.0__89b483f429c47342\oracle.dataaccess.dll'
    and 'c:\WINDOWS\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess\v4.0_4.112.2.0__89b483f429c47342\oracle.dataaccess.dll'     
    c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\esptweb\df172a69\e974c60e\App_Code.eoge0t0f.4.cs
    How can I fixed it?
    Thanks for the help.

    Did you try adding that reference using the Add Reference command in Visual Studio instead? I've never seen it behave like this before.
    There are two versions of the assembly, but it shouldn't be trying to load the .net 4 version if you have a reference to the .net 2 version and you're in a 2 (or 3.5) app.

  • How to check whether file exist in a folder at the application server

    Hi to all experts.
    if suppose there is a file at the application server test.txt my requirement if the one more file is created of the same name before overwriting the file a warning message is to displayed to the user that the file already exist .
    how to do it

    HI Mohammed,
    use The FM DX_FILE_EXISTENCE_CHECK
    or static class CL_GUI_FRONTEND_SERVICES=>FILE_EXIST
    For more info
    search file in application server
    application server
    hope it helps you.
    Regards!

  • URGENT!!! how to check whether file exist or not on client side?

    hello,
    i am building appilication using JSP and javabeans.
    Problem is my application is like on server files are there for say colors and their corresponding car image in that color.so when i move my mouse over that particular color ,its corresponding car image is displayed.
    now say someone has deleted that corresponding car image file but image of color is there...........
    so i have to handle such excpetion.
    like if corresponding car image for that color is not there then that color image should also not be displayed.
    i dont want to do this checking on server side.
    pls help me!!!!!!

    You don't have access to the client files. It is a security violation in a normal internet environment. Imagine what people could do to your computer if they could see everything on it.

  • HT3775 Can someone direct me as to how I check whether I have the media formats and codecs that QuickTime Player can play back using my Mac Pro?

    I'm trying to use quicktime on my macbook pro but I receive the message below when I make an attemp to use it.  Any suggestions?
    Media formats supported by QuickTime Player
    QuickTime Player natively supports the following media formats and codec components. You can also extend QuickTime to support additional codecs and components.
    Below are the media formats and codecs that QuickTime Player can play back in Mac OS X v10.6.x or later:

    More alternatives to Quicktime. VLC is recommended a lot.
    Video Player - Divx
    Video Player – Flip4Mac
    Video Player - VLC

  • Sender file adapter, file existence check in archive folder if exists rename the same and proceed with current file

    Dear SAP Gurus
    Interface flow:
    File --> File and RFC.
    We have a requirment where PI needs to check the file existency in archive folder and if there is a file already exists with same name we need to rename that file and archive the current file as is...
    Note* Customer don't want to add time stamp!!!!
    For ex today first message processed with file name "UBMO_delta20140626.xml" and archived as is- UBMO_delta20140626.xml
    and customer sends a second file on the same day with same name(UBMO_delta20140626.xml) in this case before archiving PI needs to check whether there is a file exists already in archive folder or not if there is, then it should rename the same like(UBMO_delta20140626_1.xml) and proceed with current message processing and archive the same name(UBMO_delta20140626.xml).
    Many Thanks in advance...
    Nagesh

    Hi Nagesh,
    I think you can use the feature of run operating system command before message processing. you can refer the below wiki for information.
    SAP XI File Adapter OS Command Line Feature - Process Integration - SCN Wiki
    regards,
    Harish

  • How to check whether system privilege are granted

    How to check whether system privileges like 'create session' and other ones are granted for user.
    Is there any sys table where this information is available?
    Regards - Neuron

    Keep in mind select * from dba_sys_privs where grantee = 'some-user' will give you a list of privileges granted to some-user directly. To get complete list of system privs granted to a user both directly an via roles use:
    ACCEPT USER PROMPT 'Please enter user name: '
    COLUMN PATH FORMAT A90
    SET LINESIZE 132
    SELECT  PATH,
            PRIVILEGE
      FROM  DBA_SYS_PRIVS,
              SELECT  'DIRECT GRANT' PATH,
                      '&USER' GRANTED_ROLE
                FROM  DUAL
             UNION ALL
              SELECT  LTRIM(SYS_CONNECT_BY_PATH(GRANTED_ROLE,'->'),'->') PATH,
                      GRANTED_ROLE
                FROM  DBA_ROLE_PRIVS
                START WITH GRANTEE = UPPER('&USER')
                CONNECT BY PRIOR GRANTED_ROLE = GRANTEE
      WHERE GRANTEE = GRANTED_ROLE
    /Now on top of privileges granted to a user, user also has privileges granted to PUBLIC. To get privileges user receives via PUBLIC run the above script specifying PUBLIC at the prompt.
    SY.

  • How to check whether an invoice has been paid or not?

    Hi,
        In FI, how should I check whether an invoice is paid fully and also whether it has any residual item?
    And how should I pay an invoice with some residue? Which transaction I should use and what are the steps to do that?
    Since I'm new to FI, any guidance will help me a lot...
    Thanks,
    Priya.

    Hi Priya,
    you create a posting with residual items as follows:
    <b>Incoming payment</b>
    1. Start transaction F-28
    2. Enter all required information and click on <i>Process open items</i>
    3. On the next screen click on the tab <i>Res. items</i>
    4. Make sure that only the items that you want to pay are highlighted ((Net amount appears in blue)
    5. For each line item enter the residual amount that is still to be paid (Example: you have one invoice over 100 USD and 80 USD are paid, you enter 20 USD, since this is your residual that still needs to be paid)
    6. Save
    <b>Outgoing payment</b>
    1. Start transaction F-53
    2-6. is identical to incoming payment
    Regards,
    Claus

  • Checking whether a URL is active in 4.6C

    Here's a different question for you.
    I've been asked to check whether a URL is active.  Basically they want to check whether the webpage is still viewable and if it isn't, then send an e-mail.  This will be a background job.
    Because 4.6C does not have ICM [Internet Communication Manager] this doesn't seem to be an easy process.
    The most I seem to be able to do is use CL_GUI_HTML_VIEWER to show the URL.  But that only happens when run online and not in background. And no exceptions are raised if a 404 page cannot be displayed happens. 
    Being the constriction of 4.6C anyone have any ideas?
    If you could show me how to PING from ABAP or know whether a website is active <REMOVED BY MODERATOR>
    Let's use www.ebay.com as an example.
    Thanks!
    Edited by: Alvaro Tejada Galindo on Feb 8, 2008 10:25 AM

    Hi,
    Go to tcode DC30 and there check for the 'Define workstation apllication in network'.
    If there is no entry for URL, create an entry as below :
    Appl =  URL
    Description = Textdateien
    Suffix = URL
    ArchID = *
    StartAuth = flag checked
    I think this setting should make the system to access the URL's.
    Regards,
    B Rangaraju

Maybe you are looking for

  • My Podcasts won't sync to my iPod touch.

    I have ticked the sync box and automatically include all episodes but still no podcasts are showing up on my iPod.

  • O/S X 10.5 leopards and Adobe CS2

    Hello, References : Go To : Adobe.com/ Upgrading to Leopard? Find out Adobe software compatibility Page 3 I have a new Mac Pro came with Tiger installed and a Leopard disk, and a G4 powerBook. About using CS2 Illustrator and or Photoshop with Leopard

  • Payment issue-3 Months Suscription

    Hi,  I have purchased a US number for 3 months subscription, and when I am recharging it is showing for 3 months plan costs 10Euros, and 400mins/month. My question is suppose I have finished my 400 mins within a week after purchasing, again to get 40

  • I am trying to save a large file on Illustrator CS6 and it does not save and instead says "Unknown Error Occurred." What do I do?

    I am trying to save a large file on Illustrator CS6 and it does not save and instead says "Unknown Error Occurred." What do I do? The file has 4 artboards with webpage designs. I tried to take two of the artboards, create a separate doc with those tw

  • ZCM vs SCCM

    Hi, We are in an AD environment. My boss starts to talk about Microsoft SCCM. Why should we remain with ZCM instead of SCCM ? Thanks.