Write Table to file (Excel or otherwise) in background

Hello All,
I am new the ABAP programming with only self training (two weeks).  I have searched forums for 4 days trying to find usable solutions.  I am writing directly to see if someone can point me in the correct direction.
I have to output data from multiple tables into a file for transmission to another site.  My first attempt used the OPEN DATASET and a TRANSFER.  This works in interactive and in background mode, but the lines in file are truncated at 255 characters, this was true for both TEXT mode and BINARY mode.
My second attempt used the GUI_DOWNLOAD to put the file into a tab delimited excel type format.  This gets all the fields and all the characters, but can't be run in background mode.
How can I get a file that has a  line lenth of about 600 characters into a file for FTP?
Thanks for assistance,
Steven M Engel
Attempt 1 - Problem is that the lines in p_file are limited to 255 characters.
    OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
   OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
    IF sy-subrc = 0.
      LOOP AT gt_delivery.
        TRANSFER txt_delivery     TO p_file.
      ENDLOOP.
    ENDIF.
    WRITE: 'File has been generated'.
Attempt 2 - Problem is that can't be run in background mode.
Export the file
call function 'GUI_DOWNLOAD'
   exporting
     FILENAME                = LV_FILE
     FILETYPE                = 'DBF'
   tables
     DATA_TAB                = gt_delivery
     FIELDNAMES              = LT_FIELDNAMES
   exceptions
     FILE_WRITE_ERROR        = 1
     NO_BATCH                = 2
     GUI_REFUSE_FILETRANSFER = 3
     INVALID_TYPE            = 4
     NO_AUTHORITY            = 5
     UNKNOWN_ERROR           = 6
     HEADER_NOT_ALLOWED      = 7
     SEPARATOR_NOT_ALLOWED   = 8
     FILESIZE_NOT_ALLOWED    = 9
     HEADER_TOO_LONG         = 10
     DP_ERROR_CREATE         = 11
     DP_ERROR_SEND           = 12
     DP_ERROR_WRITE          = 13
     UNKNOWN_DP_ERROR        = 14
     ACCESS_DENIED           = 15
     DP_OUT_OF_MEMORY        = 16
     DISK_FULL               = 17
     DP_TIMEOUT              = 18
     FILE_NOT_FOUND          = 19
     DATAPROVIDER_EXCEPTION  = 20
     CONTROL_FLUSH_ERROR     = 21
     not_supported_by_gui    = 22
     error_no_gui            = 23
     others                  = 24.

It is very difficult to get FM GUI_DOWNLOAD to run in the background. There is a white paper out there that describes how to do it, but I never heard of it actually being done successfully.
The TRANSFER statement should work for wider records. You can check that it does by reading the file back in and then looking at an offset (rec+255).
Rob

