How to select directory path in a selection screen

Hi ,
We can select a file path using the below statement :
DATA : P_FILE  TYPE RLGRAP-FILENAME.
But how can the similar be achieved for a directory, that is if one wants to select a folder.
Folder path can be retrieved from the function : "TMP_GUI_BROWSE_FOR_FOLDER" but this doesnt give us the privilege of displaying the path selected in a parameter form as is with the file type.
Any kind of help would be apprecialble.
Thanks!!!!

Hi,
    Try with below Method
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : p_file LIKE rlgrap-filename MODIF ID ccc.
SELECTION-SCREEN END OF BLOCK b2.
*     AT SELECTION SCREEEN                                               *
AT SELECTION-SCREEN ON VALUE-REQUEST  FOR p_file.
  PERFORM f4_filename.
AT SELECTION-SCREEN ON p_file.
  IF p_file IS INITIAL.
    MESSAGE 'Please fill the path' TYPE 'E'.
  ENDIF.
*     START OF SELECTION                                              *
START-OF-SELECTION.
*&      Form  F4_FILENAME
*       Get the file from presenation server
FORM f4_filename .
  DATA : lit_filetable TYPE filetable,
         lw_rc TYPE i.
*  Get file from presentation system
  CALL METHOD cl_gui_frontend_services=>file_open_dialog
    EXPORTING
      window_title            = 'Find File'                 "#EC NOTEXT
*    DEFAULT_EXTENSION       =
*    DEFAULT_FILENAME        =
      file_filter             = '*.*'
      initial_directory       = 'C:\'
*    MULTISELECTION          =
*    WITH_ENCODING           =
    CHANGING
      file_table              = lit_filetable
      rc                      = lw_rc
*    USER_ACTION             =
*    FILE_ENCODING           =
    EXCEPTIONS
      file_open_dialog_failed = 1
      cntl_error              = 2
      error_no_gui            = 3
      not_supported_by_gui    = 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.
*  Read file name into variable
  READ TABLE lit_filetable INTO p_file INDEX 1.
ENDFORM.                    " F4_FILENAME
Regards
Bala Krishna

