cancel
Showing results for 
Search instead for 
Did you mean: 

How To Dump SAP table data to SQL server

Former Member
0 Kudos

Hi,

Right now we are calling sql statements in SQL server to connect SAP table data.

We have data in one Ztable , we need to dump that data into sql server with out writing sql statements in sql server.

Because of performance we need to avoid to access sap ztable directly from SQL server.

Is anyone know how to send data from SAP to SQL server?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

markus_doehr2
Active Contributor
0 Kudos

> Because of performance we need to avoid to access sap ztable directly from SQL server.

> Is anyone know how to send data from SAP to SQL server?

You can use:

- RFC

- a webservice

- an ABAP creating a .CSV file that is then be imported

- depending on which database your SAP system runs you could use R3load and/or R3trans

Markus

Former Member
0 Kudos

Hi Marcus,

You can use:

- RFC

- a webservice

- an ABAP creating a .CSV file that is then be imported

- depending on which database your SAP system runs you could use R3load and/or R3trans

How can i use RFC, a web service , .CSV file ???

My external data bse is SQL server...Can you give me sample code for each one please?

Thanks

Silpa

markus_doehr2
Active Contributor
0 Kudos

What is you business case?

- one time or permanent data transfer?

- size of the table?

- you need changes in that table?

- you plan to create transactions/reports based on that table

etc. etc. etc.

The "clean" way would be to create the table in SE11 and use transaction LSMW to transfer the data.

It also depends on your skills (ABAP? Java?)

Markus

Former Member
0 Kudos

Hi Marcus,

See , All my data is in Table, How can i send from lsmw to sql server?

Please give clear idea to sump data to sql server.

markus_doehr2
Active Contributor
0 Kudos

there is no "step-by-step" next-next-finish solution.

You didn't answer my questions so I can't help you.

Markus

Former Member
0 Kudos

Hi,

what i don't answer? i didn't get what you are talking!!

I just answer how to go from SAP to SQL server.

markus_doehr2
Active Contributor
0 Kudos

I asked in my last but one post:

What is you business case?

- one time or permanent data transfer?

- size of the table?

- you need changes in that table?

- you plan to create transactions/reports based on that table

etc. etc. etc.

The "clean" way would be to create the table in SE11 and use transaction LSMW to transfer the data.

It also depends on your skills (ABAP? Java?)

Markus

Former Member
0 Kudos

-- one time or permanent data transfer? Answer : Need to send data every day

- size of the table? -- everyday 500 records

- you need changes in that table?

- you plan to create transactions/reports based on that table

Let me explain my scanario :

I had written one abpa report program to send data to z-table , now we need send from z-table data to sql server.

In sql server we don't want to write any sql statements as its very low performance.

Do you have any idea how to dump z-table data to sql server table.

i would appreciate your help Markus

markus_doehr2
Active Contributor
0 Kudos

> -- one time or permanent data transfer? Answer : Need to send data every day

> - size of the table? -- everyday 500 records

> - you need changes in that table?

> - you plan to create transactions/reports based on that table

> I had written one abpa report program to send data to z-table , now we need send from z-table data to sql server.

> In sql server we don't want to write any sql statements as its very low performance.

Well - you will need to "write an SQL statement" in ANY way you choose since you need to read the data. SQL is used to read the data.

> Do you have any idea how to dump z-table data to sql server table.

That "z-table" - is it on a different server? I'm a bit confused - sorry...

Markus

Former Member
0 Kudos

Hi Markus,

That Z-table is in SAP in the same server but need to send data to sql server from SAP.

markus_doehr2
Active Contributor
0 Kudos

> That Z-table is in SAP in the same server but need to send data to sql server from SAP.

I would use DBCONN and write the data via ABAP job each night. For 500 records this can't take that long.

Markus

Former Member
0 Kudos

How to write abap program with DBCONN, Please give me small example.

Thanks

markus_doehr2
Active Contributor
Former Member
0 Kudos

Sorry for bothering again, see i have wrote a code like this but i don't know how to call sql server.

con = '+DBO+0060'. "DB Connection in DBCO above

EXEC SQL.

CONNECT TO :con

ENDEXEC.

WRITE sy-subrc. "---> The result it's 4

EXEC SQL.

GET CONNECTION :con

ENDEXEC.

WRITE : con. "--> The result it's DEFAULT

EXEC SQL.

SET CONNECTION DEFAULT

ENDEXEC.

write : con. "--> The result it's DEFAULT .... Please give me with more details please

markus_doehr2
Active Contributor
0 Kudos

> The result it's DEFAULT .... Please give me with more details please

Check the examples in

Note 323151 - Several DB connections with Native SQL

they may help you to find where's your problem.

Markus

Former Member
0 Kudos

Hey Marcus,

The Data looks good in the note but need to know how the table can access from sql server.

send me the code if you have any.

Silpa

markus_doehr2
Active Contributor