Logical Filename

Hi all,
We have a Z-transaction used to perform requests by using a DTP process and send them to a file (SAP schedules jobs automatically for doing this).
The name of this file should determined at runtime using a variable from the Z program.
We followed the instructions in this link: [/people/kumarrvr.seemakurti/blog/2009/03/06/dynamic-physical-file-path-creation-passing-selection-screen-variables-for-archive-job-file-names|/people/kumarrvr.seemakurti/blog/2009/03/06/dynamic-physical-file-path-creation-passing-selection-screen-variables-for-archive-job-file-names]
The configuration in FILE transaction is as follows:
Logical file: DAILY_AMDOCS_OUPUT
Physical file: ar.Sap_Day.<DATE>.output.<Y=POSTDT>
Logical path: ZDAILY_AMDOCS_FILE
Then we created a FM for populating the last part of the file name:
FUNCTION Y_FILENAME_EXIT_POSTDT.
*"*"Local Interface:
*"  EXPORTING
*"     VALUE(OUTPUT)
  DATA:
   g_pstdt type d,                   " posting date
   g_output  type char20.                " output
* posting date from the main program
  FIELD-SYMBOLS: <FS_PSTDT> type d.
  ASSIGN: ('(ZFIAMDYNAMICDTP_MAIN)WA_POSTDATE-POST_DATE') TO <FS_PSTDT>.
  g_pstdt =  <FS_PSTDT>.
*Pass posting date to the output if not initial
   if g_pstdt is not initial.
    g_output = g_pstdt.
    OUTPUT = g_output.
   endif.                              "
ENDFUNCTION.
Once the DTP is saved, the filename exit is triggered and set correctly the output value from the main program.
Then the job for generating physically the file is canceled. Looking into the dump log it states that the we are attempting to access an unassigned field symbol, making reference to the assignment from our main program in the above FM.
Therefore it looks like the job cannot access to our program+variable... and so far no way to find a solution.
If any of you have a clue about what we are missing, it would be very much appreciated.
Many thanks in advance.

Hi Suhas,
Thanks for your answer.
I remember that I already had given a try to that way but I have just tried again.
We modified accordingly the physical name in FILE transaction and called the FM like this:
CALL FUNCTION 'FILE_GET_NAME'
    EXPORTING
      logical_filename = 'DAILY_AMDOCS_OUPUT'
      parameter_1      = input_date
    EXCEPTIONS
      file_not_found   = 1
      OTHERS           = 2.
  IF sy-subrc <> 0.
  ENDIF.
The result now is ar.Sap_Day.20110825.output.
Posting date set as parameter 1 is not being appended to the filename.

