Transfer data from SAP TABLES to a SQL table

Hi,
I need to transfer data from SAP tables to a SQL table. Please suggest the best way as well as the steps please.
Regards,
Kamlesh

Hi
Step 1: Create an entry for the External database in DBCON table using Trxn: DBCA.
Field Name Description Value (For: E.g.:)
CON_NAME Logical name
for database con RAJ
DBMS Database system MSS
USER_NAME Database user <username>
PASSWORD Password for setting up
the connection
to the database <pwd>/<pwd>
CON_ENV Database-specific MSSQL_SERVER=depotserver MSSQL_DBNAME=HOF_INDORE
DB_RECO Availability type for an open database connect
Then, you can define internal table and code the following way:
DATA: BEGIN OF wa,
c_locid(3),
c_locname(50),
c_locstate(5),
END OF wa.
EXEC SQL.
CONNECT TO 'RAJ' AS 'V'
ENDEXEC.
EXEC SQL.
SET CONNECTION 'V'
ENDEXEC.
< Populate SAP data into an internal table >
Loop on itab.
EXEC SQL.
< code here for populating data into MS-SQL Server table>
ENDEXEC.
Endloop.
Regards,
Raj

Similar Messages

  • Transfer data from a table to another table

    Hello
    I want to transfer data from a table in one server to another table in a different server, I want to do this on a nightly job, what will be the best way, please advise, thank you.

    Multiple options
    1. Create linked server  and use INSERT..SELECT * FROM [Server].[DB].dbo.Table
    2. Use OPENROWSET
    http://searchsqlserver.techtarget.com/tip/Using-the-OPENROWSET-function-in-SQL-Server
    3. Use export import wizard
    http://www.leniel.net/2011/07/import-export-data-sql-server-database.html#sthash.l4fgNNdV.dpbs
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • ABAP program to output data from SAP table to an XML format file?

    hello ABAP experts,
    Does anyone know how to output data from SAP table to an XML format file?  Would be appreciated if someone show the detailed sample codes and we will give you reward points!
    Thanks!

    Edited by: Jose Hugo De la cruz on Aug 19, 2009 8:23 PM

  • Transfer data from 2 oracle version to sql server 2005

    Hi,
    I have two database servers on different machines. They are
    1) Oracle 8.1.7.4
    2) Oracle 7.3.1.4
    I have to create agents which can transfer tables from these two databases to one machine having sql server 2005 database.
    Please tell me what are the options. What drivers i need to install on machine having sql server 2005 so that i can transfer data from both oracle versions.
    Thanks
    Rajneesh.

    You could create a linked server. Install the Oracle client on the server with SQL Server 2005, setup the TNS to your Oracle databases, create the linked server and then grab the data that way. There are migration tools as well but if the database is small in size I found linked servers to work and give me better control over the migration. This assumes that the database is not very large. If it is really large a migration tool might be a better option.

  • Transfer data from Sap system to .xls format

    Hi Friends,
    How to transfer data from a internal table in SAP system to the .xls file in legacy system.
    Is gui_download the correct one.
    Thanks,
    Anuradha

    yes , using FM GUI_DOWNLOAD you can down load the data to excel sheet
    for this use FILETYPE = 'DAT'

  • Transfer Data from SAP R/3 to BI - Urgent

    Hi all,
    I need to transfer data from one of my SAP R/3 server to Infocube 0FIAR_C03. How can I do that? Please tell me step by step procedure.
    Please respond.
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.
    Edited by: AI on Dec 27, 2007 9:38 AM

    HI
    Follow these threads
    Implementing Extractor / Steps to extract records from R3 to BW
    LO step by step procedure
    how the data transfer from r/3 to bw
    Transfer tax data from R/3 to BW
    Data load from R/3
    Khaja

  • Transfer Data from SAP system to non-SAP system

    Hi all,
    I want to send material no, site and price data from SAP system to non-SAP system. Would you tell me how can I do it
    Thanks
    Arif
    Moderator message: please do more research before asking, show what you have done yourself when asking.
    Edited by: Thomas Zloch on Oct 16, 2011 10:38 PM

    Hi,
    you can create the same...
    but normal practice what we do is create swc for each system so that it is easy to maintain and easy to extend in the future..
    or else follow some conventions if you are just starting the things..
    HTH
    Rajesh

  • Transfer data from SAP R/3 to Microsoft Navision

    Hi gurus,
    This is my first post here. I'm wondering what the easiest way is to transfer mainly master data (customers/materials) but also historical order data (sales- and purchase orders) out of SAP. I need to get the result in .txt files that then will be used as base for the import to the Navision system.
    I've read about this and several people are talking about ABAP Queries, transform data to complete IDOC's and pass-out, use BI etc.
    Will we end-up creating a new customized ABAP program or is there already an existing tool or another easy way to solve this ?
    Edited by: Robert Schulin on May 7, 2008 4:33 PM

    Hi,
    You have various methods for getting the data to flat files for uploading into another NONSAP system.
    Some of the methods are BAPIs, IDOCS, .
    Simple method for downloading data from tables to textfiles is as follows:
    GOTO se11 --> table name --> display all entries --> EDIT MENU --> download .
    here it will give options for downloading to text files, spreadsheets, rich text etc.
    This is the case if you want to download data from tables . if you want data regarding the transactions (which affects more than 1 table)  then  you have to go to IDOCS or BAPIs.
    Reward points if helpful.
    Thanks and regards,
    Narayana.

  • How to access data from SAP Tables from a Webi report

    hi all,
    I have a webi report for financial data and from a Bex query which is build on a Cube (this has data from 2 SAP ECC systems)
    i want to build a functionality where in i can call some SAP Table data from this webi report. i should be able to pass information or some hard code where it can understand the source system it has to pick data from.
    in SAP BI, we have this ption wherein we can achieve this through RRI..
    is this possible in Webi ?
    Thanks
    SKS

    Hi.
    Create a universe on top of SAP Tables and create a webi report.
    Using hyper link /open doc we can call  this report from the webi report created on top of your Cube .
    @Sri

  • To Transfer data from internal table to a table control

    Hi All,
    I have selected some data to be displayed on a screen into an internal table ...............my problem is how to transfer the data from the internal table to this table control so that when screen is displayed the data is also displayed.
    Regards,
    Shweta

    Hi Shweta,
    <b>Please see if the below demo program is helpful...
    DEMO_DYNPRO_TABCONT_LOOP</b>
    ==============================
    controls flights type tableview using screen 100.
    select * from spfli into corresponding fields of table itab.
    call screen 100.
    module status_0100 output.
      set pf-status 'SCREEN_100'.
      describe table itab lines fill.
      flights-lines = fill.
    endmodule.
    module fill_table_control output.
      read table itab into demo_conn index flights-current_line.
    endmodule.
    module cancel input.
      leave program.
    endmodule.
    module read_table_control input.
      lines = sy-loopc.
      modify itab from demo_conn index flights-current_line.
    endmodule.
    module user_command_0100 input.
      save_ok = ok_code.
      clear ok_code.
      case save_ok.
        when 'NEXT_LINE'.
          flights-top_line = flights-top_line + 1.
          limit = fill - lines + 1.
          if flights-top_line > limit.
            flights-top_line = limit.
          endif.
        when 'PREV_LINE'.
          flights-top_line = flights-top_line - 1.
          if flights-top_line < 0.
            flights-top_line = 0.
          endif.
        when 'NEXT_PAGE'.
          flights-top_line = flights-top_line + lines.
          limit = fill - lines + 1.
          if flights-top_line > limit.
            flights-top_line = limit.
          endif.
        when 'PREV_PAGE'.
          flights-top_line = flights-top_line - lines.
          if flights-top_line < 0.
            flights-top_line = 0.
          endif.
        when 'LAST_PAGE'.
          flights-top_line =  fill - lines + 1.
        when 'FIRST_PAGE'.
          flights-top_line = 0.
      endcase.
    endmodule.
    Thanks, ABY

  • Issues in exporting data from SAP tables in SE16 to excel

    1.How can I save an sap table (displayed through SE16) in ECC6 into a pivot table in excel. [ I have seen this option in R/3 4.7, but do not see it in ECC.]
    2.How can I copy all the rows of a 3000 row SAP table in SE16 and paste the values into excel. I need to do this in one shot and not page by page.
    3.What option do I need to select inorder to preserve the formating of the values while saving as a local file in a spreadsheet format. All the values with leading zeros,like company codes gets saved with only their numeric portion when I save a SAP table as a local file. for eg company code 0001 gets saved in excel as just 1,company code 0056 gets saved as 56 etc. How do I prevent this? What option do I need to set in SAP in order for the values to be downloaded as is, without any truncation of leading zeros.

    1.  I don't know.  How about creating a pivot after exporting data
    2. System->List->Save->local file->clipboard
    Then paste whole lot in Excel
    3. This is a problem with Excel, not SAP.  SAP exports with leading zeroes.
    You could export as flat file & import into Excel into a spreadsheet with an appropriate numbering format.

  • Merging data from SAP BEx queries with SQL - Keys are details not Dimension

    I have a challenge when trying to merge data from a BEx query and a relational source in SQL Server.
    I have a characteristic for Material, with an associated Material key that is a attribute of Material in the BEx query.  On the SQL side I have a Material ID which is they unique identifier.
    So when you Merge Dimensions in a WebI report, it is exactly that merging dimensions,  so you link Material from BEx and Material ID from SQL.   However, on the Bex side Material displays a long text field which will never join to the data from SQL which is an ID.  The like for like objects are Material Key in BEx and Material ID in SQL, however, as Material Key from BEx is an attribute to manifests itself in WebI via a universe as a Detail object, which makes it unavailable for merging.
    I have tried to set the Material characteristic to display as KEY in the BEx query design, but alas it still comes through as a long text, hence still not able to merge data sets.
    Any workarounds ??
    Andrew

    Hi Andrew,
    In universe designer, edit the material key detail object. Copy the text that refers to the characteristic attribute in your BEx query. Create a new dimension (say, 'Material Key') and paste this text as the definition.
    Essentially you're turning a detail object into a dimension, which (in my limited experience) works just fine.
    Let me know how you go.
    DG

  • Transfer data from one table to another

    Hi
    I have a table which has number of columns. I fetch the rows and convert it in an XML format and insert it in anther table. There are couple of billions records, it will take days to transfer with a simple java program which I have already written.
    Can anyone suggest me any better way to do it in hours?
    Thanks in advance.

    Hi Hemant,
    I have a table called as Status, which has following columns
    Name                           Null                             Type                                                                                                                                                                                                                                                                                      
    STATUS_ID                      NOT NULL                         RAW(16)                                                                                                                                                                                                                                                                                   
    STATUS_CODE                    NOT NULL                         NUMBER                                                                                                                                                                                                                                                                                    
    USER_ID                        NOT NULL                         VARCHAR2(50)                                                                                                                                                                                                                                                                              
    STATUS_DATE                    NOT NULL                         DATE                                                                                                                                                                                                                                                                                      
    STATUS_COMMENT                                                  VARCHAR2(200) Here nothing is unique even Status_ id is repeating.
    and I have second table which has following columns
    Name                           Null                             Type                                                                                                                                                                                                                                                                                      
    STATUS_ID                      NOT NULL                         RAW(16)                                                                                                                                                                                                                                                                                   
    STATUS_BEAN                                                     XMLTYPE() Here Status_id is Primary Key.
    So I am fetching all rows at one time and insert it in Map which has the Key as Status_id and Value is the List of VO which has the all columns as properties. If a status_id repeats more than one time then it will store all rows as VO and store it in the List of status_id in Map.
    Then I convert each list in XML from Map and store it in Second table with status_id and converted XML and it is true I am saving one row at time and commits the DB.
    e.g. One Status_id is repeated twice so there are two row then I create VO for each row and store it in List stored against the Status_id in Map and while saving I will convert the List into XML which is as following
    <list>
      <statu>
        <statusCode>1301</statusCode>
        <statusDate>2011-01-31 17:29:36.78 GMT+05:30</statusDate>
        <comment>sdfds</comment>
        <userId>jone</userId>
      </statu>
      <statu>
        <statusCode>1034</statusCode>
        <statusDate>2011-01-31 17:29:36.78 GMT+05:30</statusDate>
        <comment>Test</comment>
        <userId>mark</userId>
      </statu>
    </list>This what I am doing and let me know if you need anything else.
    Thanks

  • How to transfer data from one table to another without duplicates

    This is what I use to quote bathroom remodels. The first thing I do is completely fill in the Master Item List with every Product or Service we can think of to do the project. The Type column has a pop-up menu which includes Combo because some Contractors don't separate the Product from Labor. The Category Totals Table is useful but since some Contractors provide Product and Service at the same time on one invoice I don't get accurate breakdowns for generating my invoices.
    What I would like is to transfer all Vendor names included in the project to the Vendor Totals Table but without any duplicates. Some Contractors might perform services in several categories. I've read many listings in the forum and am just not seeing the answer.
    I have a sample file ready to send. I don't see a way to send it with this message. First Post! Sorry!
    Thank You
    Jeff

    jwoods007 wrote:
    What I would like is to transfer all Vendor names included in the project to the Vendor Totals Table but without any duplicates.
    Hi Jeff,
    Welcome to Apple Discussions and the Numbers '09 forum.
    If your Vendor names (including duplicates) are all in the same column of the source table, it shouldn't be difficult to transfer them to a second table using the technique described below.
    For the example, the source table is named Main and has one header row, the Vendors are listed in column C (starting at C2), and column B is used as an index column. Note that to use VLOOKUP, the index column must be to the left of the Vendor column.
    The index is generated using the following formula in B2, and filled down to the end of the column:
    =IF(COUNTIF(C$1:C2,C)=1,MAX($B$1:B1)+1,"")
    On the second table, Vendor List, the following formula is used in Column A (starting at A2) to collect the indexed vendors from the Main table"
    =IFERROR(VLOOKUP(ROW()-1,Main :: B:C,2,FALSE),"")
    IFERROR is used to trap the "couldn't find" error in the 'empty' rows of Vendor List.
    'FALSE' displays as "exact-match" in the formula, and prevents the rpeated listing of the last vendor that would be created by 'close-match'.
    Regards,
    Barry

  • How to transfer data from sap bw to mobile devices

    Hi sdn,
    can anyone provide documents regarding sap bw data in mobile devices like pda's etc. its urgent.
    [email protected]
    regards
    andrea

    Type https://service.sap.com/bi
    It will be asking for Userid and Password. Hope you will be having that.
    Left side You will see services and implementation click it.
    Under this you will find how to ....Guides
    Under this Guide List SAP BW3.0B/ BW3.1 Content
    You will get list of documents. You can find How to... use BEx Mobile Intelligence in that.
    Regs
    Gopi.

Maybe you are looking for

  • How to show sharepoint documents in salesforce ?

    How to show sharepoint documents in salesforce ? I should also be able to upload documents from salesforce directly to sharepoint document library/list if the users attach a document for a record in salesforce.   Any idea how to achieve this? What ar

  • Why do I get the message " 'Song Tiltle' was not copied to iPod because it cannot be played on this iPod"

    I got a new gen iPod Classic (160G) for Christmas, purchased Bob Marley's Album "Legend" and when I sync the playlist to the iPod I get an error message saying this one song cannot be played on this iPod. What gives? Is it something about "I Shot the

  • "Does Bridge come with Photoshop if I buy the CC single app?"

    Question from a Customer-"Does Bridge come with Photoshop if I buy the CC single app?"

  • Javascript error - recovery?

    I have just spent rather a long time writing a document on my Blackberry curve and the device appears to have lost it having displayed 'javascript error'.  Is there a method I can use to retrieve the document?  Does anyone have any idea what might ha

  • UK Job

    Job Opportunity : Systems Developers Bytronic Automation Ltd is looking for experienced LabVIEW and Lookout programmers to join us here in the Warwick Technology Park, U.K.. We are a leading Alliance member and currently have a number of projects in