Get directory path. Just the directory path, without the file name.

Hi,
I need to export a file from a table in SAP to a directory in the PC. So i need to get a directory path.
I've been reading the threads but all the answers refer to functions F4_FILENAME, WS_FILENAME_GET, KD_GET_FILENAME_ON_F4 or to the method CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG.
But all of them require to select a file to close the window.
What I need is to get the path to the directory, not to a file.
For example:
I just need to get:
C:\TEMP
and not:
C:\TEMP\file.doc
Please help.
Thanks.

Pablo, use cl_gui_frontend_services=>directory_browse.
Refer this code:
PARAMETERS:
  p_path         TYPE rlgrap-filename OBLIGATORY.
DATA:
  gv_path_ini    TYPE string,
  gv_path_sel    TYPE string.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
  CALL METHOD cl_gui_frontend_services=>directory_browse
    EXPORTING
      initial_folder  = gv_path_ini
    CHANGING
      selected_folder = gv_path_sel
    EXCEPTIONS
      cntl_error      = 1
      error_no_gui    = 2
      OTHERS          = 3
  IF sy-subrc = 0.
    CALL METHOD cl_gui_cfw=>flush( ).
    IF NOT gv_path_sel IS INITIAL.
      gv_path_ini = p_path = gv_path_sel.
    ENDIF.
  ENDIF.
As a side note, always avoid any WS_* function modules as they're not Unicode compliant.
Regards

