Logical & Physical File path

Hi Gyes,
  In selection screen i will enter <b>logical file path</b>.After executing this program i want <b>physical file path for that particular logical file path</b>(input).Is there any function module is there.
Thanks and regards,
  Suresh.

hello,
Use the function Module
Call function  FILE_GET_NAME
CLIENT                          200
LOGICAL_FILENAME    <enter your logical file name>    
OPERATING_SYSTEM                WINDOWS NT
PARAMETER_1
PARAMETER_2
PARAMETER_3
USE_PRESENTATION_SERVER
WITH_FILE_EXTENSION
USE_BUFFER
ELEMINATE_BLANKS                X
Reward points if helps.
Thanks,
Krishna

Similar Messages

  • What is a  Logical and Physical file path in sap?

    what is a  Logical and Physical file path in sap?

    Hi,
    Physical file is what you see from the OS level.
    Logical file is what ABAP code can call certain functions to read/write.
    Transaction FILE would link them together. Typically the logical path ends with "<FILENAME>", and the logical file refers to the logical path.
    To extract the physical path from the logical path name
    DATA: lf_mandt TYPE sy-mandt,
            lf_opsys TYPE sy-opsys.
      lf_mandt = sy-mandt.
      lf_opsys = sy-opsys.
    To extract the physical path from the logical path name
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          client           = lf_mandt
          logical_filename = p_unix
          operating_system = lf_opsys
        IMPORTING
          file_name        = gwa_input
        EXCEPTIONS
          file_not_found   = 1
          OTHERS           = 2.
      IF sy-subrc EQ 0.
      Concatenating the physical path and the input unix file name
        CONCATENATE gwa_input p_file INTO gf_file .
      ENDIF.
    Reward if helpful.
    Regards,
    Ramya

  • Logical and physical file paths

    Hi,
    can anyone elobrate me  on what are logical and physical file
    paths ?

    hi,
    Follow this link
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3deb358411d1829f0000e829fbfe/frameset.htm
    File format determination (Required / optional fields and field checks).
    Logical File Path configuration through transaction 'FILE'. A new physical file path should be created on operating system level or an existing one can be used if agreed. The Basis team member should create a new file path at operating system level, if required.
    Hope this helps, Do reward.

  • Difference between logical file path and physical file path

    Hi,
    Can anyone tell me why logical file path is required and why physical file path is required? What exactly is the difference bet them?
    Thanks in advance.
    Regards,
    PS.

    Hi,
    The function module FILE_GET_NAME convert a logical path into its corresponding physical path.
    The advantage of using logical pathes within your applications is obivous:
    If you need to change the physical path you just adjust it within transaction FILE yet no changes are required to your application.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/25/ab3a57df3b11d189fc0000e829fbbd/frameset.htm
    The file names that you use in ABAP statements for processing files are physical names. This means that they must be syntactically correct filenames for the operating system under which your R/3 System is running. Once you have created a file from an ABAP program with a particular name and path, you can find the same file using the same name and path at operating system level.
    Since the naming conventions for files and paths differ from operating system to operating system, ABAP programs are only portable from one operating system to another if you use the tools described below.
    To make programs portable, the R/3 System has a concept of logical filenames and paths. These are linked to physical files and paths. The links are created in special tables, which you can maintain according to your own requirements. In an ABAP program, you can then use the function module FILE_GET_NAME to generate a physical filename from a logical one.
    Maintaining platform-independent filenames is part of Customizing. For a full description, choose Tools ® Business Engineer ® Customizing, followed by
    Implement. projects ® SAP Reference IMG. On the next screen, choose Basis Components System Administration ® Platform-independent File Names.
    For a more detailed description of the function module FILE_GET_NAME, enter its name on the initial screen of the Function Builder and choose Goto Documentation. On the next screen, choose Function module doc.
    Another way of maintaining platform-independent filenames is to use the Transaction FILE. The following sections provide an overview of the transaction.
    To create a logical filename, choose Logical filename definition, client-independent from the Navigation group box in Transaction FILE, then choose New entries. You define logical filenames
    You can either define a logical filename and link it to a logical path (as displayed here), or you can enter the full physical filename in the Physical file field. In the latter case, the logical filename is only valid for one operating system. The rules for entering the complete physical filename are the same as for the definition of the physical path for the logical file. To display further information and a list of reserved words, choose Help.
    If you link a logical path to a logical file, the logical file is valid for all syntax groups that have been maintained for that logical path. The filename specified under Physical file replaces the reserved word  in the physical paths that are assigned to the logical path. To make the name independent of the operating system, use names that begin with a letter, contain up to 8 letters, and do not contain special characters.
    Save your changes.
    regards,
    Omkar.

  • Diff between logical and physical file path

    Hi ,
    Could you please explain difference between logical and physical file path's and their importance in ABAP.
    Thanks and regards,
    shyla

    Hi
    The function module FILE_GET_NAME convert a logical path into its corresponding physical path.
    The advantage of using logical pathes within your applications is obivous:
    If you need to change the physical path you just adjust it within transaction FILE yet no changes are required to your application.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/25/ab3a57df3b11d189fc0000e829fbbd/frameset.htm
    The file names that you use in ABAP statements for processing files are physical names. This means that they must be syntactically correct filenames for the operating system under which your R/3 System is running. Once you have created a file from an ABAP program with a particular name and path, you can find the same file using the same name and path at operating system level.
    Since the naming conventions for files and paths differ from operating system to operating system, ABAP programs are only portable from one operating system to another if you use the tools described below.
    To make programs portable, the R/3 System has a concept of logical filenames and paths. These are linked to physical files and paths. The links are created in special tables, which you can maintain according to your own requirements. In an ABAP program, you can then use the function module FILE_GET_NAME to generate a physical filename from a logical one.
    Maintaining platform-independent filenames is part of Customizing. For a full description, choose Tools ® Business Engineer ® Customizing, followed by
    Implement. projects ® SAP Reference IMG. On the next screen, choose Basis Components System Administration ® Platform-independent File Names.
    For a more detailed description of the function module FILE_GET_NAME, enter its name on the initial screen of the Function Builder and choose Goto Documentation. On the next screen, choose Function module doc.
    Another way of maintaining platform-independent filenames is to use the Transaction FILE. The following sections provide an overview of the transaction.
    To create a logical filename, choose Logical filename definition, client-independent from the Navigation group box in Transaction FILE, then choose New entries. You define logical filenames
    You can either define a logical filename and link it to a logical path (as displayed here), or you can enter the full physical filename in the Physical file field. In the latter case, the logical filename is only valid for one operating system. The rules for entering the complete physical filename are the same as for the definition of the physical path for the logical file. To display further information and a list of reserved words, choose Help.
    If you link a logical path to a logical file, the logical file is valid for all syntax groups that have been maintained for that logical path. The filename specified under Physical file replaces the reserved word  in the physical paths that are assigned to the logical path. To make the name independent of the operating system, use names that begin with a letter, contain up to 8 letters, and do not contain special characters.
    Save your changes.

  • Assign Logical file name for the physical file path through Program

    Hi all,
    I am having a physical file which is getting generated dynamically. It is having the date and time stamp in its name which is added at runtime.
    Now I need to assign a logical file name for the physical file path through the program.
    Is there any FM or any other method to assign the same.
    Gaurav

    I think it is not possible. becuase the date & time added at runtime. so if you check the table  PATH you can find filename and their definitions

  • How to get physical file path from logical file path

    Hi
    there is a immediate requirement ,
    I have logical file path but I need to get physical file path from it.
    So is there any FM which providesthis functionality.
    Points will be rewarded.
    Thanks

    Can you please share the piece of code ?
    Which File APIs are you using ?
    For java file, you can get complete path by simple method call : getAbsolutePath() on file object.
    Regards,
    Ashwani Kr Sharma

  • Table or function module from for complete physical file path?

    Hi All,
    I know the Logical file and Logical path name, i can see the complete path also from logical path name i.e. the physical file address through transaction FILE, e.g. /USR/TMP/ , but i want to display this path in one of the report output,
    so please help me with the table or the function module which can give me the complete physical file path.
    I checked the the table ADMI_FILES but it contains the file name or the Logical path name but the complete physical file address e.g /USR/TMP?, like this is not available. More over i tried function module file_get_name, still the physical address is not correct one, it is giving same address for all logical paths.
    Kindly Guide me for this
    Regards,
    Nikesh Kumar

    try sth like this:
        CALL FUNCTION 'FILE_GET_NAME_AND_LOGICAL_PATH'
          EXPORTING
            LOGICAL_FILENAME = LDS_NAME
                IMPORTING
            FILE_NAME        = sfile
            LOGICAL_PATH     = pth
          EXCEPTIONS
            FILE_NOT_FOUND   = 01.
        IF SY-SUBRC NE 0.
          MESSAGE E300(BD) WITH LDS_NAME.                         " TODO MG
        ENDIF.
                                                                                    SELECT single PATHEXTERN FROM path INTO expth
               where pathintern = pth.
        replace '<FILENAME>' with space into expth.
        concatenate expth '/' sfile into sfile.
        open dataset sfile for output in text mode encoding default.
    A.

  • Data Archival : No physical file path can be generated

    Dear all,
    When i tried to archive a data in ERP i got the below error.
    No physical file path can be generated for the logical file path
    I want to store the archival data in local hard disk. For which i have given the Win NT path alone in logical path.
    Kindly help me to solve this.
    Regards,
    Aishwarya.

    Errors from SM21:
    EFW > No job count can be generated for job BI_PROCESS_LOADING
    - During the values check for background processing, the attempt to    
    generate a unique JOBCOUNT for the specified job failed because there
    are more than 99 entries with the same JOBNAME / JOBCOUNT ID. Forward
    this syslog entry to SAP.                                            
    EG7 BP_JOB_CREATE: Job cannot be generated. Reason:           
    EGA > Job BI_PROCESS_LOADING contains invalid data

  • A column in a table has physical file path (I want to get file size of those docs from the OS)

    Experts!!
    I have a table that holds the physical file path of files in one of its columns. It does not give a link, just the physical file path.
    For example,---- C:\bu\test.pdf   and let us say the file size is kb according to the OS.
    Is there any way I can obtain the file size of the files from the physical path?
    for example, the file size of the test.pdf file in the example here using t-SQL?
    Much Appreciation
    ebro

    Hey there... thanks for the response......I found the following as a solution for my problem. But my problem is the SP created using the method needs a directory as a parameter. How can I pass the directory from a table that holds my directory?
    EXEC  [dbo].[GetListOfFileWithSize](@Dir)
    How do I pass the directory from my table?
    http://stackoverflow.com/questions/7952406/get-each-file-size-inside-a-folder-using-sql/7958070#7958070
    ebro

  • 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.

  • Create a dynamic physical file path in FILE tcode

    Hi ,
    I have a requirement where i need to create a file on application server. the physical path depend on the month in which it is executing.
    For example I have a file with the name 29082011_hh:mm:ss.dat.
    This file should be stored in the directory file015\FI\appl\Aug\.
    So i require to create the logical file path as file15\Fi\appl\<month>\<filename>
    My question is do we need to maintain the folders for all the months in AL11 or it can be generated at runtime
    Plz reply

    You must create the directories beforehand.

  • Logical file path problem in lsmw

    Hi folks,
    I created logical file  path in FILE tcode. its created and assigned physical file path to logical file path.
    then i am assigning that logical file path into lsmw step (specify file step).
    under specify file i am assigning into import data and convert data.
    once read data step completed read data must be save under this physical file but data is not saving under this path.
    can any one help me out this..
    1.can any one help how to create physical file in file tcode
    2.how to assigne that physical file to lsmw step specify file

    Hi Srikanth,
    There is no need to create the logical file path using the FILE transaction.
    Under Specify file step, you need to give your local file path in LEGACY DATA Section.
    Please check the below link in using the LSMW step by step.
    http://wiki.sdn.sap.com/wiki/display/ABAP/LSMWStepsin+Detail
    Hope this helps.
    Regards,
    Satish Kanteti

  • Create logical file path and read it in main program

    Hello Experts,
    My requirement is, I have to read files from application server.
    File path/ Directory is different in different system (systid). i have to read all files starting with (xyz*) from mentioned directory.
    This path i must define in logical path.
    Following are the steps i followed.
    1)   In FILE (TCODE) i have created a logical path and assigned a physical path to it.
    2)   I have created logical file ( I am not sure about this, as i dont have to create logical file, i just need to read file from above path starting with xyz*,  but FM FILE_GET_NAME requires logical file name so i have created it).
    3) I will pass logical file name to FM FILE_GET_NAME and recieve physical file path(with file name which i can ignore).
    these all steps i found on SDN. but its not working.
    FM FILE_GET_NAME is always returning same file path ( Not even close to what i have defined ).
    I can not read data from Table path as it will return physical path as it is, but i need it replaced with system id.
    Any suggestion will be really helpful.
    Thanks in Advance.
    Regards,
    Amar

    Hi Amar,
    one difficulty defining physical path name is to know the right Syntax group.
    For example if you habe OS Linux, you need Syntax Group UNIX here. In Table OPSYSTEM you can see, which OS (OPSYS) needs which FILESYS (Syntax Group).
    If you always get a wrong physical path, this may be caused ba a wrong choice of the Syntax Group. Only the correct one will lead to the correct path.
    Regards,
    Klaus

  • Function module for logical file path and name

    Hello all,
    I am wondering is there any function module available to translate a logical file path to a physical file path and a logical file name to a physical file name? Thanks a lot!
    Regards,
    Anyi

    Please check the FM FILE_NAME_GET.
          CALL FUNCTION <b>'FILE_GET_NAME'</b>
             EXPORTING
               logical_filename = 'ZDELCHKREP'
               parameter_1 = it_cntry-cntry
             IMPORTING
               file_name        = l_file
             EXCEPTIONS
               file_not_found   = 08.
        CALL FUNCTION <b>'FILE_GET_NAME_USING_PATH'</b>       EXPORTING
             logical_path = 'ZDELCHKREP'
             file_name = l_file
           IMPORTING
             file_name_with_path = l_file.
    Message was edited by: Anurag Bankley
    Message was edited by: Anurag Bankley

Maybe you are looking for

  • How do I add a google searchbox to the top bar?

    I have the beta test version of Firefox and my Google toolbar is not compatible. I now how no search box in my toolbar, and want a Google one, and cannot find how to do it. This is on my work PC. On my home Mac, the Google search box disappeared and

  • Documents/Commentary

    Hi everyone, We would like to implement a solution which provides them with the functionality to add Commentary and Annotations to BW Reports when they enter data manually via BPS and to have these documents displayed inline with the web report. SEM/

  • "sort by" in Preview

    Is there a way to get Preview to automatically sort multiple images by filename? I had used Preview on my PowerBook G4 for years with no problems viewing images (OS X 10.3.x), but now that I've got a new MacIntel with 10.4.7, whenever I open multiple

  • Preview slideshow pixelated

    I've just upgraded from Snow Leopard to Mountain Lion, and I'm trying to figure out how to recover proper image scaling during slideshows. When the option to scale images to fit the entire screen was selected in Snow Leopard, the images were well sca

  • TRANSPORTS AFTER TDMS

    Hi Experts, I would like to know how transports are taken care during TDMS & after TDMS. I hope TDMS process will clear the receiver system & will have the client independent data & repository. 1) How is transport handled when a request has to be mov