Query extraction to a flat file

We have a requirement to extract the query result and send it as a flat file to a different system. The query is created on a multi provider and the key figures have lot of restrictions. We currently use RSCRM_BAPI for this. Would like to know if there is a better options, if any one has used it.
Thanks,
VJ Sudharsan

Hi,
It might help you:
Program to run query and save to flat file
Best regards,
Eugene

Similar Messages

  • Saving query results to a flat file

    Hello Experts!
    We have a very specific issue on our current project and I would like to know if any of you have ever done something similar. We are taking query results from BW (after complex calculations, some based on SY-DATE) and saving them to flat files to transfer to a SQL database structure on the Enterprise Portal. From here, the portal team renders the information into more "static" dashboards that include mouse over features and even limited drilldown (i.e. no matter where a user clicks the report always drills down on profit center)
    There are many reasons why the model is set up as such (mostly training of executive level end users), and even though it doesn't mesh with the idea that BW could do this work on its own, we have to work with what we have.
    We have come up with 3 possible ways to save this data to flat files and hopefully someone can tell us which might be the most effective.
    1.) Information Broadcasting. If we broadcast XML files to the portal, will the portals team be able to read that data into a SQL database? Is there another way to use broadcasting to create and send a flat file to specific location?
    2.) RSCRM_BAPI. This transaction seems to not support texts.
    3.) Open Hub. In order to get the open hub to work, we first have to save all of our query results to direct write data store objects using APD. (calculations based on current date, for example, would require daily full loads to the underlying data providers otherwise.)
    What is the best way to accomplish this? Is information broadcasting capable of doing this?
    Thanks!

    Hi Adam,
    Do you have to use flat files to load the information to a SQL database? (if so maybe someone else has a suggestion on which way would be the best).
    I try to stay away from flat file uploads as there is a lot of manual work involved. May I suggest setting up a connection to your SQL table in the DBCON table and then writing a small abap program to push data into the SQL database (which you can automate).
    1) Use APD to push data into a table within BW.
    2) Go to transaction SM30 > table DBCON and setup a new entry specifying the conncection parameters to your SQL database.
    3) In SE38 Write an ABAP program along the folloing lines (assuming the connection you set in DBCON is named conn1:
    data: con_name like dbcon-con_name
    con_name = 'conn1'.
    exec sql.
      set connection :con_name
    endexec.
    ****have a select statement which reads data from your table which the data is saved from the APD into an internal table**********
    ****loop on the internal table and have a SQL insert statement to insert the records into the SQL table as below******
    exec sql.
    insert into <SQL TABLE> (column names seperated by ,)
    values (column names of the internal table seperated by ,)  if the internal table is named itab the columns have to be specified as :itab-column1
    If you decide to take this approach you may find more info on DBCON and the process in sdn. Good Luck!
    endexec.

  • Infocube data extract to a flat file

    Hi,
    I have a requirement to extract data from a infocube into a flat file and send it to a 3rd party. The data in infocube is coming from erp and another 3rd party system. This combined data in inficube needs to be extracted and send to another 3rd party system in a flat file system. Is there any generic function module that can be used or I have to extract from underlying tables directly. Pl. let me know your experiences.
    Thanks,
    Jassi.

    Hi,
    You can solve the problem using info spokes. Below are some of the links related to info spoke.
    Hope the following links will be helpful to u
    INFOSPOKES:
    http://help.sap.com/saphelp_nw04/helpdata/en/66/76473c3502e640e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c5/03853c01c89d7ce10000000a11405a/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/59/90070982d5524b931ae16d613ac04a/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/c2463c6796e61ce10000000a114084/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/43f92595-0501-0010-5eb5-bb772d41ffa4
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e830a690-0201-0010-ac86-9689620a8bc9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f12a03d-0401-0010-d9a7-a55552cbe9da
    http://help.sap.com/saphelp_nw04/helpdata/en/66/76473c3502e640e10000000a114084/frameset.htm
    ***Assign points if helpful***
    Regards,
    Amith

  • How often in the real time projects extract data from flat files n process

    I am going thru teh BODS data integrator, and trying to understand the demand of ETL services extract data from a flat file, is that really impt in teh real time jobs.
    Thank you very much for the helpful info.

    Hi,
    As per the inputs given by you guys i started loading data from flat file.
    I try to load 28 files from i which i was able to load 24 files succesfully.For the other 4 i got this error messages
    1) Error 'Enter period in the format __.YYYY...' at conversion exit CONVERSION_EXIT_PERI6_INPUT (field CALMONTH record 1, value DUMYTRA)
    Message no. RSDS012
    2)  a) Error 'The argument '1,008.00' cannot be interpreted as anumber' on assignment field QUANT_B record 11714 value 1,008.00
    Message no. RSDS013
       b) Error 'The argument '1,110.00' cannot be interpreted as anumber' on assignment field QUANT_B record 15374 value 1,110.00
    Message no. RSDS013
    3) a) Error 'The argument '1,140.00' cannot be interpreted as anumber' on assignment field QUANT_B record 1647 value 1,140.00
    Message no. RSDS013
       b) Error 'The argument '2,028.00' cannot be interpreted as anumber' on assignment field QUANT_B record 4625 value 2,028.00
    Message no. RSDS013
    4) Error 'The argument '1,151.00' cannot be interpreted as anumber' on assignment field QUANT_B record 7808 value 1,151.00
    Message no. RSDS013
    I'am unable to trace out what is the error exactly.
    I checked this values in files they are perfect.
    can anybody please guide me on this issue.
    With Regards,
    Pradeep.B

  • Extract data from Flat file CSV to SQL Server 2008 using SSIS 2008 (Data gets corrupted when extraction)

    Hi,
    I am trying to extract data from multiple CSV files to SQL into a single table. The data type of all the columns in SQL table is nvarchar(MAX).  I am able to extract the data from the flat files but some of the data(on extraction) is
    corrupt including question marks(?) and other invalid special characters. Also I tried selecting the UTF-8, 65001(Unicode) format but the problem still persists. Also I tried using data converter but no use.
    I checked with the data in the flat file but there is no data with question mark(?) or any other special characters.
    The separator in the flat file is Comma(,)
    Please help.
    Thanks in advace.

    The source system and application determines the code page and encoding. Is it Windows, Unix, Mainframe or some other type? 
    Unicode files sometimes begin with a byte order mark (2 bytes) to indicate little or big endian.  If you open the file in notepad and then select save as, the encoding in the dialog will show the encoding notepad detected based on the BOM.  If
    that is ANSI instead of Unicode or UTF-8, you will need to know the code page the source system used when the file was created.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Extract data from Flat File in a remote machine

    Hi All,
        Can we extract the data from a flat file present in the Linux server ( same server having ODI installed ) and load it into the database. In most of the forms in the internet shows that the file is to be placed in the local client ( Eg:- C:/Flat_files/ ) .
    Any thoughts on this is possible. Please provide me some information on the same.
    Thanks and Regards,
    Krishna Prasad

    Many ways to do this. For example you could use sqlloader or a simple File to SQL and load from an agent used on the same machine of your file.
    If your agent is not on the same box as the flat file, you will need a shared drive. Or you can first move the file using FTP or something like that.
    Shared drive is quite easy but they are the evil. You'll need an everyone-read permission.
    Let us know

  • Extract data from flat file

    Hi,
    I'm trying to extract data from a non-SAP datasource (flat file) to BW, I need to first convert the source file (txt) into the appropriate format to load to BW (CSV or ASCII). Currently, the txt file is not in a either format but more in a report kind of format. Is there any functionality in BW that I could utilize to convert the source file esaily in the format that BW can understand? Can I do this using transfer rules?
    Thanks.

    Thanks. But on the text file, there's some other information that I don't need such as the header information and the data currently is in group level. Can I utilize BW without changing the format on the original source file?
    Thanks.

  • Extract data to flat file

    extract data when button pressed in forms 9i to a flat file

    Dear Satya,
    1) You can simply write an ABAP to access the P table ( /BIC/PInfobobject )
    2) Using infospokes
    rsbo->ZDOWNLOAD->Create->Choose Data Source as Infopbject with attributes..
    and select your fields and selections and specify the flat file destination and thatsts it..
    regards,
    Hari
    Message was edited by: Hari Kiran Y

  • STEPS REQUIRED TO EXTRACT DATA FROM FLAT FILE TO BI 7.0

    HI ALL,
      I NEED THE STEPS TO EXTRACTED THE DATA FROM A FLAT FILE TO BI 7.0
    PLEASE PROVIDE ME THE STEPS RATHER THAN PROVIDEING ME THE COMPLETE LINK OF SAP HELP.
    I NEED THE STEPS ONLY.
    THANKS,
    GAUTAM

    BW 7.0
    Uploading of master data
    Log on to your SAP
    Transaction code RSA1—LEAD YOU TO MODELLING
    1.     Creation of Info Objects
    •     In left panel select info object
    •     Create info area
    •     Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
    •     Create new characteristics and key figures under respective catalogs according to the project requirement
    •     Create required info objects and Activate.
    2.     Creation of Data Source
    •     In the left panel select data sources
    •     Create application component(AC)
    •     Right click  AC and create datasource
    •     Specify data source name, source system, and data type ( master data attributes, text, hierarchies)
    •     In general tab give short, medium, and long description.
    •     In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
    •     In proposal tab load example data and verify it.
    •     In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
    •     Activate data source and read preview data under preview tab.
    •     Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
    3.     Creation of data targets
    •     In left panel select info provider
    •     Select created info area and right click to select Insert Characteristics as info provider
    •     Select required info object ( Ex : Employee ID)
    •     Under that info object select attributes
    •     Right click on attributes and select create transformation.
    •     In source of transformation , select object type( data  source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    •     Activate created transformation
    •     Create Data transfer process (DTP) by right clicking the master data attributes
    •     In extraction tab specify extraction mode ( full)
    •     In update tab specify error handling ( request green)
    •     Activate DTP and in execute tab click execute button to load data in data targets.
    4.     Monitor
       Right Click data targets and select manage and in contents tab select contents to view the loaded data. Alternatively monitor icon can be used.
    BW 7.0
    Uploading of Transaction data
    Log on to your SAP
    Transaction code RSA1—LEAD YOU TO MODELLING
    5.     Creation of Info Objects
    •     In left panel select info object
    •     Create info area
    •     Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
    •     Create new characteristics and key figures under respective catalogs according to the project requirement
    •     Create required info objects and Activate.
    6.     Creation of Data Source
    •     In the left panel select data sources
    •     Create application component(AC)
    •     Right click  AC and create datasource
    •     Specify data source name, source system, and data type ( Transaction data )
    •     In general tab give short, medium, and long description.
    •     In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
    •     In proposal tab load example data and verify it.
    •     In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
    •     Activate data source and read preview data under preview tab.
    •     Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
    7.     Creation of data targets
    •     In left panel select info provider
    •     Select created info area and right click to create ODS( Data store object ) or Cube.
    •     Specify name fro the ODS or cube and click create
    •     From the template window select the required characteristics and key figures and drag and drop it into the DATA FIELD and KEY FIELDS
    •     Click Activate.
    •     Right click on ODS or Cube and select create transformation.
    •     In source of transformation , select object type( data  source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    •     Activate created transformation
    •     Create Data transfer process (DTP) by right clicking the master data attributes
    •     In extraction tab specify extraction mode ( full)
    •     In update tab specify error handling ( request green)
    •     Activate DTP and in execute tab click execute button to load data in data targets.
    8.     Monitor
       Right Click data targets and select manage and in contents tab select contents to view the loaded data. There are two tables in ODS new table and active table to load data from new table to active table you have to activate after selecting the loaded data . Alternatively monitor icon can be used
    cheers
    sunil

  • BPC 7.5 will extract data from flat file or directly from cube

    Hi,
        i have a doubt plz give me a solution.
    1) previously our BPC 7.0 team extracted data from BI 7.0 through flat file, but now they have upgraded to BPC 7.5 i want to know whether BPC 7.5  will extract directly from our BW infocube or not.
    2) please let me know how data extracted from BPC 7.5.
    Thanks and Regards
            Satish

    Hi,
    If your import file has duplicate record in it then the Status of your DM package for import ends with warning, where all the records in your file might have got accepted but only one last data rows amoung the duplicate rows might have got submitted to the system.
    The duplicate records will be rejected and you can see the list of duplicate records as well in the DM package status report.
    Like Nilanjan said you can use Append DM Pacakge to submit all duplicate records aswell into the system. But here the problem is it appends the data in flat file with data available in the system.
    Say you have 100 for account1 in the system and you run Append DM Package having values duplicate values for account1 say 100 and 200. So after the Append Package execution you will have 100100200= 400 for account1.
    So for Append DM package to work in the same way as import, run clear package before executing the Append package.
    Hope this helps,
    Regards,
    G.Vijaya Kumar

  • Extracting data from flat file in OWB

    Hi,
    Does anyone know, how to run a mapping having source as flat file in OWB?
    I am facing a problem as run button becomes disabled as it is SQL Loader script.
    When I register the TCL script with OEM it doesn't pass the name of the CTL file
    as parameter and so the job fails.
    If anyone knows how to do it, please reply.
    Regards
    -Yogesh

    Hi Bhavesh ,
    The data type beimg given is of this format :
    TLOG          Root Node     Structure     1..n
    STORECODE               
    TILLID               
    TXDATE               
    POSTDATE               
    TXTIME               
    TXSERIAL               
    TXBATCH               
    DOCNO               
    VOIDDOCNO               
    TXTYPE               
    TXMSG
    TMSG is the field conatinig the message ( stated in my mail ) .
    Thanks
    Anita Yadav

  • Query filter selection list flat file

    I know that when using a "multiple single value" variable a user can paste or upload a text file of values BUT...
    is it possible to use a text file to create a query FILTER value list?
    (I mean in the query designer not at query run-time or in a workbook)
    thanks

    oh i just now see that with BI 7.0 you can right click on the right side of a filter selection and choose "Upload Selection"

  • How to extract outline to flat file

    Hi ,
    I want to extract outline from the ASO cube. cube is in the version 7 essbase.
    what can be the methods to extract the outline with data.
    thanks
    r

    user8738287 wrote:
    i should run the outline installer with oracle installer? No, you need to install the Essbase client with the Oracle installe.. The Outline Extractor needs the Essbase Client on the machine to run.
    i get this error runtime error 53 file not found :esbapin.DLLEsbapin.dll is the VB API dll installed as part of the Essbase Client.
    Tim Tow
    Applied OLAP, Inc

  • Tricky SQL query to DUMP to flat file

    Hi All,
    I have used UTL file utility before to dump table data into a comma seperated file but this time I have a tricky problem.
    I have a table called customers with the following fields
    work_order_no, customer_no, contract_start_date, title, Name, first_name, street, street_no, bank_code, name, liason_name
    and have a products table with following fields
    work_order_number, material_type, material_number, qty
    1. I need to write the customer details + product details of the customer into a comma seperated file as below
    A
    1001,
    1234,
    12.01.2004,
    Mr. Dr.,
    Alphs,
    Thomas,
    my street,
    12,
    1112,
    Barclays,
    Mr. Dr. Alphs Thomas,
    <EOH> - is a fixed
    1001,
    M,
    12,
    1,
    <EOL> is fixed
    1001,
    M,
    12,
    1,
    <EOL> is fixed
    1001,
    M,
    12,
    1,
    <EOF> is fixed
    4 - total number of records
    1 - total number of A type of records(in the first position
    How do i write a Pl/Sql code which can be called from command prompt.
    Thanks in advance

    You can try this out and see if it works :
    CURSOR to fetch the customers data
    Loop
    - Use a string to concatenate the cursor variables
    - Use chr(10) to print the columns in seperate lines
    i.e. lResult := x.work_order_no || ',' || chr(10)
    || x.customer_no || ',' || chr(10)
    || x.contract_start_date || ',' || chr(10)
    || x.liason_name || ',' || chr(10)
    - Use Utl_File to write the formatted string to
    the output file
    - Use Utl_File to write constant '<EOH>' to the
    output file
    - Get all product details
    - For each product details
    Loop
    lResult := x1.material_type || ',' || chr(10)
    || x1.material_number || ',' || chr(10)
    || x1.Qty || ',' || chr(10)
    - Use Utl_File to write the formatted
    string to the output file
    - Use Utl_File to write constant '<EOL>' to
    the output file
    End Loop
    End Loop
    - Use Utl_File to write constant '<EOF>' to the output
    file
    - Use Utl_File to write counters to the output file
    You can write the code in a PL/SQL script file called a.sql and save it on the server directory 'c:\a.sql'.
    To run from the command prompt type:
    c:\> sqlplus userid/pwd@connectstring @c:\a.sql
    Hope this helps.
    -- Shailender Mehta --

  • All Open Sales Orders Extract to a flat file

    Hi Guys,
    I am basically a FI guy who has been asked to create this extarct - it would be great if you guys can help me out with it:
    1) Sum of all open orders in the system which have not been shipped
    2) Sum of all open orders in the system which have been shipped by not yet invoiced.
    3) Sum of all open billing, invoice document created but no AR doc created.
    Which tables i can consider - i have a lill. idea - VBUK and VBUP tables. What should be the criteria to get all the above.
    Please help me out.
    Thanks,
    Maulik Shah

    Dear Maulik
    1)  Sum of all open orders - T.Code VA05 - Table VBBE
    2)  Sum of open orders shipped but not invoiced - T.Code VF04 Table VBFA.  Here input M in the field Subs.doc.categ and execute.  Wherever this field is blank, those are not invoiced
    3)  List of invoices created but Accounting document not created T.Code VFX3 - Table VBRK Field RFBSK where the status of the document would be A if Accounting document has not been generated and C if Accounting document would be created
    thanks
    G. Lakshmipathi

