IDoc to XLS file out

Hi,
I am trying to create an interface: (R/3)  - XI - Legacy.
From R/3, IDoc proxy will generate flat file which will be passed to XI for output of XLS file. Can anyone give step by step for how to create XLS output file?
Thanks.

Hi,
Check out this link which will talk about how to convert IDOC into a flat file using ABAP mapping.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
You can follow the same logic and convert it into Excel file, for more details about converting IDOC to a file refer this thread Process Integration (PI) & SOA Middleware
Also this thread talks abt saving IDOC as a Excel file and the code is given
Idoc to Excel
Thanks,
Prakash

Similar Messages

  • Print xls-file out of optical archive

    Hello archive-gurus,
    I'm storing xls-files in our optical archive which are bound with several business objects. I'd like to print the files out of the archive.
    Does somebody know, if that's possible? Is there a FM?
    Thanks,
    Martin

    Hi Martin,
    If this is SAP standard object there will already be function modules/programs available to read from archive. Check transaction AOBJ and setting of the object. There you can find the read program.
    But if it is custum object, you have write the read program yourself using FM ARCHIVE*
    Also check the following site
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/3e4dd8462a11d189000000e8323d3a/content.htm

  • EDIFACT File TO IDOC Archive directory file name.

    HI Experts,
    I have EDIFACT file to IODC scenario. I have  multiple source file locaiton but only one Archive location directory.But I have three different kind of file coming form three different location.
    we can only have one archive directory per service, is it possible to manipulate the file name so we can tell if files were successful or failed?
    For example, FileName1.txt, if it was successful, it would move to the archive directory and rename to u201CFileName1.txt.PASSu201D,
    if it failed it would move to archive directory like u201CFileName1.txt.FAILu201D. Is this functionality possible?
    Or will we just have to rely on Alert Categories to tell us when files have failed?
    Kindly give your valuable suggestion.
    Regards,
    Sumit Gupta

    >
    sumit gupta wrote:
    > HI Experts,
    >
    > I have EDIFACT file to IODC scenario. I have  multiple source file locaiton but only one Archive location directory.But I have three different kind of file coming form three different location.
    >
    > we can only have one archive directory per service, is it possible to manipulate the file name so we can tell if files were successful or failed?
    > For example, FileName1.txt, if it was successful, it would move to the archive directory and rename to u201CFileName1.txt.PASSu201D,
    > if it failed it would move to archive directory like u201CFileName1.txt.FAILu201D. Is this functionality possible?
    > Or will we just have to rely on Alert Categories to tell us when files have failed?
    >
    > Kindly give your valuable suggestion.
    >
    > Regards,
    > Sumit Gupta
    When you say success or failure does it mean a successful IDoc created in SAP? if so you will have to use a BPM and on successful creation fo the IDoc write the file out with the PASS name else FAIL name.
    you can also look at employing  scripts but there is no standard feature for this requirement. I gather alert is a better option.

  • APEX 4.0: error while opening a XLS file downloaded from interactive report

    Hi,
    I'm getting below error while opening a XLS file downloaded from an interactive report (APEX 4.0).
    "The file you trying to open, 'customer_2.xls', is in a different format than specified by the file extension.
    Verify that the is not corrupted and is from a trusted source before opening file. Do you want to open file."
    Yes No Help
    May be this one Apex 4.0 issue.
    please help me.
    Thanks
    Mukesh

    Hi,
    is the next part of the code correct.
    What i mean is packing of the attachment, finding out the size of pdf file and doc type as PDF.
    You can also try below link..
    Link: [http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
    Hope this helps.
    Regards,
    -Sandeep

  • How to read .xls file from FTP server t oInternal table

    Hi
    am using the FTP_SERVER_TO_R3 to read xls file from FTP server to internal table
    but the data i get in LT_TEXT is special characters.
    CALL FUNCTION 'FTP_SERVER_TO_R3'
    EXPORTING
    handle = hdl
    fname = f_name "ProdDataFromCRM.xls.
    * CHARACTER_MODE = 'X'
    * IMPORTING
    * BLOB_LENGTH =
    TABLES
    BLOB = lt_text
    * TEXT = lt_text
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4
    can any one help me out to get the exact data..
    Really appreciate your quick response..
    Thank You

    Hi, if you really retrieve an excel file, you can not see the data in ABAP. You may see them in Excel. For this you may use
    CALL METHOD document->open_document_from_table
    of the interface i_oi_document_proxy for OLE objects. You can access the data with reference to the interface i_oi_spreadsheet.
    Please check [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf] for details.
    But, who knows, perhaps you want "And Now For Something Completely Different".
    Regards
    Clemens

  • To open & Edit the XLS file in edit mode after Extracting SAP data into it

    Hello Experts,
      I have a requirement to open and edit the xls file imidiately after downlaoding the SAP data into this XLS file. The XLS file is getting saved on presentation server (e.g. Destop/C: drive).
      I have used function module "GUI_DOWNLOAD" OR "DOWNLAOD" to download the data from SAP table to XLS file. But now I need this XLS file to be get opned automatically after finishing the Download, so that user can make changes into XLS file and can save the changes into it. After saving I have to upload this modified Data into SAP table again.
    For this I am really not aware how to get it done..but I believe you experts will definately help me out..waiting for your reply.
    Thanks,

    HI,
    did you ur problem was solved if not check this code once.
    now only i tried it my system , it opens xl file and save all data in it.
    DATA: ZKNA1 LIKE STANDARD TABLE OF KNA1 WITH HEADER LINE.
    SELECT * FROM KNA1 INTO TABLE ZKNA1.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
      EXPORTING
        FILE_NAME                       = 'C:\Documents and Settings\rajesh.NACL\Desktop\XLSSDSDS.XLS'
      CREATE_PIVOT                    = 0
      DATA_SHEET_NAME                 = ' '
      PIVOT_SHEET_NAME                = ' '
      PASSWORD                        = ' '
      PASSWORD_OPTION                 = 0
    TABLES
      PIVOT_FIELD_TAB                 =
       DATA_TAB                        = ZKNA1[]
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_NOT_EXIST                  = 1
      FILENAME_EXPECTED               = 2
      COMMUNICATION_ERROR             = 3
      OLE_OBJECT_METHOD_ERROR         = 4
      OLE_OBJECT_PROPERTY_ERROR       = 5
      INVALID_PIVOT_FIELDS            = 6
      DOWNLOAD_PROBLEM                = 7
      OTHERS                          = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    thanq,
    rajesh.k

  • XLS Files created by SSRS will not open in Numbers on the iPad

    The company I work for creates business intelligence reports which are used in an education environment and are created daily and e-mailed out to staff.  These reports contain fairly simple tables with pupil data.
    One customer uses iPads extensively to maximise the quick response to this (behaviour) data.  There is an issue which seems to be prevalent in newer versions of Numbers where these documents can not be opened.  I note a previous discussion on this matter where the only solution was to save the file in excel and then the sheets would open.  This is not really an option here.
    I presume that there is some data missing in the header of the XLS file or something but if anyone has any information on this, especially if I can adapt the report in any way to include this data, please let me know if you have overcome a similar issue and how you went about it.
    Thanks,
    Pete H

    Hi - thank you for your responses.  I don't have an iPad so testing is all being done on site.
    The report is based on three tabs, each producing a basic table with data in.  I can create the reports in CSV and they work fine although the format is all wrong (no tabs etc etc) - but that would lead me to believe that it is nothing in the actual data which is causing the load error.  It also seems fairly intermittent, so I tested with a few different file sizes to make sure it wasn't this - and again nothing too conclusive there.
    I presume quicklook is the built in function to view a file, I spotted this today but again it won't open in that or then again when asked to open in Numbers.
    Hunting around this forum it seems there is some issue in general with opening some XLS files (especially ones created by SSRS) depending on iOS version, so that is the route I will be looking at tomorrow.  Putting these files through a save loop in excel isn't really an option, so I am going to test with a go between e-mail tomorrow which has in some cases seemed to do the trick - maybe appending something to the original file.  Some other posts have suggested that an XLSX file seems to work a lot better and that is supported in MS SQL 2012 which is on the way for our customers at some point.
    Definitely an awkward one!
    Thanks,
    Pete

  • SEARCH: Widget that shows a PDF or XLS File

    Hey,
    I am looking for a widget which can show me a pdf or XLS file (Picture would be a possible work around).
    Best would be to show a small kind of thumbnail and a magnifying class to look up details. So far about the wish list .
    Reason is my weekly time-planner - I use a XLS sheet in adoption of Steven Covey's "7 Habits of highly effiective people" - and in order to be even more effective, I would like to make this visible
    Thanks for the help
    Marcus
    MacBook Mac OS X (10.4.6)

    for PDF, try this out...
    http://www.apple.com/downloads/dashboard/status/dashclipping.html
    allows you to use a URL to display in a window. nice widget. I use it to check a site or two, but i have tested on local PDF files, and it works fine...
    eg:
    URL = file://localhost/Users/usernamehere/Desktop/example.pdf
    Beavis2084

  • Upload .xls file in internal table in web dynpro abap

    Hi everyone,
    i want to upload .xls(excel file) into an internal table.....after lots of attempts i came to a conclusion that web dynpro only supports .CSV(another format of excel file) to be uploaded into internal table....i tried many ways....is there a way i can upload .xls file...kindly help me in the same. following is the code i m using
      DATA LO_EL_CONTEXT TYPE REF TO IF_WD_CONTEXT_ELEMENT.
      DATA LS_CONTEXT TYPE WD_THIS->ELEMENT_CONTEXT.
      DATA ITEM_FILE TYPE WD_THIS->ELEMENT_CONTEXT-EXCEL_UPLOAD.
      get element via lead selection
      LO_EL_CONTEXT = WD_CONTEXT->GET_ELEMENT( ).
      @TODO handle not set lead selection
      IF LO_EL_CONTEXT IS INITIAL.
      ENDIF.
      get single attribute
      LO_EL_CONTEXT->GET_ATTRIBUTE(
        EXPORTING
          NAME =  `EXCEL_UPLOAD`
        IMPORTING
          VALUE = ITEM_FILE ). "xstring format
    DATA S_CONT TYPE STRING.
    DATA CONVT TYPE REF TO CL_ABAP_CONV_IN_CE.
    DATA: FIELDS1 TYPE STRING_TABLE.
    1st tried this code-> using "cl_abap_conv_in_ce"
    CALL METHOD cl_abap_conv_in_ce=>create
    EXPORTING
    *encoding = c_encoding "optional
    input = ITEM_FILE
    RECEIVING
    conv = CONVT.
    CALL METHOD CONVT->read
    IMPORTING
    data = S_CONT.
    when it didnt work out...then tried followin function module
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          IN_XSTRING        = ITEM_FILE "xsrting
       IMPORTING
         OUT_STRING          = S_CONT
    TYPES: BEGIN OF TY_TAB,
           NAME_CHAR TYPE  STRING,
           DESCR_CHAR TYPE  STRING,
           NUMBER_DIGITS TYPE  STRING,
           END OF TY_TAB.
    DATA: FIELDS TYPE STRING_TABLE.
    DATA: LV_FIELD TYPE STRING.
    DATA: S_TABLE TYPE STRING_TABLE.
    DATA: ITAB TYPE TABLE OF TY_TAB.
    DATA: STR_ITAB TYPE TY_TAB.
    *splits string based on new line
    SPLIT S_CONT AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE S_TABLE.
    FIELD-SYMBOLS: <WA_TABLE> LIKE LINE OF S_TABLE.
    LOOP AT S_TABLE ASSIGNING <WA_TABLE>.
    splits string on basis of tabs
      SPLIT <WA_TABLE> AT ',' INTO
                      STR_ITAB-NAME_CHAR
                      STR_ITAB-DESCR_CHAR
                      STR_ITAB-NUMBER_DIGITS.
      APPEND STR_ITAB TO ITAB.
    ENDLOOP.
    I am able to do the uploading if the file is in .CSV format and not .XLS format....
    there are lots of forums on SDN for the same....but at the end there is no solution provided.....
    experts kindly solve it this time...thanks in advance

    Hi,
    It is not possible to upload an xls file because it will be having some binary characters. better to go with .csv file format.
    Refer this [link too|Re: Excel File Uplaod] it will explain you clearly.
    Regards
    Arun.P

  • Extra Rows in the Crystal Report while generating XLS files

    I was tring to gerate a xls file in crystal reports which has four sub-reports but while getting the output it gives a blank row for every 51 rows or so one of the subreport which has bult data. Let me know if any one can help me out in this consern.

    What about answers to questions 2 and 3?
    2) What CR Service Pack are you on?
    4) Assuming you are using a stand-alone version of CR, how's the export from the CR designer?
    It may be that continuing this thread is not worth while if I can not get the basic info(?). Creating a phone case may be an option for you:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300
    Ludek

  • After upgrading to ios6 my iphone will not open .xls files in emails with the default viewer. Is there a fix for this? The same emailed .xls files still open on my ipad using ios5 while viewing email like they did on my iphone prior to upgrading.

    After upgrading to ios6 my iphone will not open .xls files in emails with the default viewer. Is there a fix for this? The same emailed .xls files still open on my ipad using ios5 while viewing email like they did on my iphone prior to upgrading. I have no special software like numbers or anything else installed on either device. Just using the default viewer provided by apple for viewing email.

    The attachment is an .xls excel 97-2003 spreadsheet. I viewed the file in the email and did not edit it with any software. I can forward the file to anyone that is may want to check it out to see if they can help me. I was wondering if there was some way of forcing another ios6 install on my phone and maybe that would solve it.
    Is there anyone out there that is viewing .xls files in email using ios6 w/o any other software installed like numbers or any other add ons? I am not upgrading my ipad from ios5 to ios6 so I can still continue to view the emails on my ipad. Is there an email viewer .xls plug-in that will be availablle in the next ios6 update?

  • Using XML for Live Data- How do you get the XML file to pull data from another xls file?

    Post Author: joseph_atkinson
    CA Forum: Xcelsius and Live Office
    I was wondering you can help me.
    I am currently receiving an *.xls reports on a daily basis (same report, same format, different data). I have put this report into Crystal Xcelcius Designer 4.5 Professional version and created the dashboard I want.
    I am aware of the xml mapping functionality where I can map from the *.swf straight to a database. However, is it possible to map to an xls file that will change on a daily basis? (obviously I can you the refresh button in Designer, but I need to automate this process).
    Your help really would be appreciated.
    Joe

    In Firefox, I'm seeing a bad icon for your zip files. I can
    download it,
    but it looks like something might be amiss with your zip
    files
    themselves.
    Al Sparber - PVII
    http://www.projectseven.com
    Popup Menus | Image Galleries | CSS Tutorials & Templates
    Newsgroup: news://forums.projectseven.com/pviiwebdev/
    CSS Newsgroup: news://forums.projectseven.com/css/
    DW Newsgroup: news://forums.projectseven.com/dreamweaver/
    "Conjurer" <[email protected]> wrote in message
    news:e8upg1$kee$[email protected]..
    > Conjurer wrote:
    >> Boy - I thought this was as simple as creating an
    <a> tag link to the
    >> file like you do with Word docs and Excel xls files.
    So I wrote my
    >> link as follows:
    >>
    >> <li><a
    href="OMGMASalSvy/Survey.zip">2006 Adminsistrators
    >> Survey.zip</a></li>
    >>
    >> But when I click on it I get a big nothing!
    >>
    >> I put the files out there on the host and the
    Word/Excel links all
    >> work great.
    >>
    >> Is there some secret magic to this one?
    >>
    >> My page links are at:
    http://www.omgma.com/surveyforms.htm#Documents
    >>
    >> Thanks for any help.
    >
    >
    > I guess it is working in IE but not in Firefox.... hmmm

  • IDoc to Flat File in SAP PI 7.11

    Hi Experts,
    I am working on PI 7.11 and I have scenario from Idoc to Flat File.
    Idoc is posted from source side R/3 system.My requirement is "With out Converting the Idoc structure to XML Structure  i want to send the data to Target system i.e. File system.
    But the structure of the target structure is different from source structure.
    My questions are:
    1). Is it Possible to send the data to Target system without converting Idoc structure in to xml format through our PI 7.11 ?
    2). If possible please provide me the way that executes in the Interface is?
    Could you please provide the Inputs.
    Best regards,
    satya.T
    Edited by: satyatanuku on May 24, 2010 3:26 PM
    <Moved from Trial, Preview~ forum>
    Edited by: Prateek Raj Srivastava on May 25, 2010 1:02 PM

    Hello Folks ,
    I am also facing the same scenario please provide me any options to achieve this scenario .
    I am searched in Forums of SDN but no inputs or blogs available.
    Let me know i am having one solution is it right or wrong ?
    we have to achieve this IDOC Tunneling .... is it right  friends ?
    Still inputs required....
    Regards,
    Ravi.

  • IDOC to flat File----Problem in File Content Conversion at receiver

    hi experts,
    I am doing a IDOC to flat file secnario.
    My requirment is IDOCXI-Flat file
    Format of flat file is like:--
    Every segment in the IDOC will be converted into a single line of file(without any delimiter). So number of lines in flat file will be equal to number of segments in IDOC.
    I am facing problem in File Content conversion. 
    Please help me out..
    Thanks
    Jaideep

    Check this doc...
    [How To...Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0 |https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a]

  • How to create a xls file from String [ ][ ]

    Hi, I have a java class where I can read the content of files xls and store this information in a String [][].
    But now, I have to do the opposite.
    I have a String[][] where the information is. And I have to guard this information in a file xls.
    My code when I read xls to String[][] is:
    import java.io.*;
    import java.io.File;
    import jxl.Workbook;
    import jxl.Sheet;
    import jxl.Cell;
    import jxl.*;
    public class ReadfichExcel
        private static int numCols;
        private static int numRows;
    public static String[] dimensionFile(String pathFolder, String file){
        String [] dimension = new String[2];
        try{
            Workbook libro = Workbook.getWorkbook(new File(pathFolder+"/"+file));
            Sheet hoja = libro.getSheet(0);
            numRows = hoja.getRows();
            numCols = hoja.getColumns();
        catch (Exception e)
            e.printStackTrace();
            return null;
        dimension[0] = String.valueOf(numRows);
        dimension[1] = String.valueOf(numCols);
        return dimension;
    }How can I do to create a file xls with the information of a String [] []?
    Thanks very much

    I have solved the problem:
    http://www.andykhan.com/jexcelapi/tutorial.html#writing
    What do you want to do then? Do you want to read the contents of the Excel file into the array?I only wanted to create a xls file with the information I have in a String[][]. The code I posted before is the code I ussually use to read a xls file.
    Next to create and write a xls file I'd do:
    public static int CreateTemp (File folderUser, String file, String [][] table)
        int exito = 0;
        int rows = table.length;
        int cols = table[0].length;          
        if (!folderUser.exists())
            folderUser.mkdir();
        try
            WritableWorkbook libro = Workbook.createWorkbook(new File(folderUser+"/"+file));
            WritableSheet hoja = libro.createSheet("First Sheet",0);
            // BEGIN TO WRITE
            for (int i=0;i<rows;i++)
                for (int j=0; j<cols;j++)
                    Label label = new Label(j, i, table[i][j]);
                    hoja.addCell(label);
            }// FOR
            // All sheets and cells added. Now write out the workbook
            libro.write();
            libro.close();
            exito = 1;
        } catch (Exception e)
                e.printStackTrace();
                return 0;
        return exito;
    }Another question. As I want to copy into the xls file the information in the String[][], Is right to do this using as follow:
    Label label = new Label(j, i, table[i][j]);
    hoja.addCell(label); (there will be characters and numbers in the cells)
    Thanks for your response.

Maybe you are looking for