How to split column wise into separate flat files in ssis

IN SSIS...
1.---->I have a sales table country wise regions  like (india, usa, srilanka) ....
india usa
srilanka
a b
c
d e
f
so i want output like in
flat file1.txt has india               flat file2.txt has usa             flat file3.txt has srilanka
     a b
c
     d e
f
2.----->i dont know how many regions in my table....dynamically split into separate flat files ....
 pls help me.....thank u

I think what you can do is this
1. Do a query based on UNPIVOT to get the data as rows instead of columns
For that you can use a query like this
IF OBJECT_ID('temp') IS NOT NULL DROP TABLE temp
CREATE TABLE temp
Country varchar(100),
Val decimal(25,5)
DECLARE @CountryList varchar(3000),@SQL varchar(max)
SELECT @CountryList = STUFF((SELECT ',[' + Column_Name + ']' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '<SalesTableNameHere>' FOR XML PATH('')),1,1,'')
SET @SQL= 'SELECT * FROM <SalesTableNameHere> t UNPIVOT (Val FOR Country IN (' + @CountryList + '))p'
INSERT temp
EXEC (@SQL)
Once this is done you'll get data unpivoted to table
Then you can use a execute sql task with query like above
SELECT DISTINCT Country FROM Temp
Use resultset option as full resultset and store the result to an object variable
Then add a ForEach loop container with ADO enumerator and map to the object variable created above. Have variables inside loop to get inidvidual country values out.
Inside loop place a data flow task. Use a variable to store source query , make EvaluateAsExpression true for it and set Expression as below
"SELECT Val FROM Temp WHERE Country = " + @[User::LoopVariable]
Where LoopVariable is variable created inside loop for getting iterated values
Inside data flow task place a oledb source, choose option as  SQL command from variable and map to the above query variable.
Link this to flat file destination create a flat file connection manager. Set a dynamic flat file connection using expression builder. Make it based on a variable and set variable to increment based on loop iteration
The core logic looks similar to this
http://visakhm.blogspot.ae/2013/09/exporting-sqlserver-data-to-multiple.html
dynamic file naming can be seen here
http://jahaines.blogspot.ae/2009/07/ssis-dynamically-naming-destination.html
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • How to split PDF pages into separate pages?

    I have a PDF document that is in booklet format (i.e., front cover and rear cover on a single page) with two pages to a single 8-1/2 X 11 page size. Is there an application that can split the double pages into separate PDF pages? I don't want to use screen capture to create separate PDF's if there is a better way.

    There are a lot of utilities for PDF files so you might search at CNet Downloads or MacUpdate to see what's available. PDF Clerk and PDF Pen may let you drag each page out of the document as a separate file. Even Preview may let you do the same.

  • Export multiple tables into one flat file

    I have data in multiple tables on a processing database that I need to move up to a production database. I want to export the data into a flat file, ftp it to the production server and have another job pick up the file and process it. I am looking for
    design suggestions on how to get multiple tables into one flat file using SSIS?
    Thank You.

    Hey,
    Without a bit more detail, as per Russels response, its difficult to give an exact recommendation.
    Essentially, you would first add a data flow task to your control flow.  Create a source per table, then direct the output of each into an union all task.  The output from the union all task would then be directed to a flat file destination.
    Within the union all task you can map the various input columns into the appropriate outputs.
    If the sources are different, it would probably be easiest to add a derived column task in-between the source and the union all, adding columns as appropriate and setting a default value that can be easily identified later (again depending on your requirements).
    Hope that helps,
    Jamie

  • How to scan multiple photos into separate

    I have a hp envy 5660.  I often have to scan multiple photos and on my old printer it would show them as individual files on the scan page.  I can't figure out how to do that with this printer.  I want to scan multiple photos, have them save as individual phhotos so I can print them out on 4 x 6 photo paper.  Any ideas? Thanks!

    Hi @bird22557,
    Welcome to the HP Forums!
    I noticed that you are wondering how to scan multiple photos into separate files with your HP Envy 5660 printer on Windows 7. I am happy to look into this scanning issue for you!  
    I would recommend to go through this how to scan guide, Scan from Windows 7 With the Full Feature HP Software for HP Multifunction Printers, you can try with HP software or without HP software. As there are multiple ways of scanning.
    For future reference, here is your printer's user guide as well, HP ENVY 5660 e-All-in-One Printer User guides.
    Hope this helps, and thank you for posting!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • How to split one page into different frames in ADF?

    Hi,
    Can any one please guide me how to split a jspx into different frames.
    i.e., left frame contains <af:panelSideBar> which contains multiple <af:commandMenuItem> s. And whenver we click on the one <af:commandMenuItem>, it has to show the corresponing page inside center frame in this page itself. Is it possible in ADF? Which component we need to use?
    Can anyone guide me on this?
    Thanks in advance,
    Regards,
    Suresh Kethireddy

    You can use a combination of the ADF Faces 10.1.3 components like:
    af:panelPage
    af:panelSideBar
    af:panelHorizontal
    af:panelGroup
    to organize the screen layout, but it is not the interactive splitter that the 11g product provides.
    You can all all the 10.1.3 ADF Faces Components here:
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/imageIndex.html

  • How to split invoice/document  into two venders?

    Can anyone please tell me how to split invoice/document into two vendors.  Like if I get an invoice for $1000 and it needs to be splitted between father and son, $500 to each.  How would I set that up in SAP?  I am not sure if this will be an invoice split or a document split.
    Thanks
    Monika

    If you are using an FI  entry F-43 to generate invoice this can be done by giving the same invoice ref. in the Inv. Ref. field  for two vendors. This is manual
    Document Split will split the document between two profit center and not between vendors.

  • TCODE TO DOWNLOAD IDOC INTO A FLAT FILE

    Hi All,
       Please let me know if there is any tcode to download IDOC into a flat file..
    Regards,
    Kaveri

    try with we60 where you should have links to download the idoc type.
    Please check this:
    1. How to Download a Hierarchy to a Flat File
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
    2. How To Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0 Version 1.10
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    run the report RSEOUT00 with the idoc number, flat xml file will be generated at the location user/sap/XI/SYS/global/idoc_file
    Please rewrds if found help ful

  • How to load hierrarchies using dtp  using flat file  in bw  ineed clear ste

    how to load hierrarchies using dtp  using flat file  in bw  ineed clear steps

    Hi,
    If you want to load InfoObjects in the form of hierarchies, you have to activate the indicator with hierarchies for each of the relevant InfoObjects in the InfoObject maintenance. If necessary, you need to specify whether the whole hierarchy or the hierarchy structure is to be time-dependent, whether the hierarchy can contain intervals, whether additional node attributes are allowed (only when loading using a PSA), and which characteristics are allowed.
    1.Defining the source system from which you want to load data:
    Choose Source System Tree ® Root (Source System) ® Context menu (Right Mouse Button) ® Create.
    For a flat file, choose: File System, Manual Metadata; Data via File Interface.
    2.Defining the InfoSource for which you want to load data:
    Optional: Choose InfoSource Tree ®Root (InfoSources) ® Context Menu (Right Mouse Button) ® Create Application Component.
    Choose InfoSource Tree ® Your Application Component ® Context Menu (Right Mouse Button) ® Create InfoSource ® Direct Update
    Choose an InfoObject from the proposal list, and specify a name and a description.
    3.Assigning the source system to the InfoSource
    Choose InfoSource tree ® Your Application Component ® One of your InfoSources ® Context Menu (Right Mouse Button) ® Assign Source System. You are taken automatically to the transfer structure maintenance.
    The system automatically generates DataSources for the three different data types to which you can load data.
          Attributes
          Texts
          Hierarchies (if the InfoObject has access to hierarchies)
    The system automatically generates the transfer structure, the transfer rules, and the communication structure (for attributes and texts).
    4.Maintaining the transfer structure / transfer rules
    Choose the DataSource to be able to upload hierarchies.
    Idoc transfer method: The system automatically generates a proposal for the DataSource and the transfer structure. This consists of an entry for the InfoObject, for which hierarchies are loaded. With this transfer method, during loading, the structure is converted to the structure of the PSA, which affects performance.
    PSA transfer method: The transfer methods and the communication structure are also generated here. 
    5.Maintaining the hierarchy:
    Choose Hierarchy Maintenance, and specify a technical name and a description of the hierarchy.
    PSA Transfer Method: You have the option here to set the Remove Leaf Value and Node InfoObjects indicator. As a result, characteristic values are not transferred into the hierarchy fields NODENAME, LEAFFROM and LEAFTO as is normally the case, but in their own transfer structure fields.  This option allows you to load characteristic values having a length greater than 32 characters.
    Characteristic values with a length > 32 can be loaded into the PSA, but they cannot be updated in characteristics that have a length >32.
    The node names for pure text nodes remain restricted to 32 characters in the hierarchy (0HIER_NODE characteristic).
    The system automatically generates a table with the following hierarchy format (for sorted hierarchies without removed leaf values and node InfoObjects):
    Description
    Field Name
    Length
    Type
    Node ID
    NODEID
    8
    NUMC
    InfoObject name
    INFOOBJECT
    30
    CHAR
    Node name
    NODENAME
    32
    CHAR
    Catalog ID
    LINK
    1
    CHAR
    Parent node
    PARENTID
    8
    NUMC
    First subnode
    CHILDID
    8
    NUMC
    Next adjacent node
    NEXTID
    8
    NUMC
    Language key
    LANGU
    1
    CHAR
    Description - short
    TXTSH
    20
    CHAR
    Description - medium
    TXTMD
    40
    CHAR
    Description- long
    TXTLG
    60
    CHAR
    The system transfers the settings for the intervals and for time-dependency from the InfoObject maintenance. Depending on which settings you have defined in the InfoObject maintenance, further table fields can be generated from the system.
    The valid from and valid to field is filled if you select Total Hierarchy Time-dependent in the InfoObject maintenance. The time-dependent indicator is activated if you select the Hierarchy Nodes Time-dependent option in the InfoObject maintenance.
    6.Save your entries.
    Depending on which settings you defined in the InfoObject maintenance, additional fields can be generated from the system. Also note the detailed description for Structure of a Flat Hierarchy File for Loading via an IDoc and for Structure of a Flat Hierarchy File for Loading via a PSA.
    Also find the below blog for your reference...
    /people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
    You can load hierarchy using process chain...
    Find the below step by step procedure to load hierarchy using process chain...
    http://help.sap.com/saphelp_nw70/helpdata/EN/3d/320e3d89195c59e10000000a114084/frameset.htm
    Assign points if this helps u...
    Regards,
    KK.
    Edited by: koundinya karanam on Apr 8, 2008 1:08 PM
    Edited by: koundinya karanam on Apr 8, 2008 1:09 PM

  • Export records into a flat file

    Hi...
    I have to export some tables into a flat file. The output must be like this:
    insert into table (col1, col2.....) value (one, two......)
    insert into table (col1, col2.....) value (one, two......)
    insert into table (col1, col2.....) value (one, two......)
    how can I do that.......with PLSQL code?
    Thanks
    Message was edited by:
    marckcos

    I got this package : and I got the follwing error:
    4:35:19 PM Execution failed: ORA-20011: GENERATE_STMT Error in populating file. Message: ORA-00904: "CHANGE_DATATYPE": invalid identifier
    What can I do?
    CREATE OR REPLACE PACKAGE BODY UTILITY
    IS
    -- VARIABLES USED by PROCEDURE generate_stmt
    -- File Related PACKAGE Variable
    cmn_file_handle UTL_FILE.file_type;
    PROCEDURE close_file
    IS
    BEGIN
    UTL_FILE.FCLOSE (cmn_file_handle);
    EXCEPTION
    WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    RAISE_APPLICATION_ERROR(-20003, 'File handle was invalid');
    WHEN UTL_FILE.INVALID_PATH THEN
    RAISE_APPLICATION_ERROR(-20004, 'Invalid path for file');
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20005, 'CLOSE_FILE Error in creating file. Message: ' || SQLERRM);
    END close_file;
    PROCEDURE open_file (
    prm_output_folder IN VARCHAR2,
    prm_output_file IN VARCHAR2)
    IS
    BEGIN
    cmn_file_handle := UTL_FILE.FOPEN (prm_output_folder, prm_output_file, 'a', 32767);
    EXCEPTION
    WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    close_file;
    RAISE_APPLICATION_ERROR(-20000, 'File handle was invalid');
    WHEN UTL_FILE.INVALID_PATH THEN
    close_file;
    RAISE_APPLICATION_ERROR(-20001, 'Invalid path for file');
    WHEN OTHERS THEN
    close_file;
    RAISE_APPLICATION_ERROR(-20002, 'OPEN_FILE Error in creating file. Message: ' || SQLERRM);
    END open_file;
    FUNCTION change_datatype (
    prm_value IN VARCHAR2,
    prm_data_type IN VARCHAR2)
    RETURN VARCHAR2
    IS
    BEGIN
    IF prm_value IS NULL THEN
    RETURN ('NULL');
    END IF;
    IF prm_data_type = 'C' THEN
    IF INSTR(prm_value, CHR(10)) > 0 THEN
    RETURN ('REPLACE(' || '''' || REPLACE (prm_value, CHR(10), CHR(977)) || '''' || ', CHR(977), CHR(10))');
    END IF;
    ELSIF prm_data_type = 'D' THEN
    RETURN ('TO_DATE(' || '''' || prm_value || '''' || ', ' || '''' || 'DD-MON-YYYY HH24:MI:SS' || '''' || ')');
    ELSIF prm_data_type = 'N' THEN
    RETURN (prm_value);
    END IF;
    RETURN ('''' || prm_value || '''');
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20002, 'CHANGE_DATATYPE Error in Converting DataType. Message: ' || SQLERRM);
    END change_datatype;
    PROCEDURE generate_stmt (
    prm_table_name IN VARCHAR2,
    prm_where_clause IN VARCHAR2,
    prm_output_folder IN VARCHAR2,
    prm_output_file IN VARCHAR2)
    IS
    TYPE ref_cols IS REF CURSOR;
    mmy_ref_cols ref_cols;
    mmy_column_name VARCHAR2(100);
    mmy_column_data_type VARCHAR2(1);
    mmy_col_string VARCHAR2(32767);
    mmy_query_col_string VARCHAR2(32767);
    BEGIN
    IF prm_table_name IS NULL OR
    prm_output_folder IS NULL OR
    prm_output_file IS NULL THEN
    RAISE_APPLICATION_ERROR(-20012, 'Invalid Argument Passed');
    END IF;
    OPEN mmy_ref_cols
    FOR SELECT LOWER(column_name) column_name,
    DECODE (data_type, 'VARCHAR2', 'C', 'CHAR', 'C', 'LONG', 'C', 'NUMBER', 'N', 'DATE', 'D') data_type
    FROM user_tab_columns
    WHERE table_name = UPPER(prm_table_name)
    ORDER BY column_id;
    LOOP
    FETCH mmy_ref_cols INTO mmy_column_name, mmy_column_data_type;
    EXIT WHEN mmy_ref_cols%NOTFOUND;
    mmy_col_string := mmy_col_string || mmy_column_name || ', ';
    IF mmy_column_data_type = 'D' THEN
    mmy_query_col_string := mmy_query_col_string || 'change_datatype(' || 'TO_CHAR(' || mmy_column_name || ', ' || '''' || 'DD-MON-YYYY HH24:MI:SS' || '''' || ')' || ', ' || '''' || mmy_column_data_type || '''' || ') || ' || '''' || ', ' || '''' || ' || ';
    ELSIF mmy_column_data_type IN ('N', 'C') THEN
    mmy_query_col_string := mmy_query_col_string || 'change_datatype(' || mmy_column_name || ', ' || '''' || mmy_column_data_type || '''' || ') || ' || '''' || ', ' || '''' || ' || ';
    END IF;
    END LOOP;
    CLOSE mmy_ref_cols;
    IF mmy_col_string IS NOT NULL AND
    mmy_query_col_string IS NOT NULL THEN
    IF NOT UTL_FILE.IS_OPEN(cmn_file_handle) THEN
    open_file(prm_output_folder, prm_output_file);
    END IF;
    mmy_col_string := 'INSERT INTO ' || LOWER(prm_table_name) || ' (' || CHR(10) || CHR(9) || CHR(9) || mmy_col_string;
    mmy_col_string := RTRIM (mmy_col_string, ', ');
    mmy_col_string := mmy_col_string || ')' || CHR(10) || 'VALUES ( ' || CHR(9);
    mmy_query_col_string := RTRIM (mmy_query_col_string, ' || ' ||'''' || ',' || '''' || ' || ') || ' one_pare';
    OPEN mmy_ref_cols
    FOR ' SELECT ' || mmy_query_col_string ||
    ' FROM ' || prm_table_name ||
    ' ' || prm_where_clause;
    LOOP
    FETCH mmy_ref_cols INTO mmy_query_col_string;
    EXIT WHEN mmy_ref_cols%NOTFOUND;
    mmy_query_col_string := mmy_query_col_string || ');';
    UTL_FILE.put (cmn_file_handle, mmy_col_string);
    UTL_FILE.put_line (cmn_file_handle, mmy_query_col_string);
    END LOOP;
    CLOSE mmy_ref_cols;
    If UTL_FILE.IS_OPEN(cmn_file_handle) THEN
    close_file;
    END IF;
    END IF;
    EXCEPTION
    WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    IF mmy_ref_cols%ISOPEN THEN
    CLOSE mmy_ref_cols;
    END IF;
    close_file;
    RAISE_APPLICATION_ERROR(-20009, 'File handle was invalid');
    WHEN UTL_FILE.INVALID_PATH THEN
    IF mmy_ref_cols%ISOPEN THEN
    CLOSE mmy_ref_cols;
    END IF;
    close_file;
    RAISE_APPLICATION_ERROR(-20010, 'Invalid path for file');
    WHEN OTHERS THEN
    IF mmy_ref_cols%ISOPEN THEN
    CLOSE mmy_ref_cols;
    END IF;
    close_file;
    RAISE_APPLICATION_ERROR(-20011, 'GENERATE_STMT Error in populating file. Message: ' || SQLERRM);
    END generate_stmt;
    END utility;
    ############################################################

  • How do I put text into an Edge File that clients can edit easily afterwards

    Hi
    Can anyone explain how I can put text into an edge file (styled with google fonts) and make it so that clients can access the text and update the text as they require?
    Previous suggestion was dynamically loading a .txt file - any instructions would be most appreciated.
    Thanks.

    Hi Resdesign!
    Your code is very useful to learn how to use Json in Adobe Edge Animate!
    But I have a question: why you use ( i ) as argument of the function UpdateInfo and when you recall it you use ( index )?
    $.getJSON('slides.json', function(data){
              //for(var i=0; i<data.length; i++){
    function updateInfo(i){
                        sym.$("photo").css({"background-image": "url('"+data[i].image+"')"});
                        sym.$("pillar").html(data[i].pillar);
                        sym.$("what").html(data[i].what);
                        // position
              index = -1;
              sym.$("btn").click(function(){
              index++;
                        if (index>=5){
                                  index = 0;
              updateInfo(index);
    Many thanks for your attention!
    Davide

  • Error Loading Data into a flat file

    I am recieving the following error when loading data into a flat file from a flat file. SQL 2005 is my back end DB. If I cut the file iin half approx 500K rows my ODI interface works fine. Not sure what to look at.. I rebuit the interface which before was just dying giving no error and now I am getting this.
    Thanks
    java.lang.Exception
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)

    Figured it out, found similar post that stated changing the HEAP size
    Increase the page size in odiparams.bat in the bin folder and restart Designer.
    For eg:
    set ODI_INIT_HEAP=128m
    set ODI_MAX_HEAP=1024m

  • XML data (Output) into a flat file

    I need to convert XML data into a flat file, which is having "|" as delimiter and ftp the same to a server. The XML data is an output of BPEL activity. The XML data is employee records. Each employee records should come as one line in the flat file.
    Is it possible to do this? if so, what will be the steps
    Thanks

    Hi,
    You need to use file adapter to write your XML payload as a flat file.
    Following are the steps to write XML payload into a flat file:
    1. Create a sample flat file and add few rows in which fields should be delimited with pipe symbol. See the record sample given below:
    Name|Age|Address|City|State|Zip
    Sam|32|2788 Viking Dr|Green Bay|WI|54304
    Here first row is the header row, you can remove the header row if it is not required.
    2. Create a file adapter service using adapter configuration wizard. Give file name and folder location where you want to write flat file. On step 5 of the adapter configuration wizard you have to define or select message schema. Click on Define Schema for Native Format button, then Native Format Builder Wizard will be opened, here you can define message schema for your flat file.
    2.1 Here you need to select Delimited for file type.
    2.2 Give details about your flat file, select your sample flat file here, which you have created in step 1 above.
    2.3 Click Next button twice and go to step 4, here give namespace and element names you want and click on Next.
    2.4 In step 5 you need to specify delimiters. Wizard doesn’t shows *|* as a delimiter so you need to enter *|* in the Delimited By combo box and click on Next button.
    2.5 Complete remaining steps and click on Finish in the wizard.
    3. Finish "Adapter Creation Wizard". Add BPEL activities (assign, invoke) to pass XML payload to file adapter and file adapter will generate *|* delimited flat file and write it to the given folder.
    See the following article for more details on Native Format Builder Wizard:
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm#CCHCIGCA
    Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • I am a CC subscriber and trying to update lr5.7 and I am told to got to my CC folder and click on install. The problem is, LR is not in my file. I guess I have been using my original lr that I bought years ago. What now? How do i get lr into the CC file?

    I am a CC subscriber and trying to update lr5.7 and I am told to got to my CC folder and click on install. The problem is, LR is not in my file. I guess I have been using my original lr that I bought years ago. What now? How do i get lr into the CC file?

    Gary116 please remove and reinstall Lightroom by following the steps listed in CC desktop lists applications as "Up to Date" when not installed.  The version of Photoshop Lightroom available through the Creative Cloud Desktop application supports your Creative Cloud Membership.

  • What is the best way to export the data out of BW into a flat file on the S

    Hi All,
    We are BW 7.01 (EHP 1, Service Pack Level 7).
    As part of our BW project scope for our current release, we will be developing certain reports in BW, and for certain reports, the existing legacy reporting system based out of MS Access and the old version of Business Objects Release 2 would be used, with the needed data supplied from the BW system.
    What is the best way to export the data out of BW into a flat file on the Server on regular intervals using a process chain?
    Thanks in advance,
    - Shashi

    Hello Shashi,
    some comments:
    1) An "open hub license" is required for all processes that extract data from BW to a non-SAP system (including APD). Please check with your SAP Account Executive for details.
    2) The limitation of 16 key fields is only valid when using open hub for extracting to a DB table. There's no such limitation when writing files.
    3) Open hub is the recommended solution since it's the easiest to implement, no programming is required, and you don't have to worry much about scaling with higher data volumes (APD and CRM BAPI are quite different in all of these aspects).
    For completeness, here's the most recent documentation which also lists other options:
    http://help.sap.com/saphelp_nw73/helpdata/en/0a/0212b4335542a5ae2ecf9a51fbfc96/frameset.htm
    Regards,
    Marc
    SAP Customer Solution Adoption (CSA)

  • Download report into a flat file format

    Hi Friends,
    I would like to know your thoughts on what is the best practice most of you using to download a report into a flat file(NOT csv).
    In my application business users want a report to be downloaded into their local desktop (just like a .csv) but into a flat file and they have their byte specific format.
    My concerns :
    1) Is there any straight method to download a report into a flatfile (like it is now for CSV) from Apex 3.1.2 ?
    2) If I write my own code using UTL_FILE, can I let the user to save them to their desired directory on their desktop ?
    Your thoughts would definitely help me in delivering a right solution to the users in this regard.
    Thanks a lot.
    Raj.

    Raj:
    You could create a 'Before Header' page process to create this 'flat file'. The code for the page process will be something similar to declare
    v_file_name   VARCHAR2 (2000) := 'fixedFieldsFile.txt';
    --- Client Record Format
    f1 char(20);
    f2 char(20);
    f3 char(20);
    ---- End format
    begin
    OWA_UTIL.mime_header ('application/txt', FALSE);
    htp.p('Content-Disposition:attachment;filename="'|| v_file_name|| '"');
    OWA_UTIL.http_header_close;
    for c1 in (select * from emp) loop                           ----- The report query
    f1:= c1.empno;f2:=c1.ename;f3:=c1.sal;
    htp.p(f1||f2||f3);
    end loop;
    apex_application.g_unrecoverable_error:=true;
    exception when others then
    null;
    end; Varad

Maybe you are looking for

  • Connecting SAP with Excel (Beginner)

    Hello! I'm new to the SAP scripting. On my company we use lots and lots of Excel spreadsheet lists with sales orders and projects, which is why i need to learn to connect those lists with SAP. I have a list of sales orders in Excel starting downwards

  • What causes the picture to download on my device

    what causes the picture to download on my device? such as I have 1000k pictures sync at icloud.com and I am just viewing them on my phone. What prompts it to download to my phone?

  • Chunked encoding

    Hi Does any one know about how chunked encoding work, and how to implement it on Java. any guidance will be great appreciate.

  • Migration assistant can't find target disk

    I've just bought a Macbook Pro (Leopard), and am trying to use the migration assitant to move everything from my old Macbook (OS 10.4.11), the way I once did when I upgraded from my old iBook (OSX) to my Macbook. Everything seems fine - I plug in the

  • How do I locate an iPad not in my family group

    I want to be able to located where my Step Mum's iPad is but I do not want to include her in my fa,ily sharing group. Is this possible?