Usage of logical name, logical path name, physical name of a file

Hi all,
I have to write to a file on the application server. I had been given the logical name, logical path name and physical name. Suggest how to use these parameters and get the path where to store the file.
Thanks & Regards,
Kasinath.

Open Dataset
  catch system-exceptions DATASET_CANT_OPEN = 8.
    open dataset UNIX_FILE for output in text mode encoding default.
  endcatch.
Write to Dataset
  loop at IT_STR into IS_STR.
    catch system-exceptions DATASET_NOT_OPEN = 0  .
      transfer IS_STR-STR to UNIX_FILE.
    endcatch.
  endloop.
  if SY-SUBRC eq 0.
    message S138(ZSM) with 'Data Downloaded to Unix File'.
  endif.
Close Dataset
  close dataset UNIX_FILE.
Regards
- Gopi

Similar Messages

  • What are Logical patha nd physical paths?

    Hi all,
    When i am uploading Material master data through LSMW i am getting Error like The Logical file name LSMW_* ....is not created.
    What are this Logical files and i know these are Created by FILE tCode.
    My question is why we need this file and it asking Logical path aslo and what is this Logical path and physcal path??
    i did't not understand in SAP help link .
    Thanks ,
    Madhu

    Hello,
    Logical File path name is used to Map the physical path of the application server.
    You can also access the file from the application server by directly passing the physical path as you convert the logical file name to physical path in your program.
    I know you have read the SAP help documentation, but still may be this link can also help you.
    [http://help.sap.com/saphelp_nw04/helpdata/en/8d/3e4ec2462a11d189000000e8323d3a/frameset.htm]
    Thanks,
    Jayant

  • Logical File name of Transaction File

    Hi All,
    I am using FILE_NAME_GET function module to get the Physical file name based on logical file name.
    But here i am not getting total file name, i maintained Physical File name as ZDM\INTB18\<PARAM_1>.
    Transaction File is stored in application server and it's name is ZDM\INTB18\RMCB18_DATETIME.
    Could you please anybody suggest how to get total file name.
    Thanks,
    Rami Reddy.

    Hi Rami,
    Have you utilised the Parameter WITH_FILE_EXTENSION in the function ... e.g.
    Example
    logical file name: MONTHLY_SALES_FILE
    physical file name: VALUES<PARAM_1>
    logical path: SALES_DATA_PATH
      physical path (Windows): C:\SALES\<FILENAME>
    Get file name for WINDOWS platform, with file name extension
    CALL                                                                                FUNCTION                                                                                'FILE_GET_NAME'
       EXPORTING
          LOGICAL_FILENAME = 'MONTHLY_SALES_FILE'
          WITH_FILE_EXTENSION = 'X'
       IMPORTING
          FILE_NAME = FILE
          FILE_FORMAT = FORMAT.
    Result:
    FILE = C:\SALES\VALUES.WK1
    FORMAT = WK1
    Rgds, Derrick

  • How to create a logical and a physical path?

    Hi ,
    I want to know how is  a logical path created ?
    Also , how can a physical path be created from a provided logicall path?
    Regards,
    Harshit Rungta

    Hi,
    Use FM u2018FILE_GET_NAMEu2019 to assign the physical file name using a logical file name.
    Remember you need to create u2018logical file nameu2019 using transaction u2013 FILE.
    R/3 applications run on various platforms with various file systems. Hence we use platform-independent logical file names in our application programs.
    Function module u2018FILE_GET_NAMEu2019 converts a logical file name to the corresponding physical file name and path for the hardware platform concerned.
    For this conversion to work for different platforms, the definition of a logical file name must include a logical file path, which in turn is converted to different physical file paths, depending on the particular platform. The platform-specific file name returned by the function module is composed of the physical file path for the current platform and the physical file name associated with the logical file name. Placeholders in physical file and path names are substituted at runtime by the corresponding current values.
    Example
    logical file name:     MONTHLY_SALES_FILE
    physical file name:     VALUES<PARAM_1>
    logical path:     SALES_DATA_PATH
    physical path (UNIX):     /usr/<SYSID>/<FILENAME>
    physical path (Windows):     C:\SALES\<FILENAME>.
    Kind Regards,
    Nikhil J.

  • Logical File creation in Logical path

    Hi all,
    I am after an info, how to create different logical file name in the same physical path.
    Suppose I have physical path: X/claims/interface/outbound which is assigned to logical path LP
    Now under this path I want to store some logical file say 1, 2, and 3
    What would be the naming convention? & how to do it?
    Any help would be highly appreciated.
    Regards,
    Kironmoy Banerjee.

    Hi,
    Use FM u2018FILE_GET_NAMEu2019 to assign the physical file name using a logical file name.
    Remember you need to create u2018logical file nameu2019 using transaction u2013 FILE.
    R/3 applications run on various platforms with various file systems. Hence we use platform-independent logical file names in our application programs.
    Function module u2018FILE_GET_NAMEu2019 converts a logical file name to the corresponding physical file name and path for the hardware platform concerned.
    For this conversion to work for different platforms, the definition of a logical file name must include a logical file path, which in turn is converted to different physical file paths, depending on the particular platform. The platform-specific file name returned by the function module is composed of the physical file path for the current platform and the physical file name associated with the logical file name. Placeholders in physical file and path names are substituted at runtime by the corresponding current values.
    Example
    logical file name: MONTHLY_SALES_FILE
    physical file name: VALUES<PARAM_1>
    logical path: SALES_DATA_PATH
    physical path (UNIX): /usr/<SYSID>/<FILENAME>
    physical path (Windows): C:\SALES\<FILENAME>.
    Santosh
    Edited by: Santhosh Nagaraj on Sep 30, 2009 2:45 PM

  • LSMW - No logical path specified

    Hi Experts,
    Am developing a Project to upload the data, so, am using spread sheet from my C drive..........but, am getting the following error,
    No logical path specified
    Message no. /SAPDMC/LSMW_OBJ_060046
    So, pls, let me know that,
    1 - How to fix it?
    2 - Why its throwing?
    thanq

    In the "Specify files" step, you see following 3 nodes: Legacy Data, Read Data & Concerted data.
    Double click on Converted data where you get a popup & you need to mention the logical path & Logical file name. ( Normally LSMW will be the logical path & specify the same path as presentation server path / File.
    If you do not have a logical path - LSMW, create one with tx: FILE.
    Regards.

  • ABAP development - Using Predefined Logical Path

    Hi,
    I need to save content of a table to a flat file which i am doing in my ABAP code  these files can be very large ,  What i want to know is chosing a folder location for these file i want to use predefined Logical path for this so that the ABAP code should work on any SAP System , So my question is which Predefined  Logical Path to use for storing these file  ? as the data is not specific to any set of tables it can be any table . Any standards needs to be follwed here
    on my system i checked there are 50+ Logical Path ( Predefined ).
    Any suggestions
    Edited by: Sourabhr on Jan 21, 2010 1:58 PM

    hey,
    Thanks for your reply.
    Instead of using logical file name as input, can we allow the user to select logical path using parameter?
    I want user to select Logical path or logical file name from parameter. is it possible?
    (I want to avoid user to input insteal want to allow user to select the path)
    ambichan
    Message was edited by: ambi chan

  • Regarding the Logical Path and file name

    Hi all ,
    I am using LSMW for creating  the BOM of a material .
    I am getting problem at step 7 , saying the logical path is pointing to physical directory .
    Then i did some R & D . I created the logical path and logical file name using transaction FILE . Then i got the physical path using FM file_get_name.
    But when i give those logical path and logical file names , still i am getting prob.... at step 7 of lsmw.
    Pls let me know . I did my best unti l now ....
    Regards

    Hi Raj,
    Can you send the Error which you got at Step 7??
    It would be of great help if you can send the File Path and the file names you have used.
    Regards,
    -Syed.

  • Logical file name or logical path name incorrectly defined

    Dear All,
    We are doing archival in our IDES for test purpose before we do it to our Production.
    Steps Performed
    Copied AM_ASSET archive object to ZAM_ASSET
    Logical Path
      Logical path    ZAM_ASSET
      Name            Asset
      Syntax group    UNIX       Unix compatible
      Physical path   /archive/test/<FILENAME>
    Logical File Name
       Logical file    ZAMASSET
       Name            Asset
       Physical file   FI_<MONTH>_<DAY>.txt
       Data format     ASC
       Applicat.area   AM
       Logical path    ZAM_ASSET
    But when we run the WRITE though SARA , in the job log we get the following
    Logical file name or logical path name incorrectly defined
    When generating a file name for an archive file that is to be created, the system determined that the logical file name FIAA_ARCHIVE_DATA_FILE or the logical path name ARCHIVE_GLOBAL_PATH  was defined incorrectly.
    But we have maintained a Logical name  ZAMASSET , so we are unable to change the location of archived file and as well as the format.
    So is there any setting we need to maintain apart from the logical file name and logical file path.
    Suggestions are highly appreciated.
    Thanks in anticipation

    hi,
    follow this steps :
    - transaction SARA
    - enter authorization objects, eg SD_VBAK
    - hit button CUSTOMIZING
    - Archiving Object-Specific Customizing: execute Technical Setting
    - field Logical File Name enter or select ARCHIVE_DATA_FILE
    - leave CONTENT REPOSITORY as blank if you are not using 3rd party for storing (eg. IBM Tivoli)
    - back to customizing
    - from Basis Customizing, execute : Cross-Client File Names/Paths
    - on Logical FIle Path Definition, highlight (select) ARCHIVE_GLOBAL_PATH on the right pane
    - double click on the Assignment of Physical Paths to Logical Path on the left pane
    - double click on OS used, eg. UNIX, define Physical Path where archive file (on WRITE process) will be stored
    - save changes made
    - double click Logical File Definition, Cross Client on the left pane
    - double click ARCHIVE_DATA_FILE on the right pane
    - make sure that logical path is already set to ARCHIVE_GLOBAL_PATH
    - save changes made
    this setting also can be done using transaction FILE
    we have experienced on this case using SAP standard archiving (SARA, SARI) and everything is fine with this setting above.
    hope it help you.
    rgds,
    Alfonsus Guritno

  • Logical Path and File Name

    Hi Everybody,
    How could I check the actual value of 2 variables which I defined with transaction \nFILE for the Logical Path and the logical file name?
    Background to this question is that I am experiencing problems in using them and want to check if the variables have correct values.....
    Thanks in advance
    FedeX.

    Hi FedeX,
    Did not get exactly what you wanted.
    May be you can try this: You can check the varibale values in the table V_PARAMVAL.
    Bye
    Dinesh

  • Definnig logical path and file names

    hallow experts,
    i wont to now about definnig logical path and file names,
    did some one have something that can help me in that
    regards

    Hi Rodrigo,
    Have a look at this link... i guess it explains what you are looking for...
    http://help.sap.com/saphelp_47x200/helpdata/en/8d/3e4ec2462a11d189000000e8323d3a/content.htm
    regards,
    Naveen

  • Mapping logical path valid name

    We have existing mappings with "." in logical path name such
    as www.test.com
    However, when we try to create a new mapping with "." in them
    we get a coldfusion error that states:
    Please enter a valid name for the mapping
    Is it possible to include characters such as "." in a logical
    path? If so, how? If not, how did the existing mappings get
    setup?

    Mappings with be the full path on the server, such as
    c:\website\sitefiles\ and the name is just one word normally (
    /mapping ). URLs are not a good thing to try to map.

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

  • Physical and Logical path

    Hello,
    what is a physical file and logical file in PATH table of SAP.
    Plz help,
    aafaq

    Hi aafaqhusain,
    1. logical file path is nothing but a    IDENTIFIER/STRING/NAME
    = the name by which
       we refer to that file.
      (in our programs)
    2. The physical location of that file,
       may change from server to server,
      or from time to time.
      (hence, we do not use hardcoded physical path,
       in our programs,
       but instead use this MAPPING of logical path,
      to the physical path)
    regards,
    amit m.

  • Directory logical path to directory physical path

    Hello experts,
    I have question related to getting path from defined earlier logcal path in FILE transaction.
    I know there are FMs called 'FILE_GET_NAME' and 'FILE_GET_NAME_AND_LOGICAL_PATH' but they are not solving my problem.
    Let's say I know only physical file name and logical file directory, but I don't know the full physical path of file.
    I now want to build a program where user writes down the physical name of the file and in the code side there is defined logical file directory from which we can get the physical directory path and concatenate it with entered filename. Is there a possibility to do that?
    Thank you in advance.
    Best regards,
    Andrew

    function module FILE_GET_NAME_USING_PATH is doing exactly that.

Maybe you are looking for