Similar Messages

  • If I purchase a phone online can I get the monthly payment without the two year contract?

    If I purchase a phone online can I get the monthly payment without the two year contract?

    There is the Edge payment option to spread the full retail price of the phone over the course of two years. It is a payment contract and not a service contract.

  • Why does the mouse cursor move to away from the currrent application without the mouse being moved

    the mouse cursor moves away from the current application without the mouse having been moved - this started with the new version - re-installing Firefox makes the problem go away for a short period - re-installing is not a solution
    == This happened ==
    Every time Firefox opened
    == a few days after installing 3.6.3

    Hello Jim.
    It's probably one of three things:
    #your mouse is getting old (this behavior is common in old optical mouses);
    #you have software that is making your mouse cursor behave unexpectedly (I know of an option in Windows that will automatically move your mouse to windows buttons...);
    #or you may be having a problem with some extension or plugin that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?

  • Is it safe to use the power adapter without the grounding pin?

    Is it safe to use the power adapter without the grounding pin?
    Last time I unplugged my power adapter the grounding pin stayed in the wall socket. Is it safe to use it with just the 2 prongs?

    Is it safe to use the power adapter without the grounding pin?
    No. If a short circuit occurs, it may cause the case of the computer or other device to build up an electric charge. The grounding pin absorbs any charges generated this way; without it, someone touching the device may get shocked.
    (52105)

  • Is it dangerous to use the iphone 4 without the earpiece grill?

    Is it dangerous to use the iphone 4 without the earpiece grill/mesh on it? I heard it serves radiation cover and now I am worried about using it or holding it close to my ear. I had my screen replaced but the grill insert is missing as it was lost when i damaged my original screen.
    Thanks

    There are 2 issues here.
    Some carriers REQUIRE a data plan in order to use an iPhone on their network. This requirement will vary from carrier to carrier. The iPhone is designed to be constantly connected. If you do not manually go in and turn off cellular data (not just 3G) The phone will attempt to connect to the Internet over the cellular data network. If you have your carrier specifically block these requests, you shouldn't be charged for them. If not, it could end up costing you lots of money you didn't expect. The other thing that will happen is things like visual voicemail will not work (if the carrier supports it to begin with) and you will get lots of messages about not being able to connect to cellular data if you're not in range of WiFi you can connect to. MMS messaging also will not work.
    The second issue surrounds the statement: "use the iphone 4 with a standard cdma phone plan".
    It is NOT possible to purchase an unlocked CDMA iPhone. ALL CDMA iPhones are locked to Verizon.

  • MIFI4620LE Jetpack blinking amber light--does this mean the battery is bad? Should the unit operate without the battery installed if plugged in?

    MIFI4620LE Jetpack blinking amber light--does this mean the battery is bad? Should the unit operate without the battery installed if plugged in?

    The MIFI4620LE Jetpack does not work without a battery installed, even when connected to an external power supply.
    I personally think that was a dumb design. I would think the unit would use more electricity when continually charging the battery than just powering the unit it's self, but that's the way Novatel made them.
    If your Jetpack works with the battery installed and connected to an external power supply, but does not power on with power supply disconnected, I would say that the battery is defective or worn out.
    You should be able to go to a nearby Verizon Store and have them either test the battery or put a new one in it to see if it works. Then you will know if you need to spend the $$ for a new battery. OR if you always use your Jetpack at home, or in your car, just use the old battery connect to a power supply or your cigarette lighter and save the cash.
    As the Customer Support person stated, the slow blinking amber light is a normal state when the Jetpack is turned on and connected to Verizon's service.
    I hope this solves your problem.

  • When I populate a form and send to my printer, the form prints without the info I entered

    When I populate a form and send to my printer, the form prints without the info I entered. How do I fix this?

    Posted last week:
    Epson Printer Drivers v2.19 for OS X
    If you use Software Update, probably got installed. If you are like me, you clone your system before any update or changes, in case something breaks.
    Windows you don't or haven't heard of? VM = virtual machine, ie a guest OS running under Mac OS (or running natively on its own partition, seeing sometimes there is software that is essential but only needed for business or once in a while). Runs just like another app (and uses an app to control the guest OS).

  • If i download any file which is prepare on microsoft office 2007 . The file have been download without extension of the prog. Means if files name is "1,docx" when i download from firefox it download in that form "1". after download i have to rename and gi

    If i download any file which is prepare on microsoft office 2007 . The file have been download without extension of the prog. Means if files name is "1,docx" when i download from firefox it download in that form "1". after download i have to rename and give the extension name is plz tell me the way that office files are compatible with it.
    == This happened ==
    Every time Firefox opened
    == when i download the office files

    In Firefox Options / Privacy be sure "Remember download history" is checked. To see all of the options on that panel, "Firefox will" must be set to "Use custom settings for history".
    To find your OS information, on your Windows desktop, right-click the My Computer icon, choose Properties, under System on that small window is info about your OS.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • How to have the Chat history without the Exchange server?

    How to have the Chat history without the Exchange server?

    Hi,
    You can try Archiving server. Archiving is the storing of IM and conferencing data in an SQL backend database. This data is not instantly readable / searchable. The Lync users are not able to read it directly. The admin can export the data using Lync powershell
    and then convert it into a readable format.
    Kent Huang
    TechNet Community Support

  • When "Edit in Photoshop" in lightroom photoshop opens the picture but without the changes I made in lightroom

    when "Edit in Photoshop" in lightroom photoshop opens the picture but without the changes I made in lightroom
    Please help me

    Hi mariad91843143,
    To enable the non-destructive workflow and the powerful features of Photoshop CC, the RAW image will need to be opened into Photoshop whilst, in the meantime, keeping our Lightroom changes so that we can work on them later. Instead of using the ‘Edit in Adobe Photoshop’ option in Lightroom – CMD +E (Mac) or CTRL +E (PC) – the option ‘Open as Smart Object in Photoshop’ will be used.
    This is a very useful tutorial to understand how to manage the workflow between Photoshop and Lightroom Canon Professional Network - Lightroom & Photoshop CC workflow (Pt. 1): Smart Objects ....

  • After editing images in Aperture, I want to overwrite the editing to an external drive.  Is thee an easy way to "add" the new work without the  long process of backing up the whole library.

    After editing images in Aperture, I want to overwrite the new editing to a backup external drive.  Is there an easy way to "add" the new work without the  long process of backing up the whole library.

    But the Library is not a program.  I use SuperDuper, and it is smart enough to treat Finder Packages (such as the Library) as a whole bunch of files and folders, and overwrites only those that have changed.  Can't CCC be set up the same way?

  • Is there a way to turn back on the zooming effect without the paralex effect in IOS 7.0.3?

    Is there a way to turn back on the zooming effect without the paralex effect in IOS 7.0.3?

    Read >  https://discussions.apple.com/message/22590863#22590863

  • A fu the whole page without the need to drag higeach tune ?

    To drag a full page if itunes to a playlist is it possible to highlight the whole page without the need to highlight and drag each tune by usinf Ctrl?

    CTRL+A, or Edit > Select All. 
    Either one will highlight everything in the current view, after which you can drag them all at once.

  • Can anyone tell me the dimensions of the 27" iMac without the stand?

    I am looking for the dimension of the 27" iMac, without the stand. The tech specs show dimensions with the stand.
    Thank you,

    My iMac screen is slightly over 17 1/2" high.  I have no idea whether the dimensions on the new one will be different.

  • Charge the Zen MicroPhoto without the U

    I have the Zen Micro and the Zen MicroPhoto. Can I charge the Zen MicroPhoto without the USB like the Zen Micro?
    Thanks

    player will NOT charge on a computer that dosent have the dri'ves installed and only a creative charger will work??if you would like to charge on a computer without drivers or a 3rd party wall charger do this:?) put the dri've on "removible disk mode"2) plug into wall charger/ computer3) charge your player?NOTE: i have lastest firmware installed, dont know of this will affect charging

  • Need help changing the setting to preview entire file names

    Using Leopard, I would like to to be able to read the entire name of a file.
    For example, my files might say (File 2.....609). What the file is named is File 2 Graphs 6209. How can I set up Leopard to allow me to read the entire file, so I don't have to guess the file?

    Ah! I tend to avoid using column view for folders containing items with long names, because it increases the amount of horizontal scrolling needed to see everything, & because I'm usually interested in seeing & sorting items by the non-name columns available in list view.
    FWIW, I tried the column view drag handle double click tip on one of the folders containing some of my extra long named items & it does expand to show the entire name, but I don't care for the result: the Finder window expands horizontally so much that it won't all fit within even a 24" widescreen display! So not only do I have to scroll the window's content horizontally to see everything, I have to move the window partially offscreen to do so. That is too much of a chore to make this a very good alternative for long path names.
    It occurs to me that there might be a more elegant, subtle, & "it just works" Apple-like solution possible: instead of just abbreviating the displayed item name by replacing enough of the middle characters of the name with an ellipsis to make it fit, it would be cool if this were adaptive & tried first to abbreviate the non-unique parts of the name, relative to all the items in the column. So if say 3 files in a view contained the same 12 character sequence, that sequence would appear with the same abbreviation in each file, more frequently preserving the display of the unique parts of each file name.
    Does this make sense?

