How to get the filename only

hello friends,
                   I am currently using the function module WS_FILENAME_GET  for the user to select the file.
now what this function module return is the complete path, now i want only the filename and not the whole path, also the user will be choosing files from different folders and drives all the time so the path is not pre defined .
can any1 help me in getting only the filename from the whole path ?????

hi ,
    here is a chance to give the filename separately ,
and path separately check this example,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
   DEF_FILENAME           = 'test.txt'
   DEF_PATH               = 'C:\MSOFFICE\EXCEL\EXAMPLES'
   MASK                   = ',.,..'
   MODE                   = 'O'
   TITLE                  = TEXT-F4F
IMPORTING
   FILENAME         = FILE
EXCEPTIONS
  INV_WINSYS       = 01    
  NO_BATCH         = 02
  SELECTION_CANCEL = 03
  SELECTION_ERROR  = 04.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
reward points if useful,
venkat.

Similar Messages

  • How to get the filename from J2SE File adapter

    In our project scenario , we are using J2EE and J2SE engine both .J2EE for mapping  and J2SE for Deliveying the message .
    In one senario, routing will be based on the filename .
    J2SE Sender File adapter --- XI Adapter --- XI pipe line
    So the File reaching to XI pipelane via J2SE File adapter--> XI adapter.
    When we are using the dynamic configurator in the XI to get the filename
    we are not able to get the file name  becasue it is coming to XI via
    XI adapter.
    How to get the filename ????Hope I am clear about the problem.

    hi,
    try this
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //obtengo la Key del FileName
    DynamicConfigurationKey keyF = DynamicConfigurationKey.getName();
    http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/DynamicConfigurationKey.html
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516
    /people/mohammed.zabiulla/blog/2008/03/26/have-you-ever-tried-to-determine-mail-cc-dynamically
    Hope it helps
    Thanks
    Rodrigo
    Edited by: Rodrigo Pertierra on Apr 11, 2008 9:31 AM

  • Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?

    Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?
    I'm developing an application where a file is need to be saved as pdf. But, if there is already a pdf file with same name in the specified directory, I wish to overwrite it. And in the overwrite case, read-only files should not be overwritten. If the duplicate(old) file is opened in windows (Win7) explorer preview, it is write protected. So, it should not be overwritten. I tried to get the '
    FILE_ATTRIBUTE_READONLY' using MS API 'GetFileAttributes', but it didn't succeed. How Adobe marks the file as read-only for preview? Do I need to check some other attribute of the file?
    Thanks!

    Divya - I have done it in the past following these documents. Please read it and try it it will work.
    Please read it in the following order since both are a continuation documents for the same purpose (it also contains how to change colors of row dynamically but I didnt do that part I just did the read_only part as your requirement) 
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b?quicklink=index&overridelayout=true
    thanks!
    Jason PV

  • How to get the filename of the active jsp page?

    how can i get the filename of the active jsp page?

    You could register the JSP [ages in the web.xml and then use the ServletConfig.getServletName.
    You could use the JspContex.getServletName which will return the registered name or the name of the servlet class.
    You could programmatically add a page context attribute that holds the jsp page name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Is there a way to get the filename only on iOS using CameraRoll?

    This post is a sidetrack from this post: http://forums.adobe.com/thread/848761?tstart=0
    The method used in that post works perfect on both Android and iOS for selecting and uploading files.... BUT is there a way to get the filename of the file from the mediaPromise cross-plattform?
    If you let the user select an image it's not very nice to have the image be called "temp.jpg" after uploading - you want the user to know which image he/her have uploaded
    Any ideas? The "mediaPromise.file.relativePath()" works on Android but not on iOS. Not "mediaPromise["file"].url/relativePath/nativePath" either.
    Thank you

    Hey Joe what do you think of this solution.
    1. Let the user select the image
    2. Store the mediaPromise object in an array (event.data) for later use
    3. Load in the object using loadMediaPremise
    4. Add the loaded image into a movieclip (not visible from the scene)
    5. Resize that movieclip to let's say 100x100
    6. Use the BitmapData class to create a new bitmap from that movieclip and save it to storage
    7. Use the saved file within the app as a thumbail
    8. Use the mediaPromise object stored in the array later when the user wants to upload the images (then go through mediaPromise.open() on each image -> save to storage -> upload -> clear from storage -> loop).
    I haven't tried it yet (will do this week) but should that be a acceptable solution to the problem(?)
    I'm unsure if by just keeping the mediaPromise object within Flash will make the memory run wild though?

  • How to get the filename when parsing a file with d3l

    All
    After some time have experience with interconnect, IStudio I need the following info. Is it possible to get the filename when parsing a flat file using a d3l? This is needed because we need to store the filename together with the data into the database.
    Any examples or directions to some documents are welcome.
    Regards
    Olivier De Groef

    has anyone some info on this

  • How to get the filename of the opened Illustrator document

    Hi All,
    I'm using Adobe Illustrator CS2, i have problem in getting the file name of the document opened. i have succesfully got the document reference(of opened document) but from that reference i'm not able to find the method which gives me the filename. Can you please help me out.

    Hello, I need to automatically enter the file name and date in a drawing using illustrator DC 2014, please can you help me understand how can I do?
    Thanks so much

  • How to get the filename of document that opened my app

    Hope that makes sense. I'm relatively new to OS X programming and have built a small Cocoa app (not a document-based app). I've associated a file type (.myFileType) with my application. If I double-click a file with that file type, it opens my app automatically as expected. From within my app, how do I get the full pathname of the document that opened my app?

    I know what you're saying. IB is made to seem easy, but when you start asking "What's this?", and "What does that do when the nib is loaded??", the pretty pictures suddenly aren't as clear as they seemed. Been there!
    The File's Owner never causes the creation of an object. It's always a "proxy" (a stand-in) for an object that's created elsewhere. The actual object may be defined in another xib, or it may be created in code. In MainMenu.xib. the File's Owner is a proxy for the Application object. The Application object isn't created because of that nib, it's created by the startup code before the nib is loaded. But the "proxy" allows you to make connections to the Application object in the xib.
    I know this is clear as mud so far, but it will start to make sense after you grok a few more pieces of the puzzle. A good place to start might be Anatomy of a Nib File in the +Resource Programming Guide+.
    Nib proxies are actually easier to understand when building an iPhone app. In that case, the SDK makes it much easier to associate proxies with the objects they represent. The concept is still the same, but for example, bridging two iPhone xibs with a proxy only takes a couple mouse clicks in IB.
    Hope that helps!
    \- Ray

  • Already connected with DB content. how to get the filename???

    Hi, i solved my problem changing the server.xml, so now i can connect OK to Oracle Content Database, using the last code from OTN.
    This BPEL Process starts when the user copies a file into a folder in content db..and i need to know that filename.
    Anyone knows how to get that file name after i am connected???
    The code i am using and works to connect is this:
    try
    oracle.ifs.fdk.RemoteLoginManagerServiceLocator rlmsl =
    new oracle.ifs.fdk.RemoteLoginManagerServiceLocator();
    rlmsl.setMaintainSession(true);
    // initialize the RemoteLoginManager
    oracle.ifs.fdk.RemoteLoginManager s_RLM =
    rlmsl.getRemoteLoginManager(new java.net.URL("https://contentdev.nblenergy.com/content" + "/ws/RemoteLoginManager"));
    // establish a session
    oracle.ifs.fdk.NamedValue[] properties= s_RLM.login("kofax","xxxxxxxxxx", null, null);
    addAuditTrailEntry("properties",properties);
    catch(Throwable ex)
    {addAuditTrailEntry("Others",ex);                               
           ex.printStackTrace();                         
          }

    Did you every find how to accomplish this?
    Thanks,
    Steve

  • How to get the filename from URL

    Hi,
    I want get the file name from the url while downloading a file. here is my case follows:
    I have url like "http://www.myhost.com/dowloadFile.do?id=345546" . this will download "test.zip"; file from the browser.
    I want download the file from that url and save that as "test.zip";, how can we get the file name "test.zip"; from java. I am using ConnectionURL to download the file.
    waiting for the earliest responses.
    -Bhaskar

    Specify it in the content-disposition header.
    To get it to work in a certain webbrowser, you need to supply it as part of the URL either.
    Also see this example: [http://balusc.blogspot.com/2007/07/fileservlet.html].

  • How to get the filename of the current active document in InDesign CS4?

    Hi,
    If I open a document from File->Open, I can get the document's file name using IOpenedFileInfo->GetOpenedFilePath().
    But, if I create a new document and perform File->SaveAs, GetOpenedFilePath is returning invalid IDFile reference.
    What is the right way to get the active document's file name?
    Thanks,
    VSP

    You can try this:
         IDatabse * db = ::GetDatabase(theDoc);
         IDFile *  sysFile = db->GetSysFile();
         PMString docName = sysFile->GetFileName();
    Good luck

  • How to get the filename in mapping when using sender File adapter?

    hi Experts,
       I have scenario where XI reads the input file using Sender file adapter.
       The file name is configured in the communication channel.
       In my message mapping it is possible to read this file name?
    Thanks
    gopal

    Hi Gpoal,
    Use Dynamic Configuration - /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regards,
    Geetha

  • How to get the filename specified by user while saving the download file?

    Is there any way? Your reply is highly appreciated.
    By [email protected]

    download the library cos.jar from http://www.servlets.com/cos/index.html
    documentation on how to use it is included in the jar
    :)

  • How to get the current filename and & or path

    How can I get the current path or filename?
    I didn't really find any answers in the net. this.path or app.path were suggested but I couldn't get it to work.
    Thanks in advance for your answer!
    Livecycle Designer ES 8.2.1.3144.1.471865

    Hi,
    event.target.path.toString();  will give the full path including the filename.
    event.target.documentFileName.toString();  will give the filename only.
    Good luck,
    Niall

  • How to get the specific filename

    Hi..
    I want to get the specific file where the filename contains current date like "asd.11.20051226.03.dat". Then, i want to write the filename to a text file.
    Now, i only know how to get the list of file in a specific directory& write the whole list to a text file. How to filter the list of filename because they have "dot" in their name?

    To determine if a string contains a dot:I have a feeling that about 10 seconds after he figures out whether the filename contains a dot he's going to need to look a little deeper to determine whether he found wakka.wrongfile.txt or 11.20.1980.the.file.hes.looking.for.data. Maybe?

Maybe you are looking for

  • Printer Setup Utility will not allow new driver to be added

    I just bought a Canon Pixma MP960, installed the drivers and then downloaded the driver from their website. When I go to add a new driver in Printer Setup Utility--i highlight the MP960 connected thru USB, but the 'add' feature is not lit up. When i

  • Cant find pics on my pc from icloud

    I've set up photo sharing on my iphone in the icloud and I've taken a few pics. The apple sight says the pics should be in my pictures folder on my pc  but I cant find them. Is there something else I need to do to find them?

  • OSB: strict xsd validation

    Hi guys, I'm trying to validate an XML inside the OSB with this schema: <xsd:complexType name="GenericMessage"> <xsd:sequence> <xsd:element name="generic_header" type="gm:GenericHeader"> </xsd:element> <xsd:any maxOccurs="unbounded"> </xsd:any> </xsd

  • How to delete all messages without reset iphone 4S

    Hello i want to delete all my mesasages in my phone without resetting data and other settings.

  • Releasing a transaction in TM

    Hi All, I created an investment transaction in Transaction Manager. After saving it, the status shows "Release Required". How do i release this transaction? Thanks, Anu