Similar Messages

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

  • 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

  • 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

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

  • 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

  • Logical filename in broadcasting

    Hi everyone,
    We want to use the bursting functionality to broadcast a report to the portal. We'll split the result to profit center so each profit center gets a seperate pdf document. Now a few hundred pdf files get created but it's unclear which file containts data for which profit center (without opening each file). Is there a way to add the profit center to the filename of the pdf document created? We've lookad at the variable on filename creation but these are not sufficient.
    Kind regards,
    Alex

    Hi Alex,
    I've found a discussion between SAP dev and another customer... where dev refers to the following...
    Filename: (Mandatory) this name is used for the directory name. This
    name is also the technical name of the directory in the database. The
    query_name/tempalate name is taken as default.
    "Display Name: If provided, replaces the Filename for user display on
      the portal.
    If a control query is used (which may generate multiple files), then
    the end files are names based on query_name/tempalate name + index."
    Do you have the option of a display name?
    Please read the following...
    Broadcast to the Portal 
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/29/f50b40c6c01961e10000000a155106/content.htm
    I hope this helps
    thanks
    Orla.

  • 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

  • Report RFKLBU10: Missing Parameter for Logical filename in Release ERP 2005

    Hello Experts,
    Report RFKLBU10 in Sap Release 4.6c hat a parameter "Old dataset logical name".
    The new version of this report in SAP Release ERP 2005 there is no such parameter.
    Is this a SAP-Bug ?
    Best regards,
    Mike

    There are no Export or Print events accessible for the viewer
    Since it sounds like you are creating the reportdocument object in your click event, the settings on this object become out of scope on successive postbacks executed by other events.
    to get around this without major changes, you can place your "report" object in session in this event and retrieve it from session on successive postbacks.  This should solve your problems around navigation, printing and exporting.  What you will need to do is check if the session object exists (usually in page_load or page_initialze) and if so, retrieve it from session and bind it to the viewer's reportsource.  If the session object does not exist, then do nothing (ie you have not clicked your button yet that retrieves the parameter values from session and loads the report).  Also, in your click event you can check if the report session object exists and if so, remove it so that it can be re-created with your new parameter values (ie i'm assuming the only time you want to set parameter values is in this event).
    Dan

  • 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

  • FTP & Logical Filename

    Hi Experts,
    We have an FTP program, that will pick up the file on application server, will remane the file & send it to the specified destination.
    My query is, I need to created one more file & that needs to renamed to other name, how can I achieve this?
    Earliset reply is highly appriciated.
    Regards,
    S R

    Syntax Group will tell the system that given file path is of which syntax.
    E.g. You have different syntax for UNIX and WINDOWS NT.
    You can find out the existing syntax groups in the same transaction.
    Regards,
    Naimesh Patel

  • Finding of the Logical and Physical filename,Logical and Physical Path

    Hello All
    Where and how can I find the below details in an SAP server
    Logical filename:
    Physical filename:
    Logical path:
    Physical path:
    Regards
    Kalyani

    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.
    You need to tak ehelp of ABAPer for this
    Check the link
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3deb358411d1829f0000e829fbfe/frameset.htm
    Regards

  • Using a Logical File definition in LSMW

    Hi all,
    is there any way that we can use a Logical File (defined in transaction FILE) as an application server file in the "specify files" step, instead of having to enter the physical path/file?
    Thanks in advance,
    Justin

    Hello,
    Check pages 46 and 47 of the following document :
    [http://sapabap.iespana.es/manuales/pdf/lsmw.pdf|http://sapabap.iespana.es/manuales/pdf/lsmw.pdf]
    You can only use a logical filename for subsequent programs (example direct input programs) not for the actual input file of your LSMW.
    Wim

  • Open Hub: How-to doc "How to Extract data with Open Hub to a Logical File"

    Hi all,
    We are using open hub to download transaction files from infocubes to application server, and would like to have filename which is dynamic based period and year, i.e. period and year of the transaction data to be downloaded. 
    I understand we could use logical file for this purpose.  However we are not sure how to have the period and year to be dynamically derived in filename.
    I have read in sdn a number of posted messages on a similar topic and many have suggested a 'How-to' paper titled "How to Extract data with Open Hub to a Logical Filename".  However i could not seem to be able to get document from the link given. 
    Just wonder if anyone has the correct or latest link to the document, or would appreciate if you could share the document with all in sdn if you have a copy.
    Many thanks and best regards,
    Victoria

    Hi,
    After creating open hub press F1 in Application server file name text box from the help window there u Click on Maintain 'Client independent file names and file paths'  then u will be taken to the Implementation guide screen > click on Cross client maintanance of file name > create a logical file path by clicking on new entiries > after creating logical file path now go to Logical file name definition there give your Logical file , name , physical file (ur file name followed by month or year what ever is applicable (press f1 for more info)) , data format (ASC) , application area (BW) and logical path (choose from F4 selection which u have created first), now goto Assignment of  physical path to logical path > give syntax group >physical path is the path u gave at logical file name definition.
    however we have created a logical path file name to identify the file by sys date but ur requirement seems to be of dynamic date of tranaction data...may u can achieve this by creating a variable. U can see the help from F1 that would be of much help to u. All the above steps i have explained will help u create a dynamic logical file.
    hope this helps u to some extent.
    Regards

Maybe you are looking for