Printing Data File name on report...

I need the datafile names to print on a report - we give the user serval files to choose from on the report and it would be nice to have the one selected as a note on the report

we use a formula that alowes the to select say a file named New or Current.  Both data files are layed out te same just different data.  We have a internal formula.
Formula: tsAskFile
Description Use the tsAskFile formula to limit the file types the operator can choose when
the report runs. This formula applies to the main report. It also applies to all
subreports unless you use the tsSubAskFile formula on the subreports. This
formula does not have file merging capabilities. If you use the following formula
example on a report design, the report will prompt the operator to choose
between the New.glt file and the Current.glt file when the report runs. Without
the formula on the report, the operator could choose whatever file codes are
available.
Syntax u201C[<file type>(<file code name>[,<file code name>]*)]u201D
<file type> = the abbreviation of the data file type; for example: BLI, GLT, APT,
etc.
<file code name> = the file code name of the data file; for example: new, current,
history, active, standard, etc.
Example @tsAskFile = u201CGLT(new,current)u201D or u201CGLT(new, current)JCT(current)u201D
So we want to know which one the choose.

Similar Messages

  • How to print the file name in sap

    Hi All,
    I have requirment like,
    there is a folder in my local system, inside that folder there are 10 Excel file like file1.xls,file2.xls..............file10.xls
    how to print the file name of all these file in SAp like
    file1.xls
    file2.xls
    file3.xls
    file4.xls
    file10.xls
    Appropriate points will be rewarded.
    Thanks in Advance
    Arun kumar

    Hi,
    Still you are facing any problem with this code expalin the problem with details , otherwise close this thread.
    Use Method <b>cl_gui_frontend_services=>directory_list_files</b> to read file names for a given directory
    after reading the files then Use FM : <b>RSPO_SX_OUTPUT_TEXTDATA</b> to create spool from internal table data and print the data.
    <b>sample code :</b>
    data: desktop_dir type string.
    data: ifiles type table of string.
    data: xfiles type string.
    data: count type i.
    data: filepath type string.
    call method cl_gui_frontend_services=>get_desktop_directory
      changing
        desktop_directory    = desktop_dir .
    call method cl_gui_cfw=>flush.
    call method cl_gui_frontend_services=>directory_list_files
      exporting
        directory                   = desktop_dir
    *    filter                      = '*.xls'
         files_only                  = 'X'
    *        DIRECTORIES_ONLY            =
      changing
        file_table                  = ifiles
        count                       = count.
      DATA : x_name       LIKE tsp03d-name,
             x_dest       LIKE tsp03d-padest VALUE 'LOCL',
             x_rows       LIKE sxpcklsti1-body_num VALUE 0,
             x_startrow   LIKE sxpcklsti1-body_start VALUE 1,
             x_pages      LIKE rspotype-pages VALUE 1,
             x_pages_1    TYPE p DECIMALS 2,
             x_rqtitle    LIKE sxpcklsti1-obj_descr,
             x_rqcopies   TYPE i VALUE 1,
             x_rqowner    LIKE trdyse01cm-username,
             x_immediate  LIKE pri_params-primm VALUE ' ',
             x_rqid       LIKE tsp01-rqident,
             i_contents    LIKE  solisti1 OCCURS 0 WITH HEADER LINE,
          x_pages   = 1.
          x_rqowner = sy-uname.
          x_dest     = 'LOCL'.
          x_startrow = 1.
          x_rqcopies = 1.
          x_immediate = 'X' .
          CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
           EXPORTING
    *       name                 =   x_name
             dest                 =  x_dest
             rows                 =  x_rows
             startrow             =  x_startrow
             pages                =  x_pages
             rqtitle              =  x_rqtitle
             rqcopies             =  x_rqcopies
             rqowner              =  x_rqowner
             immediately          =  x_immediate
           IMPORTING
             rqid                 =  x_rqid
           TABLES
             text_data            = i_contents
           EXCEPTIONS
             name_missing         = 1
             name_twice           = 2
             not_found            = 3
             illegal_layout       = 4
             internal_error       = 5
             size_mismatch        = 6
             OTHERS               = 7.
          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
    Appana
    *Reward Points for helpful answers
    Message was edited by: L Appana

  • How to store data file name in one of the columns of staging table

    My requirement is to load data from .dat file to oracle staging table. I have done following steps:
    1. Created control file and stored in bin directory.
    2. Created data file and stored in bin directory.
    3. Registered a concurrent program with execution method as SQL*Loader.
    4. Added the concurrent program to request group.
    I am passing the file name as a parameter to concurrent program. When I am running the program, the data is getting loaded to the staging table correctly.
    Now I want to store the filename (which is passed as a parameter) in one of the columns of staging table. I tried different ways found through Google, but none of them worked. I am using the below control file:
    OPTIONS (SKIP = 1)
    LOAD DATA
    INFILE '&1'
    APPEND INTO TABLE XXCISCO_SO_INTF_STG_TB
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    COUNTRY_NAME
    ,COUNTRY_CODE
    ,ORDER_CATEGORY
    ,ORDER_NUMBER
    ,RECORD_ID "XXCISCO_SO_INTF_STG_TB_S.NEXTVAL"
    ,FILE_NAME CONSTANT "&1"
    ,REQUEST_ID "fnd_global.conc_request_id"
    ,LAST_UPDATED_BY "FND_GLOBAL.USER_ID"
    ,LAST_UPDATE_DATE SYSDATE
    ,CREATED_BY "FND_GLOBAL.USER_ID"
    ,CREATION_DATE SYSDATE
    ,INTERFACE_STATUS CONSTANT "N"
    ,RECORD_STATUS CONSTANT "N"
    I want to store file name in the column FILE_NAME stated above. I tried with and without constant using "$1", "&1", ":$1", ":&1", &1, $1..... but none of them worked. Please suggest me the solution for this.
    Thanks,
    Abhay

    Pl post details of OS, database and EBS versions. There is no easy way to achieve this.
    Pl see previous threads on this topic
    SQL*Loader to insert data file name during load
    Sql Loader with new column
    HTH
    Srini

  • Is there a way of printing the file name from within the Preview application?

    If I'm printing a file within Apple's Preview application, I sometimes want to be able to print the file name at the edge of the document. Does anyone know of way of doing this?

    Thanks for replying, that goes some way to answering the question, but I'm also looking to see how much space each app and its associated documents are using, i.e. Pages comes in at 112Mb for the app alone, but I'd like to know how much space is being used by the documents as well.
    Once again thanks,
    SG

  • How to print .sql file name in the same file using sqlplus

    Oracle 10g on Linux platform.
    I am trying to print the name of .sql script file in that file but could not. Following is the file:
    test.sql
    select '&0' from dual;But instead of printing, it is asking for input:
    SQL> @test.sql
    Enter value for 0: Can any body give me a hint as how can i print the file name.

    Use this
    SELECT FNAME_KRBMSFT AS name FROM X$KRBMSFT
    and see
    SQL> create or replace procedure get_dir_list
    2 (p_directory varchar2)
    3 is
    4 l_null varchar2(100);
    5 l_directory varchar2(100);
    6 BEGIN
    7 l_directory := p_directory;
    8 sys.dbms_backup_restore.searchfiles(l_directory, l_null);
    9 FOR x IN (select fname_krbmsft fname from x$krbmsft) LOOP
    10 dbms_output.put_line(x.fname);
    11 END LOOP;
    12
    13 END;
    14 /
    Edited by: HuaMin Chen on Jun 26, 2012 12:26 PM

  • How do I print the file name of a PDF file?

    How do I print the file name of a PDF file?

    In the print dialog under Advanced you can specify this.

  • Date, File name, User Stamp

    I've looked for hours for a script that will work in Illustrator CS4 that will put a text block on the page identifying:
    Date, File Name and the User's name on the document (art board)
    I am not versed in scripting. Can anyone help me out?

    Hi Y'all  This post is where scripting all started for me. At the time I didn't know anything and Muppet Mark kindly helped me out. Since then I have learned Applescript and written my slug script in that. This has the advantage of being able to access system information. Here it is:
    -- captures the user's first name from the system for use in dialog boxes
    set myName to (long user name of (system info))
    set sp to (offset of " " in myName)
    set myFirstName to text 1 thru (sp - 1) of myName
    -- captures the user's short name from the system for use in the slug
    set myShortName to (short user name of (system info))
    set myInitials to text 1 thru 2 of myShortName
    tell application "Adobe Illustrator" to set myDocCount to count of documents
    if myDocCount > 0 then
        tell application "Adobe Illustrator"
            try
                set myPath to file path of document 1 as alias -- if the document is not saved this will cause an error
            on error
                display dialog "You haven't saved document yet " & myFirstName & "." buttons {"Cancel", "Save"} default button 2
                -- brings up Save As dialog box
                tell application "System Events" to tell process "Adobe Illustrator"
                    click menu item "Save As..." of menu 1 of menu bar item "File" of menu bar 1
                    tell application "Finder"
                        set filesavepath to "/Volumes/Server/Folder" -- put your own file path in here
                    end tell
                    delay 0.2
                    tell window "Save As"
                        keystroke "g" using {command down, shift down}
                        repeat until exists sheet 1
                            delay 0.5
                        end repeat
                        tell sheet 1
                            keystroke filesavepath
                            click button "Go"
                        end tell
                    end tell
                end tell
                -- end Save As dialog box
                return
            end try
            set myFile to name of document 1
            set myFolder to myPath as string
            -- this section looks at the file info to get the file version information
            set myFileVersion to my getVersion(myPath)
            set AppleScript's text item delimiters to "Created"
            set myFileVersion to text item 1 of myFileVersion
            if myFileVersion is "Saved As v.15 " then
                set myFileVersion to "Illustrator CS5"
            else if myFileVersion is "Saved As v.14 " then
                set myFileVersion to "Illustrator CS4"
            else if myFileVersion is "Saved As v.13 " then
                set myFileVersion to "Illustrator CS3"
            else if myFileVersion is "Saved As v.12 " then
                set myFileVersion to "Illustrator CS2"
            end if
            set AppleScript's text item delimiters to {""}
            -- end of file info
            set AppleScript's text item delimiters to ":"
            set clientFolder to text item 3 of myFolder -- always picks out the client folder on our server
            set AppleScript's text item delimiters to {""}
            if clientFolder contains "_" then
                set clientFolder to my cleanName(clientFolder) -- to format the client names properly
            else
                set clientFolder to clientFolder
            end if
            -- find the current date. This is the date when the file was last edited but this method enables you to run the script before saving
            tell application "Finder"
                set myDate to (current date) as string
            end tell
            set myDate to (word 2 of myDate) & " " & (text 1 thru 3 of word 3 of myDate) & " " & (word 4 of myDate) as string
            -- end find date
            -- checks for the correctly named frames and then populates with the correct information
            if exists (text frame "titleblock-software" of document 1) then
                set contents of text frame "titleblock-software" of document 1 to myFileVersion
            end if
            if exists (text frame "titleblock-client" of document 1) then
                set contents of text frame "titleblock-client" of document 1 to clientFolder
            end if
            if exists (text frame "titleblock-file" of document 1) then
                set contents of text frame "titleblock-file" of document 1 to myFile
            end if
            if exists (text frame "titleblock-path" of document 1) then
                set contents of text frame "titleblock-path" of document 1 to myPath as string
            end if
            if exists (text frame "titleblock-date" of document 1) then
                set contents of text frame "titleblock-date" of document 1 to myDate
            end if
            if exists (text frame "titleblock-editor" of document 1) then
                set contents of text frame "titleblock-editor" of document 1 to myInitials
            end if
            if exists (text frame "titleblock-version" of document 1) then
                set versionCount to get contents of text frame "titleblock-version" of document 1
                set versionCount to (versionCount + 1)
                set contents of text frame "titleblock-version" of document 1 to versionCount
            end if
            -- end populating named frames
        end tell
    end if
    -- this handler is to get the version of the file
    on getVersion(added_item)
        set myFileVersion to long version of (info for added_item)
    end getVersion
    -- this handler converts every 'odd' character to an underscore, modify as needed
    on cleanName(newName)
        set chars to every character of newName
        repeat with i from 1 to length of chars
            if item i of chars as text is equal to "_" then
                set item i of chars to " "
            end if
        end repeat
        return every item of chars as string
    end cleanName

  • Can I print the File name and page number

    When printing a file, I would like to print the File Name and the page number also...something like a header, in every page printed.  Is this possible in Acrobat?  Please advise.
    Thanks

    Sure. Did you look under Tools - Pages - Header & Footer ?

  • Sql loader:loading data file name to one of the tabe column.

    Hi,
    I want to load the data file name also to one of the table column.
    Table structure:
    File_Name varchar2
    Name varchar2
    Age number
    Data File Format:
    Vijay|24
    Anandh|24
    Senthil|26
    In the above eg how to write a control file to load the data file name to the File_Name column of the table.
    Note:
    The shell script will first pick up the data files to be loaded and calls the control file.
    Thanks,
    Vijay.

    From a unix load perspective this is what we have done :
    Create a control file (say load_data.ctl) something like
    LOAD DATA
    append
    Into table file_name_age
    File_Name constant '<FILENAME>',
    Name CHAR TERMINATED BY '|'
    Age INTEGER EXTERNAL TERMINATED BY '|' )
    in a unix loop do the following
    for i in `ls $LOADDIR` ; do
    #Replace <FILENAME> with actual filename and create a temp ctl file
    sed s/\<FILENAME\>/${1}/g < ${CTLDIR}/load_data.ctl > ${TMPDIR}/load_data_${1}.ctl
    #load using temp file
    sqlldr / CONTROL=${TMPDIR}/load_data_${1}.ctl
    DATA=$i
    #remove temp
    rm ${TMPDIR}/load_data_${1}.ctl
    done
    Where
    ${TMPDIR}=your temp directory
    ${CTLDIR}=where your main directory for ctl files
    $LOADDIR=Your data directory

  • Insert data file name into table from sql loader

    Hi All,
    I have a requirement to insert the data file name dynamically into table using sql loader.
    Example:
    sqlldr userid=username/passwword@host_string control=test_ctl.ctl data=test_data.dat
    test_ctl.ctl
    LOAD DATA
    FILED TERMINATED BY ','
    INTO TABLE test
    (empid number,
    ename varchar2(20),
    file_name varchar2(20) ---------- This should be the data file name which can be dynamic (coming from parameter)
    test_data.dat
    1,test
    2,hello
    3,world
    4,end
    Please help..
    Thanks in advance.
    Regards
    Anuj

    you'll probably have to write your control file on the fly, using a .bat or .sh file
    rem ===== file : test.bat ========
    rem
    rem ============== in pseudo speak =============
    rem
    rem
    echo LOAD DATA > test.ctl
    echo FILED TERMINATED BY ',' >> test.ctl
    echo INTO TABLE test >> test.ctl
    echo (empid number, >> test.ctl
    echo ename varchar2(20), >> test.ctl
    echo file_name constant %1% >> test.ctl
    echo ) >> test.ctl
    rem
    rem
    rem
    sqlldr userid=username/passwword@host_string control=test.ctl data=test_data.dat
    rem =============== end of file test.bat =======================
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_field_list.htm#i1008664

  • Possibility of capturing data file name in SQL * Loader

    Hi,
    I have a requirement to capture the data file name in the staging table, is there a way that i can capture it in SQL * Loader or any other way of doing it.
    Need experts suggestion please.
    Thanks,
    Genoo

    Hi Genoo.
    how do we capture the file name and stores in the temporary table
    You may use the above command mentioned in my previous post (if Linux) to populate the Test.csv file with the available file name in the directory, i.e:
    ls /some/path/*.dat | xargs -n1 basename  > /home/oracle/Test.csv
    1. Ensure to first load the Test.csv file as for eg:
    1,aaa
    2,bbb
    3,ccc
    2. Create a control file to load these records into temporary tables,for eg:
    load data
    infile '/home/oracle/Test.csv'
    into table file_name_upload
    fields terminated by ","
    ( id, file_name )
    3. Create the respective table in the database:
    create table file_name_upload
      id number,
      file_name varchar2(20)
    4. Load the data into temporary table
    sqlldr test/test control=/home/oracle/sqlldr_test.ctl
    Please refer notes:
    SQL*Loader - How To Load A Date Column With Fractions Of Second (Doc ID 1276259.1)
    Script To Generate SQL*Loader Control File (Doc ID 1019523.6)
    SQL*Loader performance tips (Doc ID 28631.1)
    How To use the Sequence Function of SQL*Loader (Doc ID 1058895.6)
    How to Get Data from Existing Table to Flat File Usable by SQL*Loader (Doc ID 123852.1)
    Also see link:
    10 Oracle SQLLDR Command Examples (Oracle SQL*Loader Tutorial)
    Thanks &
    Best regards,

  • SQLLoader: Uploading data file name along with data

    I am using Oracle SQLLoader to upload my data from CSV files into a single table. My current CTL file is as follows:
    LOAD DATA
    INFILE 'trace_metals100.csv'
    INFILE 'trace_metals101.csv'
    APPEND
    INTO TABLE TRACE_METALS
    FIELDS TERMINATED BY ','
    (STATION_NO, METAL_NAME, METAL_WT)
    Just for my record I want to upload the data file name also along with the data into a fourth column. How should I do it using SQLLoader??
    Regards,
    Moiz

    Do two loads using two separate control files:
    LOAD DATA
    INFILE 'trace_metals100.csv'
    APPEND
    INTO TABLE trace_metals
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (station_no,
    metal_name,
    metal_wt,
    fourth_column_name CONSTANT trace_metals100.csv)
    LOAD DATA
    INFILE 'trace_metals101.csv'
    APPEND
    INTO TABLE trace_metals
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (station_no,
    metal_name,
    metal_wt,
    fourth_column_name CONSTANT trace_metals101.csv)

  • Quicken data file names are mysteriously being change on my iDisk

    within the last couple of days my Quicken data file names are mysteriously being change on my iDisk which seem to make them inaccesable.  Not sure why this is happening

    within the last couple of days my Quicken data file names are mysteriously being change on my iDisk which seem to make them inaccesable.  Not sure why this is happening

  • Printing folder file names

    Is there any easy way I can print the file names of any particular folder so I can I have a printed record of it's contents?

    Peter,
    There are several ways you can accomplish that task.
    Check these threads for possible solutions:
    Printing Contents of Folder
    Printing Window Contents
    For additional suggestions Search Discussions with the term "print contents."
    ;~)

  • SQL*Loader to insert data file name during load

    I'd like to use a single control file to load data from different files (at different times) to the same table. I'd like this table to have a column to hold the name of the file the data came from. Is there a way for SQL*Loader to automatically do this? (I.e., as opposed to running an update query separately.) I can edit the control file before each load to set a CONSTANT to hold the new data file name, but I'd like it to pick this up automatically.
    Thanks for any help.
    -- Harvey

    Hello Harvey.
    I've previously attempted to store a value into a global/local OS variable and use this within a SQL*Loader control file (Unix OS and Oracle versions between 7.3.4 and 10g). I was unsuccessful in each attempt and approach I could imagine. It was very easy to use a sed script to make a copy of the control file, changing a string within it to do this however.
    Do you really want to store a file name on each and every record? Perhaps an alternative would be to use a relational model. Create a file upload log table that would store the file name and an upload # and then have the SQL*Loader control file call a function that would read that table for the most recent upload #. You'll save some disk space too.
    Hope this helps,
    Luke

Maybe you are looking for