Maybe you are looking for

  • Compatibility when uploading to a school submission

    I am running a MacBook Pro 13" (Mavericks) with Boot Camp and Windows 7 Professional. I have had more issues with uploading for school. Formating has gotten messed up when downloading my original mac file from their file storage site back to my compu

  • Query for finding shortest path

    I know nothing about Oracle Spatial. Just want to know if this query is possible using Spatial. Given the following data for undirected weighted graph, v1: vertex 1 v2: vertex 2 w: weight between vertices v1 and v2(or, distance of edge) table name :

  • Treasury & Cash management Requirement gathering

    Hi Evry one iam assigned to a project for Treasury & Cashmanagement, i wanted to know from where exeactly do i need to start the configuration and what are the testing steps for Posting .       I have done the House Bank Configuration, APP, Cash Jour

  • View remote file system

    Hello to all. I have just implemented a simple client/server application which enables file transfers. I would like to know if there is a way of implementing a remote file viewer in which i will be able to send requests and download files. My primary

  • Lion to Mountain Lion Upgrade Crashes Mail

    HUGE bug going on with ML from Lion upgrade for many Mac Pro users. After 2.5 days at Genius bar, no one can fix this issue. Summary: Something in the ML updaste does not play nice with the current User Library that is on many MacBook Pro's running 1