Similar Messages

  • Help with saving time stamps to "write to measurement file" excel format.

    I am having problems saving the timestamps from my data to the write to measurement express vi for excel.  My incoming data is converted from dynamic data to a 1d array for processing, which I understand you lose the time stamp data. I added a new array for time stamps but this array then cannot be converted back to the dynamic data that is requested to go into the write to measurement file express vi.  I would prefer to leave the data in an array to be saved rather than converting it to a waveform so is there any way to add the time stamps from my 1d array back into the write to measurement file? 

    I set it up to build a waveform now but I am still having issues with it saving the correct timestamp.  The time just incriments for every second (as it did before converting the dynamic data to the waveform). I attached a screenshot.  
    Attachments:
    waveform.png ‏36 KB

  • How to write table content into excel quickly?

    Dear gurus, I am fresh to ABAP, could you please so kind advise how can I save a table content into an excel which is stored in certain path efficiently?
    I found a way as following:
    form excel_range_write using lcobj_excel
                                 lc_range
                                 lc_value.
      data: lc_cell type ole2_object.
      call method of
          lcobj_excel
          'RANGE'     = lc_cell
        exporting
          #1          = lc_range.
      perform font using lc_cell 1 '30'.
      set property of lc_cell 'VALUE' = lc_value.
    endform.                    "excel_cell_write
    However if I would like to write everything out, I have to loop the table to fill each cell, is there any easier way? Could anyone kindly help?

    hi Frank
    this is the wiki published by me
    hope it will help u a lot
    https://wiki.sdn.sap.com/wiki/display/Snippets/OLEprogramforconvertingtomultitabexcel
    cheers
    s.janagar

  • Write table to excel at specific location

    Hi!
    I want to write table to the excel file in the position
    E23:To J60.
    Can anybody please tell me the solution.
    Thanks
    Kaustubh

    The examples function just fine in LV 7
    Here are som vi's that may (or may not) help you out.
    Joe.
    "NOTHING IS EVER EASY"
    Attachments:
    excel.llb ‏2097 KB

  • Write Table to Excel

    I have taken the write table to xl.vi example and modified it so that I can use it. Write now I have a vi setup that displays certain columns of data that I am pulling from a txt file in both a graph and a table. Then I am trying to write this table to xl by following the example, however I get the error 97 when running the vi, and a blank excel workbook opens up. I think this has something to do with how the table I have created is used to try and enter this into excel. Any help you can provide would be greatly appreciated. Thanks.
    Attachments:
    Data_Display_2.vi ‏134 KB

    Error 97 is "LabVIEW: Null Refnum was passed in as input."
    You might wanna check whether the Automation Refnum is linked to the correct ActiveX class in the "Open Excel" VI.
    In your diagram, as Dennis pointed out, it has no dataflow. The row header and column header in your table are both empty as well. That results in three for-loops doing nothing. Wire your "Hour" variable directly to the input of the third loop instead. Also at the end of the program, you should close all opened references regardless of the "Completion Task". Put only the invoke node "application quit" in the case structure should do.
    Hope this helps.
    Dan

  • Is it possible to write a routine on excel file while loading data?

    Hi
    I am trying to load data from csv file(Excel flat file) into ODS, while loading data in to ODS, I need to check a condition if one Info Object in ODS is match with column C field in flat file then only the data should load, otherwise reject the data.
    any help is greatly appreciated.
    Thank you
    Harshan

    Hi Harshan,
    in your start routine:
    data: wa_ods type <name of active data ods table>,
          l_index type sy-tabix.
    loop at data_package.
    l_index = sy-tabix.
    select single * into wa_ods
    from   <name of active data ods table>
    where  <your condition>.
    if wa_ods-<fieldname> = <your condition>.
    continue.
    else.
    delete data_package index l_index.
    endif.
    endloop.
    In case of bad performance it might be necessary to post the ods-data to a internal table first and read the internal table instead of doing select single.
    Hope this helps!
    regards
    Siggi

  • How to read/write a binary file from/to a table with BLOB column

    I have create a table with a column of data type BLOB.
    I can read/write an IMAGE file from/to the column of the table using:
    READ_IMAGE_FILE
    WRITE_IMAGE_FILE
    How can I do the same for other binary files, e.g. aaaa.zip?

    There is a package procedure dbms_lob.readblobfromfile to read BLOB's from file.
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#sthref3583
    To write a BLOB to file you can use a Java procedure (pre Oracle 9i R2) or utl_file.put_raw (there is no dbms_lob.writelobtofile).
    http://asktom.oracle.com/pls/ask/f?p=4950:8:1559124855641433424::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:6379798216275

  • How to download values in an internal table into an excel file

    is there any fn module to download the values in an internal table into an excel file..

    hi
    the function module "GUI_DOWNLOAD"  downloads the data from
    an internal table into a file (can be xl, dat ,doc etc) .
    Plz follow the usage below ;
    Parameters : pa_pfile LIKE rlgrap-filename OBLIGATORY.
    Data : lv_filename TYPE STRING.
    lv_filename = pa_pfile.
    CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
       BIN_FILESIZE                  =
         FILENAME                      = lv_filename
         FILETYPE                      = 'ASC'
       APPEND                        = ' '
        WRITE_FIELD_SEPARATOR         = 'X'
       HEADER                        = '00'
       TRUNC_TRAILING_BLANKS         = ' '
       WRITE_LF                      = 'X'
       COL_SELECT                    = ' '
       COL_SELECT_MASK               = ' '
       DAT_MODE                      = ' '
       CONFIRM_OVERWRITE             = ' '
       NO_AUTH_CHECK                 = ' '
    IMPORTING
       FILELENGTH                    =
       TABLES
         DATA_TAB                      = tb_download         " table data to b downlaoded
      EXCEPTIONS
        FILE_WRITE_ERROR              = 1
        NO_BATCH                      = 2
        GUI_REFUSE_FILETRANSFER       = 3
        INVALID_TYPE                  = 4
        NO_AUTHORITY                  = 5
        UNKNOWN_ERROR                 = 6
        HEADER_NOT_ALLOWED            = 7
        SEPARATOR_NOT_ALLOWED         = 8
        FILESIZE_NOT_ALLOWED          = 9
        HEADER_TOO_LONG               = 10
        DP_ERROR_CREATE               = 11
        DP_ERROR_SEND                 = 12
        DP_ERROR_WRITE                = 13
        UNKNOWN_DP_ERROR              = 14
        ACCESS_DENIED                 = 15
        DP_OUT_OF_MEMORY              = 16
        DISK_FULL                     = 17
        DP_TIMEOUT                    = 18
        FILE_NOT_FOUND                = 19
        DATAPROVIDER_EXCEPTION        = 20
        CONTROL_FLUSH_ERROR           = 21
        OTHERS                        = 22
    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
    Pankaj

  • Write to text file while scrolling table issue

    Hi all,
    I have a LabVIEW application that logs data using 'write to text file' every second. This is a bckground task in a sub-VI. On the main screen I have several tables that have scrollbars. Every time the file is written the scrolling of a table is effectivley canceled. It is then necessary to click on the scrollbar again to re-start scrolling the table. I guess this is an issue with the OS but not sure yet. I have not tested other operating systems yet. I thought I would try the forum first. Has anyone else experienced this issue? Any ideas on how to fix this?
    I have tried using list boxes instead of tables but the same issue exists.
    I'm using windows 7 and LabVIEW 2011.
    Thank you.
    Certified LabVIEW Architect

    Hi Steve, thanks for offering to help. Right now I'm on a machine with LabVIEW 2010 and XP and the issue does not exist. But I have created a little test VI that should demonstrate the issue once running on LabVIEW 2011 SP1 and Windows 7. I can't confirm this VI will demonstrate the issue until later today when I can test it on the problem system myself. Feel free to give it a go and let us know what you find, or wait until I confirm the attached VI will demonsrate the issue (10 to 12 hrs time).
    Thank again.
    Certified LabVIEW Architect
    Attachments:
    Table scroll test_1.vi ‏13 KB

  • RSEOUT00 failing with "Could not write IDoc to file" TPRI_DEF table

    Outbound Idoc processing fail with the following error:
    Could not write IDoc to file
    Message no. EA299
    Diagnosis
    The system could not convert data from the data record 000027.
    Procedure
    Check the port definition of the receiver port.
    You can use the "Continue despite conversion error" option to write the IDoc to the file from transaction BD87 with replacement characters.
    Short dump indicate that there is a some junk character in th e TPRI_DEF for program SAPLSPRI that it is unable to convert.
    I have set the flag on the we21 port to "continue despite conversion error" and that seem to help, but I would like to figure out how to fix the junk characters from coming through from the TPRI_DEF table.  
    This is what shows up in the short dump after RSEOUT00 is run.
    TPRI_DEF                                   /  /       :  :     00002932
        010GV21            \0\0\0\0\x0006āȂ耀㐱〲\0\0嬇\0ሟ鴂푎眩\x0802儔잏퉓
    I do not see any entries for area "GV" in the table, there is one for "GF".  which has no user assigned to it and it is of key version 21.
    I am not sure if the table is supposed to have an entry with no user assigned?
    thank you for looking at this issue .

    HI Jurgen,
    we have the same issue, chinese charecter is in PO text header. so facing error. If we click unicode format then it works fine as my testing in development.
    I just want to knom what is the impact if i clicked directly unicode format ?( with refernce to your reply above " have you set the Unicode format flag directly above in WE21?" )
    I doc is going from SAP sytem - (PO information )
    Pls adivce..
    waiting for your reply..
    Thanks in advance

  • Write data of a table to an excel sheet

    Hi
    How i can write data of a table to an excel sheet?
    regard
    deemy

    Search this forum for 1.2 Jiga-examples...

  • How to  write file excel format xlsx/xlsb to pl/sql?

    Dear supporter,
    I built the xml report output excel file. However, the reported data and about 30 columns, line 200000 write and loading file slow, large file size
    How can write data directly to the format xlsb / xlsx from pl / sql. quickly and efficiently.
    Please, help me!
    Tks,
    Mr.T

    Check this thread.
    Re: 5. How do I read or write an Excel file?

  • Write xmp sidecar files without need to export masters - script

    I've written a script to write xmp sidecar files for referenced and online images (the 2 conditions in the script) of the selected images. I looked for a while at system events and other stuff to be able to write the xmp file, but i'm not a programmer, so in the end i chose the long and dirty way to do it.
    This script will export all iptc expanded fields as aperture does (creating basically the same file). It can be easily adjusted to include other tags, even custom ones. I don't know how to get at the adjustments for images, otherwise those could be included as well.
    If anyone has the energy to clean this up and make it faster, feel free to do so. Next, I'm going to try to write a script to do the opposite, import xmp sidecars for imported online and referenced files.
    Here it goes (thanks to Brett Gross for the database part to find the master filename):
    --script to create sidecar xmp files for referenced files without having to export masters. parts of the script (finding the file name) are by brett gross
    property p_sql : "/usr/bin/sqlite3 "
    global g_libPath
    on run
    my getLibPath()
    --counter for processed images, reset, just in case
    set mastercount to 0
    tell application "Aperture"
    if not (exists selection) then
    display dialog "You have to select at least one image" buttons {"OK"} default button 1
    return
    else
    display dialog "You have selected " & (count of selection) & " images." & return & "Continue?" default button 1
    end if
    set theSel to selection
    --run through the selected images
    repeat with currentpic from 1 to count of theSel
    tell item currentpic of theSel
    -- only apply to referenced and online images
    if referenced and online then
    set mastercount to mastercount + 1
    set curID to id
    --find the master file path and name - this part by brett gross, thanks
    set libPOSIX to POSIX path of g_libPath
    set libDBPOSIX to (libPOSIX & "/Aperture.aplib/Library.apdb") as string
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZFILEUUID from ZRKVERSION where ZUUID='" & curID & "'\""
    set ZFILEUUID to do shell script theScript
    # ---------- Get the master's path
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZIMAGEPATH from ZRKFILE where ZUUID='" & ZFILEUUID & "'\""
    set ZIMAGEPATH to do shell script theScript
    # ---------- Get the master's disk name
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZFILEVOLUMEUUID from ZRKFILE where ZUUID='" & ZFILEUUID & "'\""
    set ZFILEVOLUMEUUID to do shell script theScript
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZNAME from ZRKVOLUME where ZUUID='" & ZFILEVOLUMEUUID & "'\""
    set diskName to do shell script theScript
    set imgPath to (diskName & "/" & ZIMAGEPATH)
    --end brett gross part
    --strips extension, seems to work for files and paths with more than one period
    set oldlim to AppleScript's text item delimiters
    set AppleScript's text item delimiters to "."
    try --remove last extension only
    set contador to text item -1 of imgPath
    set noExtension to Unicode text 1 thru -((count of contador) + 2) of imgPath
    on error --handle files with no extensions
    set noExtension to imgPath
    end try
    set AppleScript's text item delimiters to oldlim
    --create the file and path name with the .xmp extension for writing
    set xmpPath to "/Volumes/" & noExtension & ".xmp" as Unicode text
    --convert posix path to alias for easier write and read handling
    set xmpPath to POSIX file xmpPath as file specification
    -- header for xmp file
    set xmpheader to ("<?xpacket begin='' id=''?>
    <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9-9, framework 1.6'>
    <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>") & return
    -- footer for xmp file
    set xmpfooter to ("</rdf:RDF>
    </x:xmpmeta>
    <?xpacket end='w'?>") & return
    --xmp content, part 1
    --check for existence of iptc tags, create content or empty string depending on existance of tags
    if (exists IPTC tag "Contact") or (exists IPTC tag "Country/PrimaryLocationCode") then
    set xmpcontentpartone to ("<rdf:Description rdf:about='' xmlns:Iptc4xmpCore='http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/'>") & return
    try
    set CountryCode to value of IPTC tag "Country/PrimaryLocationCode"
    set xmpcontentpartone to xmpcontentpartone & tab & "<Iptc4xmpCore:CountryCode>" & CountryCode & "</Iptc4xmpCore:CountryCode>" & return
    end try
    try
    set CreatorContactInfo to value of IPTC tag "Contact"
    set xmpcontentpartone to xmpcontentpartone & tab & "<Iptc4xmpCore:CreatorContactInfo>" & CreatorContactInfo & "</Iptc4xmpCore:CreatorContactInfo>" & return
    end try
    set xmpcontentpartone to xmpcontentpartone & ("</rdf:Description>") & return
    else
    set xmpcontentpartone to ""
    end if
    --xmp content, part 2
    --check for existence of iptc tags, create content or empty string depending on existance of tags
    if (exists IPTC tag "Category") or (exists IPTC tag "City") or (exists IPTC tag "Country/PrimaryLocationName") or (exists IPTC tag "Credit") or (exists IPTC tag "DateCreated") or (exists IPTC tag "Headline") or (exists IPTC tag "Province/State") or (exists IPTC tag "Source") or (exists IPTC tag "SpecialInstructions") or (exists IPTC tag "SupplementalCategory") or (exists IPTC tag "Writer/Editor") then
    set xmpcontentparttwo to ("<rdf:Description rdf:about='' xmlns:photoshop='http://ns.adobe.com/photoshop/1.0/'>") & return
    try
    set Category to value of IPTC tag "Category"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Category>" & Category & "</photoshop:Category>" & return
    end try
    try
    set City to value of IPTC tag "City"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:City>" & City & "</photoshop:City>" & return
    end try
    try
    set Country to value of IPTC tag "Country/PrimaryLocationName"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Country>" & Country & "</photoshop:Country>" & return
    end try
    try
    set Credit to value of IPTC tag "Credit"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Credit>" & Credit & "</photoshop:Credit>" & return
    end try
    try
    set DateCreated to value of IPTC tag "DateCreated"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:DateCreated>" & DateCreated & "</photoshop:DateCreated>" & return
    end try
    try
    set Headline to value of IPTC tag "Headline"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Headline>" & Headline & "</photoshop:Headline>" & return
    end try
    try
    set State to value of IPTC tag "Province/State"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:State>" & State & "</photoshop:State>" & return
    end try
    try
    set Source to value of IPTC tag "Source"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Source>" & Source & "</photoshop:Source>" & return
    end try
    try
    set Instructions to value of IPTC tag "SpecialInstructions"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Instructions>" & Instructions & "</photoshop:Instructions>" & return
    end try
    try
    set SupplementalCategory to value of IPTC tag "SupplementalCategory"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:SupplementalCategory>" & SupplementalCategory & "</photoshop:SupplementalCategory>" & return
    end try
    try
    set CaptionWriter to value of IPTC tag "Writer/Editor"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:CaptionWriter>" & CaptionWriter & "</photoshop:CaptionWriter>" & return
    end try
    set xmpcontentparttwo to xmpcontentparttwo & ("</rdf:Description>") & return
    else
    set xmpcontentparttwo to ""
    end if
    --xmp content, part 3
    --check for existence of iptc tags, create content or empty string depending on existance of tags
    if (exists IPTC tag "Byline") or (exists IPTC tag "Caption/Abstract") or (exists IPTC tag "CopyrightNotice") or (exists IPTC tag "Keywords") or (exists IPTC tag "ObjectName") then
    set xmpcontentpartthree to ("<rdf:Description rdf:about='' xmlns:dc='http://purl.org/dc/elements/1.1/'>") & return
    try
    set creator to value of IPTC tag "Byline"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:creator><rdf:Seq><rdf:li>" & creator & "</rdf:li></rdf:Seq></dc:creator>" & return
    end try
    try
    set description to value of IPTC tag "Caption/Abstract"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:description><rdf:Alt><rdf:li xml:lang='x-default'>" & description & "</rdf:li></rdf:Alt></dc:description>" & return
    end try
    try
    set rights to value of IPTC tag "CopyrightNotice"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:rights><rdf:Alt><rdf:li xml:lang='x-default'>" & rights & "</rdf:li></rdf:Alt></dc:rights>" & return
    end try
    --keywords, slightly different, as they need to be written as a list and not as a string
    --i don't think it's a problem if we create an empty list if there are no keywords present.
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:subject><rdf:Bag>" & return
    --make list item for every keyword
    try
    repeat with n from 1 to count of keywords
    set cursubject to name of (keyword n)
    set xmpcontentpartthree to xmpcontentpartthree & tab & tab & "<rdf:li>" & cursubject & "</rdf:li>" & return
    end repeat
    end try
    set xmpcontentpartthree to xmpcontentpartthree & tab & "</rdf:Bag></dc:subject>" & return
    try
    set title to value of IPTC tag "ObjectName"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:title><rdf:Alt><rdf:li xml:lang='x-default'>" & title & "</rdf:li></rdf:Alt></dc:title>" & return
    end try
    set xmpcontentpartthree to xmpcontentpartthree & ("</rdf:Description>") & return
    else
    set xmpcontentpartthree to ""
    end if
    --part four. aperture doesn't seem to export anything there
    set xmpcontentpartfour to "<rdf:Description rdf:about='' xmlns:photomechanic='http://ns.camerabits.com/photomechanic/1.0/'>
    </rdf:Description>" & return
    --part five. rating
    set xmpcontentpartfive to "<rdf:Description rdf:about='' xmlns:xap='http://ns.adobe.com/xap/1.0/'>" & return
    try
    set Rating to main rating
    set xmpcontentpartfive to xmpcontentpartfive & tab & "<xap:Rating>" & Rating & "</xap:Rating>" & return
    end try
    set xmpcontentpartfive to xmpcontentpartfive & "</rdf:Description>" & return
    --join everything
    set xmptext to xmpheader & xmpcontentpartone & xmpcontentparttwo & xmpcontentpartthree & xmpcontentpartfour & xmpcontentpartfive & xmpfooter
    --write file
    my writexmpFile(xmptext, xmpPath)
    end if
    end tell
    end repeat
    display dialog "Processed " & mastercount & " referenced and online image(s)." buttons {"OK"} default button 1
    end tell
    end run
    -- write xmp sidecar file routine
    on writexmpFile(theContents, xmpFileName)
    --tell application "Finder"
    try
    open for access xmpFileName with write permission
    set eof of xmpFileName to 0
    write (theContents) to xmpFileName starting at eof
    close access xmpFileName
    on error
    try
    display dialog xmpFileName
    close access xmpFileName
    end try
    end try
    --end tell
    end writexmpFile
    --this part copied from Brett Gross-------------------------------------------------------------------------- --------------------------------
    on getLibPath()
    tell application "System Events" to set p_libPath to value of property list item "LibraryPath" of property list file ((path to preferences as Unicode text) & "com.apple.aperture.plist")
    if ((offset of "~" in p_libPath) is not 0) then
    -- set p_posix to POSIX file p_libPath
    set p_script to "/bin/echo $HOME"
    set p_homePath to (do shell script p_script)
    set p_offset to offset of "~" in p_libPath
    set p_path to text (p_offset + 1) thru -1 of p_libPath
    set g_libPath to p_homePath & p_path
    else
    set g_libPath to p_libPath
    end if
    end getLibPath
    --end brett gross part

    imigra wrote:
    I've written a script to write xmp sidecar files for referenced and online images (the 2 conditions in the script) of the selected images. I looked for a while at system events and other stuff to be able to write the xmp file, but i'm not a programmer, so in the end i chose the long and dirty way to do it.
    This script will export all iptc expanded fields as aperture does (creating basically the same file). It can be easily adjusted to include other tags, even custom ones.
    Excellent stuff!
    I don't know how to get at the adjustments for images, otherwise those could be included as well.
    They are stored as binary data in the Version XML files at the bottom level of the Library package. You can also have a look around in the ZRKIMAGEADJUSTMENT table, but again the actual settings for each adjustment are in binary form.
    If anyone has the energy to clean this up and make it faster, feel free to do so.
    As far as I can remember, Aperture uses the 'proper' IPTC tag names when accessing them via AppleScript, so you may be able to do a loop through all the IPTC tags for each image, rather than picking out each specific one. But that would need checking. The EXIFTools site is a good place to find out about the different ways that IPTC data can be described.
    Next, I'm going to try to write a script to do the opposite, import xmp sidecars for imported online and referenced files.
    Don't rush unless you feel like it - I've already started planning out a free (as in beer and speech) XMP importer with a GUI so that you can choose how to map the XMP CORE tags that don't exist in Aperture. You've given me an extra idea, though - if we can decide on a set of custom tags, my importer could map the XMP CORE tags to them and your exporter could export those tags.
    Thanks for the work!
    Ian
    P.S. I'll check through your script tomorrow, some of the database tables changed between 1.5.6 and 2.0, so you might need to add in a version check to be really thorough.

  • When I mail merge a message that incudes a table with an excel spreadsheet, the table disappears and the data appears in list form

    I've tried both creating the table using Thunderbird, as well as creating the table in Word first and the problem is the same. I've reinstalled and updated both the mail merge add on and Thunderbird.

    If you do not need all the excel specific items you can just write it to a spreadsheet using the write to spreadsheet file vi's.
    If you want to go the excel route you will have to use active x. you can see a lot of examples on the excel board under the breakpoint forum. please post a sample of how you want your data to look and I can maybe help explain what options you have. and also oyu do not necesarily need the report generation toolkit.
    Joe.
    "NOTHING IS EVER EASY"

  • Download as a CSV file (excel)

    hi all,
    I am trying to download it as a CSV file (local and unix files), but when i get the data in excel , the issue occurs is:
    F1     F2     F3                                        
    OU Code     OU Name     OU Description                                        
    0000010000     0000010000-PG/US/PRIM CARE                                             
    0000010001     0000010001-PG/US/APOTH COMMODIT     APOTHECON COMMODITY                                        
    note: in the first line iam getting as F1,F2 & F3. i dont want these to come, rest all iam getting it perfectly.
    For downloading it i used the below code:
    *&      Form  DOWNLOAD_FILE
          text
    -->  p1        text
    <--  p2        text
    FORM DOWNLOAD_FILE .
    **Add column headers
      clear x_out_prctr.
      x_out_prctr-prctr = 'OU Code'.
      x_out_prctr-ktext = 'OU Name'.
      x_out_prctr-ltext = 'OU Description'.
      x_out_prctr-OUTNAME = 'OU Type Name'.
      x_out_prctr-OTNAME = 'Organization Type Name'.
      x_out_prctr-POUCODE = 'Parent OU'.
      x_out_prctr-STATUS =  'Status'.
      x_out_prctr-OUOUNAME = 'OU Owner'.
      x_out_prctr-OUAUNAME = 'OU Assistant'.
      x_out_prctr-OUCUNAME = 'OU Controller'.
      x_out_prctr-OUMRUNAME = 'OU MSP Rep'.
      Insert x_out_prctr into it_out index 1.
    Insert x_out_prctr into it_out1 index 1.
      clear x_out_prctr.
      IF p_local = c_x.
        perform gui_download.
      elseif p_unix = c_x.
        open dataset p_file for output in text mode encoding non-unicode
            ignoring conversion errors.
        if sy-subrc = 0.
    *-For Profit Center
          loop at it_out into x_out_prctr.
            transfer x_out_prctr to p_file.
            if sy-subrc ne 0.
              write:/ 'Error writing file'(011), p_file.
              stop.
            endif.
          endloop.
        endif.
      Close dataset
        close dataset p_file.
      endif.
    ENDFORM.                    " DOWNLOAD_FILE
    *&      Form  GUI_DOWNLOAD
          text
    -->  p1        text
    <--  p2        text
    FORM GUI_DOWNLOAD .
      DATA : lv_fname TYPE string.
      CLEAR lv_fname.
      lv_fname = p_file.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                = lv_fname
          FILETYPE                = 'DBF'
        TABLES
          DATA_TAB                = it_out
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " GUI_DOWNLOAD
    could any one solve my issue ASAP?
    Regards,
    Shalini

    Hi Karthik,
    when i give the file type as ASC it  is not working, The column heading are getting messed up when i use this. the column heading is coming in one text line. but when i changed it to other one...everthing is working fine...but....in the downloaded file in the first line iam getting the F1 ,F2, F3 ..which i dont want it. if i delete this line my problem will be solved.
    my program code is:
                     Includes                                            *
    *--- BMS standard header and footer routines
    INCLUDE zsrepthd.
    *--- ALV Routinesg
    INCLUDE zvsdi_alv_routines_ver3.
    *--- Authorization Check
    INCLUDE z_selection_auth_check.
                     Types Declarations                                  *
    **-Profit Center
    *-For CEPC table
    TYPES: BEGIN OF ty_cepc,
            prctr TYPE prctr,
            datbi TYPE datbi,
           END OF ty_cepc.
    *-For CEPCT table
    TYPES: BEGIN OF ty_cepct,
            prctr TYPE prctr,
            datbi TYPE datbi,
            ktext TYPE ktext,
            ltext TYPE ltext,
           END OF ty_cepct.
    *-Output field name
    TYPES: BEGIN OF ty_output,
            prctr(10) TYPE c,
            ktext(40) TYPE c,
            ltext TYPE ltext,
            OUTNAME(13) TYPE c,
            OTNAME(30) TYPE c,
            POUCODE(13) TYPE c,
            STATUS(8) TYPE c,
            OUOUNAME(17) TYPE c,
            OUAUNAME(30) TYPE c,
            OUCUNAME(30) TYPE c,
            OUMRUNAME(17) TYPE c,
           END OF ty_output.
                     Internal Table Declarations                         *
    DATA:
    *--- Alv parameters
         it_out_alvp TYPE typ_alv_form_params, "for alv parameters
    **--To store prctr for profit center data
         it_profit_prctr type standard table of ty_cepc,
    **--To store text for profit center data
         it_text_prctr type standard table of ty_cepct.
    **--To store output for profit center data
    DATA: BEGIN OF it_out occurs 0,
            prctr(10) TYPE c,
            ktext(40) TYPE c,
            ltext TYPE ltext,
            OUTNAME(13) TYPE c,
            OTNAME(30) TYPE c,
            POUCODE(13) TYPE c,
            STATUS(8) TYPE c,
            OUOUNAME(17) TYPE c,
            OUAUNAME(30) TYPE c,
            OUCUNAME(30) TYPE c,
            OUMRUNAME(17) TYPE c,
           END OF it_out.
                     Work Area Declarations                              *
    DATA: x_profit_prctr type ty_cepc,
          x_text_prctr type ty_cepct,
          x_out_prctr type ty_output,
                     Data Declarations                                   *
          v_prctr TYPE cepc-prctr,
          l_prctr(10) TYPE c,
          l_ktext(40) TYPE c.
                     Constants Declarations                              *
    CONSTANTS: c_0  TYPE char1 VALUE '0',
               c_x  TYPE char1 VALUE 'X'.
                     Selection Screen                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-fr1.
    SELECT-OPTIONS:  s_prctr FOR v_prctr.
    PARAMETERS:      p_date TYPE sy-datum OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-fr2.
    PARAMETERS: p_local RADIOBUTTON GROUP rb1 USER-COMMAND cmd DEFAULT 'X',
                p_unix  RADIOBUTTON GROUP rb1,
                p_file TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK b2.
                     Initialization                                      *
    INITIALIZATION.
                     At Selection Screen                                 *
    AT SELECTION-SCREEN.
                     At Selection value request                          *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      IF p_local = c_x.
    *--- Getting F4 help for Costcenter file
        PERFORM get_filename CHANGING p_file.
      ELSEIF p_unix = c_x.
        MESSAGE i999(zi) WITH 'This fucntion is not available'(i01).
      ENDIF.
                     Start-of-Selection                                  *
    START-OF-SELECTION.
    *--- Check Authorizations for Selection-screen
      PERFORM z_selection_auth_check.
    **-- Get the profit center data from tables CEPC,CEPCT
      PERFORM f_get_profitcenter.
                     End-of-Selection                                    *
    END-OF-SELECTION.
    **-- Download data to final internal table.
      PERFORM data_output.
      IF NOT it_out[] IS INITIAL.
    *--- Fill the structure for calling the ALV form
        PERFORM initialize_alv_params.
    **-- Display ALV Report
        PERFORM setup_and_display_alv_ver2
           USING
            it_out_alvp      "Parameter structure
            it_out[]         "Internal Data table(header table)
            it_out[].        "Dummy table for Hierarchical ALV!!(item table)
    **-- Down load to excel.
        PERFORM download_file .
      ENDIF.
    *&      Form  f_top_of_page
    *This is to write the top of page
    FORM top_of_page.
      DATA:  lt_list TYPE slis_t_listheader,
             lx_list TYPE slis_listheader.
    *--- Title name
      CLEAR lx_list.
      lx_list-typ  = 'S'.
      lx_list-key  = 'Title name'(t13).
      lx_list-info = sy-title.
      APPEND lx_list TO lt_list.
      IF NOT lt_list IS INITIAL.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            it_list_commentary = lt_list.
      ENDIF.
    ENDFORM.                    "top_of_page
    *&      Form  init_page_head
    Description : This subroutine initializes the fields in table BHDGD  *
                  for printing the report heading.                       *
    FORM init_page_head.
      bhdgd-line1  = 'Profit Center Extraction'(h04).
      bhdgd-line2  = sy-title.
      bhdgd-lines  = sy-linsz.
      bhdgd-fcpyrt = sy-uline.
      bhdgd-inifl  = '0'.
    ENDFORM.                    "init_page_head
    *&      Form  initialize_alv_params
    Description : Form to initialize ALV Params
    FORM initialize_alv_params.
      CONSTANTS: lc_alv_grid  TYPE char1 VALUE 'G',  "Grid
                 lc_u         TYPE char1 VALUE 'U'.
      MOVE 'IT_OUT' TO  it_out_alvp-tablname.   "final TABLE
      MOVE sy-repid    TO   it_out_alvp-repid.
      MOVE lc_alv_grid TO   it_out_alvp-alvtype.
      MOVE c_x         TO   it_out_alvp-bringdefaultvar.
      MOVE lc_u        TO   it_out_alvp-variantsavetype.
    ENDFORM.                    " initialize_alv_params
          FORM it_out_init_events                                       *
    -->this is form is to modify the events
    FORM it_out_init_events
          CHANGING
           alevnts TYPE slis_t_event.
      FIELD-SYMBOLS <alevnt> TYPE slis_alv_event.
      LOOP AT alevnts ASSIGNING <alevnt>.
        CASE <alevnt>-name.
          WHEN  slis_ev_top_of_page.
            MOVE 'TOP_OF_PAGE'  TO <alevnt>-form.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    "it_out_init_events
    *&      Form  get_filename
    Description : This subroutine is used for F4 Prompting
    FORM get_filename CHANGING p_path LIKE rlgrap-filename.
      DATA : l_file  LIKE ibipparms-path, "Local file for upload/download
             l_repid LIKE syst-cprog,     "ABAP program, caller in external
                                          "procedures
             l_dynnr TYPE syst-dynnr.     "Current screen No
      l_repid = syst-cprog.
      l_dynnr = syst-dynnr.
    *--- Function module used for F4 help
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = l_repid
          dynpro_number = l_dynnr
        IMPORTING
          file_name     = l_file.
      MOVE l_file TO p_path.
    ENDFORM.                    " get_filename
    *&      Form  F_GET_PROFITCENTER
    *Get the profit center data from CEPC,CEPCT
    FORM f_get_profitcenter.
      SELECT prctr
             datbi
             from cepc
             into table it_profit_prctr
             where prctr in s_prctr
             and   datbi >= p_date.
      IF sy-subrc = c_0.
        SORT it_profit_prctr BY prctr datbi.
      ENDIF.
      If not it_profit_prctr is initial.
        SELECT prctr
               datbi
               ktext
               ltext
               from cepct
               into table it_text_prctr
               for all entries in it_profit_prctr
               where prctr = it_profit_prctr-prctr
               and   datbi = it_profit_prctr-datbi.
        IF sy-subrc = c_0.
          SORT it_text_prctr BY prctr datbi ktext ltext.
        ENDIF.
      endif.
    ENDFORM.                    " F_GET_PROFITCENTER
    *&      Form  DATA_OUTPUT
          text
    -->  p1        text
    <--  p2        text
    FORM DATA_OUTPUT .
      loop at it_profit_prctr into x_profit_prctr.
        read table it_text_prctr into x_text_prctr with key prctr =
                                                x_profit_prctr-prctr
                                                            datbi =
                                                x_profit_prctr-datbi.
        if sy-subrc = 0.
          x_out_prctr-prctr = x_text_prctr-prctr.
          concatenate x_text_prctr-prctr x_text_prctr-ktext into l_ktext
           separated by '-'.
          x_out_prctr-ktext = l_ktext.
          x_out_prctr-ltext = x_text_prctr-ltext.
          x_out_prctr-outname = 'Profit Center'.
          x_out_prctr-status = 'Active'.
        endif.
        append x_out_prctr to it_out.
      endloop.
    ENDFORM.                    " DATA_OUTPUT
    *&      Form  DOWNLOAD_FILE
          text
    -->  p1        text
    <--  p2        text
    FORM DOWNLOAD_FILE .
    **Add column headers
      clear x_out_prctr.
      x_out_prctr-prctr = 'OU Code'.
      x_out_prctr-ktext = 'OU Name'.
      x_out_prctr-ltext = 'OU Description'.
      x_out_prctr-OUTNAME = 'OU Type Name'.
      x_out_prctr-OTNAME = 'Organization Type Name'.
      x_out_prctr-POUCODE = 'Parent OU'.
      x_out_prctr-STATUS =  'Status'.
      x_out_prctr-OUOUNAME = 'OU Owner'.
      x_out_prctr-OUAUNAME = 'OU Assistant'.
      x_out_prctr-OUCUNAME = 'OU Controller'.
      x_out_prctr-OUMRUNAME = 'OU MSP Rep'.
      Insert x_out_prctr into it_out index 1.
    Insert x_out_prctr into it_out1 index 1.
      clear x_out_prctr.
      IF p_local = c_x.
        perform gui_download.
      elseif p_unix = c_x.
        open dataset p_file for output in text mode encoding non-unicode
            ignoring conversion errors.
        if sy-subrc = 0.
    *-For Profit Center
          loop at it_out into x_out_prctr.
            transfer x_out_prctr to p_file.
            if sy-subrc ne 0.
              write:/ 'Error writing file'(011), p_file.
              stop.
            endif.
          endloop.
        endif.
      Close dataset
        close dataset p_file.
      endif.
    ENDFORM.                    " DOWNLOAD_FILE
    *&      Form  GUI_DOWNLOAD
          text
    -->  p1        text
    <--  p2        text
    FORM GUI_DOWNLOAD .
      DATA : lv_fname TYPE string.
      CLEAR lv_fname.
      lv_fname = p_file.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                = lv_fname
          FILETYPE                = 'DBF'
        TABLES
          DATA_TAB                = it_out
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " GUI_DOWNLOAD
          FORM it_out_alv_fieldcat_before                               *
    -->  PT_FCAT                                                       *
    -->  ALVP                                                          *
    FORM it_out_alv_fieldcat_before  CHANGING
        pt_fcat TYPE slis_t_fieldcat_alv
        alvp TYPE typ_alv_form_params.
      DATA: lx_fcat TYPE slis_fieldcat_alv.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'PRCTR'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'OU Code'(010).
      lx_fcat-seltext_m      = 'OU Code'(010).
      lx_fcat-seltext_s      = 'OU Code'(010).
      lx_fcat-reptext_ddic   = 'OU Code'(010).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'KTEXT'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'OU Name'(030).
      lx_fcat-seltext_m      = 'OU Name'(030).
      lx_fcat-seltext_s      = 'OU Name'(030).
      lx_fcat-reptext_ddic   = 'OU Name'(030).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'LTEXT'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'OU Description'(040).
      lx_fcat-seltext_m      = 'OU Description'(040).
      lx_fcat-seltext_s      = 'OU Description'(040).
      lx_fcat-reptext_ddic   = 'OU Description'(040).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'OUTNAME'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'OU Type Name'(013).
      lx_fcat-seltext_m      = 'OU Type Name'(013).
      lx_fcat-seltext_s      = 'OU Type Name'(013).
      lx_fcat-reptext_ddic   = 'OU Type Name'(013).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'OTNAME'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Organization Type Name'(030).
      lx_fcat-seltext_m      = 'Organization Type Name'(030).
      lx_fcat-seltext_s      = 'Organization Type Name'(030).
      lx_fcat-reptext_ddic   = 'Organization Type Name'(030).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'POUCODE'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Parent OU Code'(013).
      lx_fcat-seltext_m      = 'Parent OU Code'(013).
      lx_fcat-seltext_s      = 'Parent OU Code'(013).
      lx_fcat-reptext_ddic   = 'Parent OU Code'(013).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'STATUS'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Status'(008).
      lx_fcat-seltext_m      = 'Status'(008).
      lx_fcat-seltext_s      = 'Status'(008).
      lx_fcat-reptext_ddic   = 'Status'(008).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'OUOUNAME'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'OU Owner User Name'(017).
      lx_fcat-seltext_m      = 'OU Owner User Name'(017).
      lx_fcat-seltext_s      = 'OU Owner User Name'(017).
      lx_fcat-reptext_ddic   = 'OU Owner User Name'(017).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'OUAUNAME'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'OU Assistant User Name'(030).
      lx_fcat-seltext_m      = 'OU Assistant User Name'(030).
      lx_fcat-seltext_s      = 'OU Assistant User Name'(030).
      lx_fcat-reptext_ddic   = 'OU Assistant User Name'(030).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'OUCUNAME'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'OU Controller User Name'(030).
      lx_fcat-seltext_m      = 'OU Controller User Name'(030).
      lx_fcat-seltext_s      = 'OU Controller User Name'(030).
      lx_fcat-reptext_ddic   = 'OU Controller User Name'(030).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUT'.
      lx_fcat-fieldname      = 'OUMRUNAME'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'OU MSP Rep User Name'(017).
      lx_fcat-seltext_m      = 'OU MSP Rep User Name'(017).
      lx_fcat-seltext_s      = 'OU MSP Rep User Name'(017).
      lx_fcat-reptext_ddic   = 'OU MSP Rep User Name'(017).
      APPEND lx_fcat TO pt_fcat.
    ENDFORM.                    " it_out_alv_fieldcat_before
    Thanks & Regards,
    Shalini

Maybe you are looking for

  • Service billing for the material and service registers

    Dear All, I have doubt, if i do a sale of material 'X' and for the same material if i have to do a service invoice for rendering some service at the customer end. eg:- service charges for transportaion of the material to the customer place, doing ins

  • BP Address

    Dear Experts, In Purchase Order Form> Logistic Tab>Pay To Address> Address Component there is showing Building/Floor Tab but not showing in Pay To Address Tab and as well as not showing in PLD of Purchase Order. Plz explain why Building/floor option

  • Workbench request released

    Hi, I accidentally released a workbench request for Asset Accounting in R/3.  I have tried numorously to delete the request even in R/3.  I now have an error when I try to change a query.  Is there any way that a request can be deleted/changed after

  • SUM and MAX Function ON PI

    HI Experts, AM Doing Idoc to File scenario, Target field   is SUPDAT     Formula     MAX( EDATU ) of all E1EDP20 segments of the current ORDERS05-E1EDK01-E1EDP01 segment. Target field is PLNQTY     Formula     SUM( WMENG - AMENG ) of all E1EDP20 segm

  • Business Rules Runtime Prompts

    Hello, in my planning application, i have a few business rules that cannot be linket do any dataform. Users must run them directly via "Tools->Business Rules" menu'. These Business Rules have Runtime Prompt. User can fill them directly in the text fi