LOGICAL FILENAME / TCODE FILE

In a selection screen I have put a parameters called p_log type fileintern.
I'd like to read this file, is there any function module that would help me to do this or should I use open dataset....
what if the name look like this
<system>\hello.txt
thanks 4 the help

Hi,
  If you looking a FM to get the physical file name for a logical file then use the FM FILE_NAME_GET..
  If you want to get the file value..Check this code..
DATA: v_buffer(2047) TYPE c.
DATA: BEGIN OF i_buffer OCCURS 0,
       line(2047) TYPE c,
      END OF i_buffer.
Open the unix file..
OPEN DATASET p_unix FOR INPUT IN TEXT MODE.
IF sy-subrc NE 0.
  DO.
    CLEAR: v_buffer.
    READ DATASET p_unix INTO v_buffer.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.
    MOVE v_buffer TO i_buffer.
    APPEND i_buffer.
  ENDDO.
ENDIF.
Thanks,
naren

Similar Messages

  • Unable to see the logical path and file created in FILE tcode from AL11 and unable to upload the file to this path from front end

    Hi Experts,
    I have created the logical path and filename in FILE tcode.I am trying to upload the pdf file to application server by using this path.But
    I am getting message like "Unable to open the file".Even I cannot find the this path in AL11 tcode.Kindly anyone advise how to upload pdf file using
    custom path and file created from FILE tcode.
    Thanks & Regards,
    Anusha.

    Hi Anusha,
    Please give as below.
    I forget to say you cannot open the PDF in AL11 and for that you need some configuration, i think it can be done using content server,not sure completely please wait for some more suggestions.
    Regards,
    Pavan

  • InfoSpoke Flat File Extract to Logical Filename

    I'm trying to extract data from an ODS to a flat file. So far, I've found that the InfoSpoke must write to the application server for large data volume. Also, in order for the InfoSpoke to transport properly, I must use logical filenames. I've attempted to implement the custom class and append structure as defined in the SAP document "How To... Extract Data with OPEN HUB to a Customer Defined Logical Filename". I'm getting an error when attempting to import the included transports (custom class code). It appears to be a syntax error. Has anyone encountered this, and, if so, how did you fix it?

    Hello.
    I'm getting a syntax error also.  I did not import the transport, but applied the notes thru the appendix.  When I modified the method "GET_OBJECT_REF_INT" in class CL_RSB_DEST as below, I get a syntax error on the "create object" statement.
        when rsbo_c_desttype_int-file_applsrv.
    *{   REPLACE        &$&$&$&$                                          1
    *\      data: l_r_file_applsrv type ref to cl_rsb_file_applsrv.
          data: l_r_file_applsrv type ref to zcl_rsb_file_logical.
    *}   REPLACE
          create object l_r_file_applsrv
            exporting i_dest    = n_dest
                      i_objvers = i_objvers
    Class CL_RSB_DEST,Method GET_OBJECT_REF_INT
    The obligatory parameter "I_S_VDEST" had no value assigned to it.

  • Logical filename and logical path in lsmw

    Hi all,
           I am doing a lsmw for purchasing info record . i created a logicalpath and assigned a physical path to that . i created a logical filename and assigned the logical path .but when i assign that to the lsmw it is throwing error as 'LOGICAL PATH DOES NOT POINT TO PHYSICAL DIRECTORY' .
    can anybody provide a solution for that .
    Thanks & regards
      Magesh anandan

    hi ,
      goto the tcode file then u find the relation between the logical and physical paths ...and their assignment..
    hope it will helps u..
    regards,
    venkat.

  • APD, filename for file data target

    Hello,
    i am designing a APD process  with a file as process target.
    I can hardcode the file path and name in the data target properties, however i would rather set the filename by user input or by a abap routine (eg. include the date of APD execution in the file name). Is that possible?
    Thanks in advance

    Hi,
    You can use the option 'Logical File Name' option to create a dyanmic file name.
    You can define a Logical File Name in tcode 'FILE', where you can append system date, time, varaible to a static file name.
    Hope this helps.

  • Use of tcode file

    what is the use of tcode file????
    what is platform independent file name????

    Platform Independent File path: The actual (Physical) file name/path is always dependent on hardware and OS of the system. Now In this transaction define a Logical name of a file and map it to your specific system specific actual path.
    Now in your coding you can use the logical name. When you use the same come in a different system you need not change the logical name to everywhere you have coded. The Logical name will be same, only in FILE transaction you will change the mapping of Logical File name to actual file path.
    Check the following Link :
    http://help.sap.com/saphelp_erp2005/helpdata/EN/8d/3e4edc462a11d189000000e8323d3a/frameset.htm
    Example:
    Suppose in your application server you created a file and give a logical name as AIRS_PATH. But when you want to access the file you need to know the actual physical path to it. That path may be ‘c:\temp\<FILENAME>’. Now in FILE transaction you mapped AIRS_PATH to c:\temp\<FILENAME>.
    So whenever you try to access AIRS_PATH, the system know that you want to access the c:\temp\<FILENAME>.
    Now may be you want to run your code in a different system and different hardwre. And the file is stored there in ‘c:\temp\temp1\<FILENAME>’ path. So then in that system you need to map AIRS_PATH with ‘c:\temp\temp1\<FILENAME’.
    Now while coding you are not actually familiar or bother the actual file path. You will do your coding based on AIRS_PATH. And that is same in all the system only the mapping need to change. Thus you can achieve the system independence.

  • Rendering xml-table into logical filename in SAP R/3

    Hi,
    I am trying to translate an xml-table with bytes into a logical filepath in SAP R3.
    Do I have to use the method gui-download or shall I loop the internal xml-table?
    When I tried to loop the xml-table into a structure, and then transfering the structure into the logical filename, I get problems with the line breaks in my xml-file. How do I get the lines to break exactly the same as I wrote them in my ABAP-code?
    Edited by: Kristina Hellberg on Jan 10, 2008 4:24 PM

    I believe you posted in the wrong forum.
    This forum is dedicated to development and deployment of .Net applications that connect and interact with BusinessObjects Enterprise, BusinessObjects Edge, or Crystal Reports Server. This includes the development of applications using the BusinessObjects Enterprise, Report Application Server, Report Engine, and Web Services SDKs.
    Ludek

  • 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

  • Infospoke - How to single Logical Filename for all infospokes

    Hello all,
    I want to only have one logical path and logical filename for all of my infospokes.
    For example if I have infospokes ZAAA, ZBBB, ZCCC, I want to have only one common setting in the destination properties of TC:RSBO but three different distinguishable files on my OS.
    I think with the standard settings, I have to make one logical file for every infospoke I have.
    I am aware that I can put <DATE> or <TIME> etc in the logical file settings but that will not distinguish which infospoke the file came from.
    I want my file to look more like <INFOSPOKE>_<DATE><TIME>.csv
    I've already seen the document "How to Extract Data with OPEN HUB to a Logical Filename"  and this is not it because I have BW3.5 and 3.5 already does what this article says.
    Any help would be greatly appreciated.
    Just in case, I am on BW3.5 SP17 on Windows/SQL.

    Jasprit,
    Thanks for your input.
    The functionality of the FM you said is similar to the InfoSpoke functionality...
    Is it the same thing?
    I wonder if I use this it means it is not part of the InfoSpoke license...
    I will have our programer look at it and see what he thinks but in the mean time any other information is greatly appreciated.  Especially if I can stick with using the standard InfoSpoke functionality...
    Isn't this kind of functionality something that everyone wants?
    I wonder why SAP didn't make it like this?

  • How to set logical filename..

    Hi i have to set the logical filename in the output screen in by which my report should pick the files from the specified location
    can anybody tell how should i set the logical file name...
    thanks.

    Hi,
    Check this FM,
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
    *   CLIENT                        = SY-MANDT
        logical_filename              =
    *   OPERATING_SYSTEM              = SY-OPSYS
    *   PARAMETER_1                   = ' '
    *   PARAMETER_2                   = ' '
    *   PARAMETER_3                   = ' '
    *   USE_PRESENTATION_SERVER       = ' '
    *   WITH_FILE_EXTENSION           = ' '
    *   USE_BUFFER                    = ' '
    *   ELEMINATE_BLANKS              = 'X'
    * IMPORTING
    *   EMERGENCY_FLAG                =
    *   FILE_FORMAT                   =
    *   FILE_NAME                     =
    * EXCEPTIONS
    *   FILE_NOT_FOUND                = 1
    *   OTHERS                        = 2
    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,
    Vik

  • Change Logs for TCODE -- FILE

    Hi Friends,
        Please help me in finding the change logs  for the TCODE  FILE,
        i.e  The changes made to the Logical paths
       I had tried  Utilities---->change logs , but unfortunately i cannot find any changes logs
       But there are changes made to the logical paths in my system but i cannot see them in change logs
    thanks
    chandrasekhar j

    rec/client is a profile parameter, you can view the settings in transaction RZ10.  However I find program RSPARAM more useful, the report lists all system parameters with their default and altered value.  Also if you double-click on a parameter you can get to the full help text for its meaning.
    The parameter essentially switches on table change logging for configuration tables (based on the technical settings of the table) and has to be set before the changes are made.
    Hope this helps.
    Nick

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

  • Reg:  where used list for the any logical (or) physical files

    Hi
    Is there any possible way to check the where used list for the any logical (or) physical files (Tcode: FILE)
    Please let me know.

    if the path is hard coded in the program...
    you can use : RPR_ABAP_SOURCE_SCAN to scan the system and find out where its hard coded....

  • Extract Data with OPEN HUB to a Logical Filename

    Hi Experts,
    Can anybody help me in sending the link for How to guide...Extract Data with OPEN HUB to a Logical Filename?
    Thanks in advance.
    BWUser

    Hi,
    check this links...
    http://searchcrm.techtarget.com/generic/0,295582,sid21_gci1224995,00.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e698aa90-0201-0010-7982-b498e02af76b
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1570a990-0201-0010-1280-bcc9c10c99ee
    hope this may help you ..
    Regards,
    shikha

  • Why we create Logical filename what is the significance.

    Hi Friends,
           What is the use of Logical file name. Where we use it.
    Thanks&Regards,
    Naren.

    importance of LOGICAL FILE :
    lets say we are in development server and the application files are in /int/<b>D01</b>/...../temp/file1
    to read the file FILE1 above ,we have to give total path(we call it as PHYSICAL PATH) to the OPEN DATASET statement.
    lets say we are working in the production server and the same file may be in different location. to read the file,again USER has to give the total path.then only OPEN DATASET can find the file.
    /int/<b>P01</b>/...../temp
    if we use LOGICAL PATH,
    we are creating a logical path for a particular physical path.
    lets say
    zlog_path : /int/<b>D01</b>/...../temp/
    we will create ZLOG_PATH as logical path and assign the value to that as above(the physical path).
    lets say in production,
    we will create the SAME LOGICAL PATH NAME but the physical path name will differ
    zlog_path : /int/<b>P01</b>/...../temp/
    the advantage here is,
    user will give only the logical path and file name on the screen. he dont give the full physical path where ever he executes his report either in development or in Production.
    we create a logical path using FILE transaction.
    Re: logical path
    check this link.
    Regards
    srikanth
    Message was edited by: Srikanth Kidambi

Maybe you are looking for

  • Can't connect to db

    Hello, I am having trouble connecting to the Oracle database from Oracle Developer 6.0. The error is ORA-12505 TNS:Listener could not resolve sid given In connect descriptor. I am running both on a single PC under Windows98 SE. I installed Developer

  • Option/Alt Key not recognized by Logitech G510

    I installed Windows 8 Pro on my MacPro today and it all installed fine.  The problem is I have a Logitech G510 illuminated gaming keyboard that I payed 100 bucks for and I love it.    But when I restart and press the alt/option key  the screen stays

  • I bought adobe photoshop and i dont know how to find the serial number because the redemption code does not work what do i do

    i cant install the photo shop softwear because the redemption code doesn't work what do i do

  • Parsing error in custom report

    I have created a custom Oracle report. When I change the output to XML and try to view the output, I get the following error: XML Parsing Error: syntax error Location: http://kntestweb.xxxxxxxx.com:8002/OA_CGI/FNDWRR.exe?temp_id=2306817472 Line Numbe

  • Using Annotation @AttributeOverrides - Illegal start of expression

    Hi Forum, I have several classes that use the @AttributeOverrides annotation on several methods as shown in the following example:     @Embedded     @AttributeOverrides({          @AttributeOverride(name = "calendar",