Similar Messages

  • How to assign directory path of File/FTP adapter into a variable insideBPEL

    Hi,
    i need to get the directory path given to file/Ftp adapter (write/PUT) into a variable while invoking, which will be later used in some other BPEL service for processing.
    i am able to get the directory path easily using "jca.file.filename/jca.ftp.filename" in case of invokin Read\GET adapter but am struggling to get these details while invoking a file/Ftp adapter (write/PUT).
    kindly tell me is it possible to get these properties in case of file/Ftp adapter (write/PUT) !!!!
    Thanks
    Siva

    These documents may be helpful in discovering the functionality/use of variables to capture some of the file adapter properties.
    How to Manipulate SOA 11g Adapter Headers Using Oracle Mediator (Doc ID 1352248.1)
    How to Create an Outbound File with the Same Name as the Inbound File with FTP/FILE Adapter (Doc ID 745587.1)
    Hope it helps!
    Amy

  • Selection Screen Choice

    Hi,
    I am new to ABAP and facing following problem. I have a selection screen with following parameters. I want prompt the user enter appropriate values based on first value he enters.
    Objective: To get production orders based on the values entered by user.
    For example:
    These are the combinations of required inputs:
    If the user first enters
    1) -> plant then he has to enter material number, Customer number, Prod. Heirarchy, workcenter, selection dates to get prod orders.
    if the user enters
    2) production number then he need not enter anything else to get the prod orders.
    if the user enters
    3) Sales order then he need not enter anything else to get the prod orders.
    How do I achieve this.
    Thanks in advance for your help.
    Sachin
    This is how my selection screen looks:
    DATA: P_SD LIKE AFPOD-EDATU.
    SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TEXT-100.
          PARAMETERS: P_PLANT LIKE CAUFV-WERKS ,
                  P_PROD LIKE CAUFV-AUFNR,
                  P_SORD LIKE CAUFV-KDAUF,
                  P_MATNO LIKE CAUFV-PLNBEZ,
                  P_CUSTNO LIKE AFPOD-KUNNR2.
        SELECTION-SCREEN END OF BLOCK SEL1.
        SELECTION-SCREEN BEGIN OF BLOCK SEL2 WITH FRAME TITLE TEXT-200.
          PARAMETERS: P_HIER LIKE MARA-PRDHA OBLIGATORY VALUE CHECK.
          SELECTION-SCREEN END OF BLOCK SEL2.
        SELECTION-SCREEN BEGIN OF BLOCK SEL3 WITH FRAME TITLE TEXT-300.
          PARAMETERS: P_WC LIKE CRHD-ARBPL.
          SELECT-OPTIONS S_SELDAT FOR P_SD.
        SELECTION-SCREEN END OF BLOCK SEL3.
    SELECTION-SCREEN END OF SCREEN 500.
    CALL SELECTION-SCREEN 500.

    DATA: P_SD LIKE AFPOD-EDATU.
    *selection-screen: begin of screen 500.
    SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TEXT-100.
    *PARAMETERS: P_PLANT2 LIKE CAUFV-WERKS AS LISTBOX VISIBLE LENGTH 4 user-command ucomm  modif id 123.
    PARAMETERS: P_PLANT LIKE CAUFV-WERKS  modif id 123, "obligatory, "default '1005',
    P_PROD LIKE CAUFV-AUFNR modif id 010,
    P_SORD LIKE CAUFV-KDAUF modif id 789,
    P_MATNO LIKE CAUFV-PLNBEZ modif id 234,
    P_CUSTNO LIKE AFPOD-KUNNR modif id 234.
    SELECTION-SCREEN END OF BLOCK SEL1.
    SELECTION-SCREEN BEGIN OF BLOCK SEL2 WITH FRAME TITLE TEXT-200.
    PARAMETERS: P_HIER LIKE MARA-PRDHA  VALUE CHECK modif id 456 default '00115'.
    SELECTION-SCREEN END OF BLOCK SEL2.
    SELECTION-SCREEN BEGIN OF BLOCK SEL3 WITH FRAME TITLE TEXT-300.
    PARAMETERS: P_WC LIKE CRHD-ARBPL modif id 567.
    SELECT-OPTIONS S_SELDAT FOR P_SD modif id 567.
    SELECTION-SCREEN END OF BLOCK SEL3.
    *SELECTION-SCREEN END OF SCREEN 500.
    at selection-screen output.
    loop at screen.
    if p_plant is not initial.
    if screen-group1 = '234'
    or screen-group1 = '456'
    or screen-group1 = '567'.
    screen-required = 1.
    *screen-input = 1.
    modify screen.
    endif.
    endif.
    if p_prod is not initial.
    if screen-group1 = '234'
    or screen-group1 = '456'
    or screen-group1 = '567'
    or screen-group1 = '123'
    or screen-group1 = '789'.
    screen-input = 0.
    modify screen.
    endif.
    endif.
    if P_SORD is not initial.
    if screen-group1 = '234'
    or screen-group1 = '456'
    or screen-group1 = '567'
    or screen-group1 = '123'
    or screen-group1 = '010'.
    screen-input = 0.
    modify screen.
    endif.
    endif.
    endloop.
    start-of-selection.
    *call selection-screen 500.
    if p_plant is not initial.
    if P_CUSTNO is initial.
    message 'Enter all details' type 'I'.
    leave list-processing.
    endif.
    endif.
    hi, try this..unfortunately u need to enhance this code a bit ..i am leaving for the day ...
    hope this will give u some idea..
    santhosh

  • How to get the path when i select a directory or a file in a JTree

    How to get the path when i select a directory or a file in a JTree

    import java.lang.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.HeadlessException;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    * @author Frederic FOURGEOT
    * @version 1.0
    public class JTreeFolder extends JPanel {
    protected DefaultMutableTreeNode racine;
    JTree tree;
    protected JScrollPane scrollpane;
    final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
    * Sous-classe FSNode
    * @author Frederic FOURGEOT
    * @version 1.0
    private class FSNode extends DefaultMutableTreeNode {
    File file; // contient le fichier li� au noeud
    * Constructeur non visible
    private FSNode() {
    super();
    * Constructeur par initialisation
    * @param userObject Object
    FSNode(Object userObject) {
    super(userObject);
    * Constructeur par initialisation
    * @param userObject Object
    * @param newFile File
    FSNode(Object userObject, File newFile) {
    super(userObject);
    file = newFile;
    * Definit le fichier lie au noeud
    * @param newFile File
    public void setFile(File newFile) {
    file = newFile;
    * Renvoi le fichier lie au noeud
    * @return File
    public File getFile() {
    return file;
    public JTree getJTree(){
         return tree ;
    * Constructeur
    * @throws HeadlessException
    public JTreeFolder() throws HeadlessException {
    File[] drive;
    tree = new JTree();
    // cr�ation du noeud sup�rieur
    racine = new DefaultMutableTreeNode("Poste de travail");
    // cr�ation d'un noeud pour chaque lecteur
    drive = File.listRoots();
    for (int i = 0 ; i < drive.length ; i++) {
    FSNode node = new FSNode(drive, drive[i]);
    addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
    racine.add(node);
    // Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
    tree.addTreeExpansionListener(new TreeExpansionListener() {
    public void treeExpanded(TreeExpansionEvent e) {
    // lorsqu'un noeud est ouvert
    // on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
    TreePath path = e.getPath();
    FSNode node = (FSNode)path.getLastPathComponent();
    addFolder(node);
    ((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
    public void treeCollapsed(TreeExpansionEvent e) {
    // lorsqu'un noeud est referm�
    //RIEN
    // alimentation du JTree
    DefaultTreeModel model = new DefaultTreeModel(racine);
    tree.setModel(model);
         setLayout(null);
    // ajout du JTree au formulaire
    tree.setBounds(0, 0, 240, 290);
    scrollpane = new JScrollPane(tree);
         add(scrollpane);
         scrollpane.setBounds(0, 0, 240, 290);
    * Recuperation des sous-elements d'un repertoire
    * @param driveOrDir
    * @param node
    public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    addFolder(driveOrDir, node, 0);
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Recuperation des sous-elements d'un repertoire
    * (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
    * @param driveOrDir File
    * @param node DefaultMutableTreeNode
    * @param level int
    private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
    File[] fileList;
    fileList = driveOrDir.listFiles();
    if (fileList != null) {
    sortFiles(fileList); // on tri les elements
    // on ne cherche pas plus loin que le niveau maximal d�finit
    if (level > MAX_LEVEL - 1) {return;}
    // pour chaque �l�ment
    try {
    for (int i = 0; i < fileList.length; i++) {
    // en fonction du type d'�l�ment
    if (fileList[i].isDirectory()) {
    // si c'est un r�pertoire on cr�� un nouveau noeud
    FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
    node.add(dir);
    // on recherche les �l�ments (r�cursivit�)
    addFolder(fileList[i], dir, ++level);
    if (fileList[i].isFile()) {
    // si c'est un fichier on ajoute l'�l�ment au noeud
    node.add(new FSNode(fileList[i].getName(), fileList[i]));
    catch (NullPointerException e) {
    // rien
    * Recuperation des sous-elements d'un noeud
    * @param node
    public void addFolder(FSNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    for (int i = 0 ; i < node.getChildCount() ; i++) {
    addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Tri une liste de fichier
    * @param listFile
    public void sortFiles(File[] listFile) {
    triRapide(listFile, 0, listFile.length - 1);
    * QuickSort : Partition
    * @param listFile
    * @param deb
    * @param fin
    * @return
    private int partition(File[] listFile, int deb, int fin) {
    int compt = deb;
    File pivot = listFile[deb];
    int i = deb - 1;
    int j = fin + 1;
    while (true) {
    do {
    j--;
    } while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
    do {
    i++;
    } while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
    if (i < j) {
    echanger(listFile, i, j);
    } else {
    return j;
    * Tri rapide : quick sort
    * @param listFile
    * @param deb
    * @param fin
    private void triRapide(File[] listFile, int deb, int fin) {
    if (deb < fin) {
    int positionPivot = partition(listFile, deb, fin);
    triRapide(listFile, deb, positionPivot);
    triRapide(listFile, positionPivot + 1, fin);
    * QuickSort : echanger
    * @param listFile
    * @param posa
    * @param posb
    private void echanger(File[] listFile, int posa, int posb) {
    File tmpFile = listFile[posa];
    listFile[posa] = listFile[posb];
    listFile[posb] = tmpFile;

  • How to select a directory path to inputfield in web dynpro abap?

    Hi,
    Experts,
    I want to select a directory path into a inputfield as like in file_upload  browse button but it select only a file but i want the whole directory to select can i achieve this please suggest me on this.
    Thanks in advance,
    Shabeer Ahmed.

    Currently not possible in Web Dynpro directly. If you are on 7.01, you could use a FlashIsland to acomplish such a thing.  Here is a similiar tutorial.
    https://wiki.sdn.sap.com/wiki/display/EmTech/IslandsWDA_MUploader
    Next year in 7.02, we add a file dialog option to the ACFUpDownload UI element. It can be used as described to only return a directory path using only native WD UI elements.

  • Path for Directory in Selection Screen

    I have one field in selection screen Error log.
    I have to pick path for dirctory in that parameter, so that I can save my error log there on that path.
    how i can do it ?
    F4 for the path is needed. how i will define that parameter in selection screen?

    Hi
    Check the below logic:
    DATA :G_DIR1 TYPE STRING.
    DATA : G_T_FILENAMES TYPE SETST_TYPE_STANDARD_TABLE,
           G_WA_FILES LIKE LINE OF G_T_FILENAMES.
    PARAMETERS: P_FOLDER TYPE RLGRAP-FILENAME OBLIGATORY
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FOLDER.
      PERFORM F1000_GET_DIR.
    START-OF-SELECTION.
      IF G_DIR IS INITIAL.
        G_DIR = P_FOLDER.
      ENDIF.
    PERFORM F1100_GET_FILENAMES USING G_DIR.
    FORM F1000_GET_DIR .
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
        EXPORTING
          WINDOW_TITLE         = 'Folder for ADP Files'
          INITIAL_FOLDER       = G_DIR1
        CHANGING
          SELECTED_FOLDER      = G_DIR1
        EXCEPTIONS
          CNTL_ERROR           = 1
          ERROR_NO_GUI         = 2
          NOT_SUPPORTED_BY_GUI = 3
          OTHERS               = 4.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        P_FOLDER = G_DIR1.
      ENDIF.
    ENDFORM.
    FORM F1100_GET_FILENAMES  USING    P_DIR.
      DATA : L_DIR TYPE STRING,
                L_COUNT TYPE I,
                L_COUNT1 TYPE I.
      DATA : L_T_FILES TYPE SETST_TYPE_STANDARD_TABLE,
             WA_FILES LIKE LINE OF L_T_FILES.
      L_DIR = P_DIR.
      CLEAR : G_T_FILENAMES[], G_T_FILENAMES.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
        EXPORTING
          DIRECTORY                   = L_DIR
       FILTER                      = '.'
       FILES_ONLY                  =
       DIRECTORIES_ONLY            =
        CHANGING
          FILE_TABLE                  = L_T_FILES
          COUNT                       = L_COUNT
        EXCEPTIONS
          CNTL_ERROR                  = 1
          DIRECTORY_LIST_FILES_FAILED = 2
          WRONG_PARAMETER             = 3
          ERROR_NO_GUI                = 4
          NOT_SUPPORTED_BY_GUI        = 5
          OTHERS                      = 6
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      G_T_FILENAMES[] = L_T_FILES[].
      LOOP AT G_T_FILENAMES INTO G_WA_FILES.
        IF G_WA_FILES CS SY-DATUM.
          G_WA_FILES1 = G_WA_FILES.
          APPEND G_WA_FILES1 TO G_T_FILENAMES1.
        ENDIF.
      ENDLOOP.
    Regards,
    Ravinder

  • Both file and directory path selection

    Hi,
    Is it possible to select both file path and directory path from one parameter using F4?If yes how?
    Thanks.
    Edited by: Ginger on Oct 5, 2009 7:51 AM

    >
    Ginger wrote:
    > No...file can be anywhere....file path selection means will have file name(c:\abc.txt) and directory selection means only select 'C:\'
    > from which files can be selected.
    >
    > Now I want to enable both the options in one parameter path.Is it possible?
    AFAIK, it is not possible.
    But you can try a workaround though :-P
    Make two radio-buttons:
    1. Select File (rb_file)
    2. Select Directory (rb_dir)
    Then based on the radio-button call the respective method
    IF RB_FILE = 'X'.
    Call Method CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    ELSEIF RB_DIR = 'X'.
    Call Method CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
    ENDIF.
    BR,
    Suhas

  • Installed new update iTunes Saturday - My file directory could not be found, so reset the directory path, 'it' asked me if I would like 'it' to re organise filing, I selected yes - Many tunes have been duplicated, some have disappeared. Any help?

    Hi,
    Installed a new update iTunes Saturday - My file directory could not be found, so I reset the directory path, and 'it' asked me if I would like 'it' to re organise my filing, foolishly (as a beginner, without checking)  I selected yes - Many tunes have been duplicated, some have disappeared? Trawled through lots of misleading help files, mailed friends, tried many back routes into Apple web sites and they all wasted my time. Can anyone help?
    I have discovered since then, that this resorce has been down over the weekend, which probably explains why I have had so many contradictory responses, so apologies if you all know what the prolem is.
    My question is, my TIME MACHINE (which has not been used yet) was tried but looked nothing like that of the U Tube demo, so I am assuming that it needs setting up, however, it has been saving, I just do not know how to recover the data. Can anyone help?
    Regads,
    Cyfrommayo

    (If you have a Time Machine backup, go to your User folder/Music/iTunes and select iTunes. Enter Time Machine and go to a backup of iTunes before the above happened. Then select 'Restore' on the bottom right.)
    Eric,
    Many thanks for your help.
    Apologies for not being as skilled as you. I am unable to see what you are saying, can I ask, should I be in TIME MACHINE when I go to User folder/Music?iTunes or iTunes or Finder?
    Cyfrommayo

  • Select System's Local Directory Path on Button Click

    Hi All,
    I Have a case where a use needs to give a directory path in
    TextInput.
    I want to replace this with a Browse Button, which when
    clicked need to open a Browe popup to select a Systems Directory
    and the selected Directory Name is written into the TextInput.
    This is the same way that we do in HTML to select a File from
    System.
    How can i achieve this with Flex ?
    Regards,
    Madan N

    Because of security restrictions, the only access you have to
    the local file system is via the FileReference class, which is used
    to upload/download files. Note, you cannot use it to get the file
    path, security again.
    An AIR app does not have this restriction.
    Tracy

  • How to give dynamic file path in the selection  screen

    Hi All,
    How to give dynamic file path f4 functionality to user on the selection so that he can browse for the path in the presentation serve? I believe there is one fun module is there for this purpose I am not getting that
    Please help me in this regard.
    Thanks&Regards
    Mahesh

    HI,
    check this program.
    <b>report ZWA_TEST2.
    PARAMETERS: a(100) default 'PRESS F4'.
    data: filet type table of FILE_TABLE.
    data: wa type file_table.
    data: count type i.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR a.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
      CHANGING
        FILE_TABLE              = filet
        RC                      = count .
    loop at filet into wa.
      a = wa-FILENAME.
    endloop.</b>
    Regards,
    HRA

  • How to select paths with the same stroke width

    I would like to know how to select all the paths inside a document whose stroke width are equal to 0.361 points
    I will appreciate any help.

    here you go
    #target illustrator
    // script.name = selectPathsThisSize.jsx;
    // script.description = selects pathItems that have the same supplied stroke width; limited to 3 decimals;
    // script.required = a document with at least one path item;
    // script.parent = CarlosCanto // 6/5/11;
    // script.elegant = false;
    var idoc = app.activeDocument;
    var strokewidth = prompt ("Enter Stroke Width in points of paths to be selected", 0.361, "Select Paths this size:___");
    for (i=0 ; i< idoc.pathItems.length; i++)
              var ipath = idoc.pathItems[i];
                   if ( (ipath.strokeWidth).toFixed(3) == Number(strokewidth).toFixed(3))
                             ipath.selected = true;
    app.redraw();

  • F4 help for file path in selection screen.

    Hi there,
    I defined one parameter p_path for file path using RLGRAP-FILENAME. I have not got F4 for this. How to solve this problem, can anybody pls help.
    Regards,
    Naseer.

    Hi,
    refer to the following code:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pc.
    DATA: it_tab TYPE filetable,
              wf_subrc TYPE i.
    DATA: wf_pcfile LIKE rlgrap-filename.
      DATA: wf_filter TYPE string,
            wf_dir TYPE string,
            wf_title TYPE string,
            wf_ext TYPE string.
    *  if p_ml = 'X'.                  "Manula Load - PC File
      wf_title = text-012.          "Window title
      wf_ext  = '.TXT'.           "Extension of the file
      wf_filter = 'Text Files (*.TXT)|*.TXT'.         "File Type
      wf_dir = wf_pcfile.           "Directory
    *Adds a GUI-Supported Feature
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title      = wf_title
          default_extension = wf_ext
          file_filter       = wf_filter
          initial_directory = wf_dir
        CHANGING
          file_table        = it_tab
          rc                = wf_subrc.
    Hope this helps.
    <REMOVED BY MODERATOR>
    Regards,
    Sipra
    Edited by: Alvaro Tejada Galindo on Jan 31, 2008 9:48 AM

  • How to select active Oracle ODBC Driver programmatically?

    Hi,
    My application creates ODBC DSN to connect with Oracle 10g database server. I need to find out Oracle Driver installed on the system programmatically. I am trying to read KEY_<PRODUCT NUMBER> registry key and eventually searching ORACLE_HOME value. This helps me in searching Oracle Driver in ODBCINST.INI registry key. (Oracle in OraDb10g_home1)
    If multiple Oracle clients are installed on the same system, multiple KEY_<PRODUCT NUMBER> registry keys and oracle drivers would be available. I am not sure which and how to select the current active oracle driver.
    Oracle in OraDb10g_home1
    Oracle in OraDb10g_home2
    Can anybody help me out? Can I use inventory file (inventory.xml) to determince current active home directory? Reading PATH environment variable to identity active home directory would be tedious.

    Please look at following thread for answer.
    How to select active Oracle ODBC Driver programmatically?

  • Physical file path on the selection screen from AL11 Tcode

    Hi All,
    Please let me know some body how do we give only physical file path(only directory not the file names) on the selection screen?I need to see when I press F4 only the physical file directories of the application server.
    Thanks in advance.
    Mahesh

    Hi,
    This FM will be helpful.....
    F4_dxfilename_toprecursion
    CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
    * EXPORTING
    *   I_LOCATION_FLAG       = ' '
    *   I_SERVER              = '?'
    *   I_PATH                =
    *   FILEMASK              = '*.*'
    *   FILEOPERATION         = 'R'
    * IMPORTING
    *   O_LOCATION_FLAG       =
    *   O_SERVER              =
    *   O_PATH                =
    *   ABEND_FLAG            =
    * EXCEPTIONS
    *   RFC_ERROR             = 1
    *   ERROR_WITH_GUI        = 2
    *   OTHERS                = 3
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Mdi.Deeba Najam.

  • How to create a report with selection screen that can run in background

    Sorry to ask these basic questions but I am knew to ABAP Programming.
    To keep it simply, I am attempting to create a report that has a simple parameter driven selections screen with one field.  That field takes in a folder path from the user.  The user executes the report.  The report creates a simply BDC that goes into SE16, gathers data from a table, and exports the results to a text file using the folder path provided.  I created a variant for the folder path field in the selection screen hoping to use it while executing the report in the background.  The report is not exporting the file as it did when run in the foreground for some reason.
    I am wondering what event is triggered when a report is executed in the background.  In the foreground (or when I execute the program via SE38->Execute->With Variant) the user needs to execute the program by hitting the execute button once the variant has populated the folder path field.  It works then, so I am trying to get the same to work in the background.  I am thinking I didn't put the program together correctly to accommodate the running in the background.  How can you create a report that can accept user input via variant into a selection screen and then run in the background?
    Please, any information would be greatly appreciated.
    Thanks you all for reading this!!!

    Ok, finally I understand what you're doing. Initially you lost me with the SE16 reference...
    Not sure what you're trying to achieve overall, but apart from the fact that you cannot export/download a file to a user's PC via background job (unless you have a mapped network share on the server or something like an FTP server on the user's PC, but both are pretty hypothetical scenarios and unlikely to occur).
    Also, the BDC approach to get data via SE16 is pretty awkward. Note that SE16 is guarded by some authorization checks and often users won't have access in production (which might not matter if you intend to always run your program in background via dedicated batch user). However, I have no clue why you wouldn't want to use [open SQL|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_READING.htm] to read the data. You could then save it on the application server or if you really have to get it to the user you can consider e-mailing the file (extracts should be compressed before sending). For the latter you'll find plenty of references here, basically it's the [business communication services|http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/1c5d3aebba4c38e10000000a114084/frameset.htm] that you'd need to look at.

Maybe you are looking for