Maybe you are looking for

  • Flash Crashes 95% of the  Time in Both Safari and Firefox

    I am using the latest Flash Player (10.0.42.34) on Mac OS X Snow Leopard 10.6.2 with all the updates. It crashes on most videos, but not all. It does not seem to crash on YouTube videos, but it crashes on most other videos from everywhere. I’ve remov

  • Urgent SAP upgrade from 4.0B to 4.7 Oracle 9.2.0.6

    Dear support, I have upgraded my oracle database to 8.1.7.4 with 4.0B extended kernel along with upgradation from NT 4.0 to Win 2000 is finished , and we are planning to upgrade SAP to 4.7 version.Please let me know whether i need to upgrade my datab

  • Non Apple applications fails to launch

    Hello, Today, when I launched MS Word or other non-apple application (like Indesign 2), I've got the following error : The application "Word" could not be launched because of a shared library error: "5<Microsoft Word><CarbonLib><CFMPriv_LaunchService

  • CSS: text align in a table

    Alright well all day at work today, my boss helped me with my website. I am an intern for an online business, and I do all the graphic design work there, and my boss manages the site in Dreamweaver. Well since I'm an intern, I asked him to help me ou

  • Case insensitive comparison

    Is there a way or setting at instance level by which all character value comparisons can happen in case insensitive manner ( For example "ABC" = "Abc" or = "abc" ) without requiring to use upper or lower functions in every query