Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Export SAP data into Sql tables from sap side only.

Former Member
0 Likes
953

Hi Expert,

Pls share me, how to push sap data into SQL table from abap side.

Thanks & Regards,

M. Ali

6 REPLIES 6
Read only

Former Member
0 Likes
846

Hi Ali,

       Could you elaborate your issue.

      Regards,

      Aditya Tanguturi.

Read only

0 Likes
846

Dear Aditya,

My client has created some SQL tables(like mara table etc.) in SQL side and they want to move data from sap table(like mara table etc) into corresponding SQL tables.

And also they do not want use RFC, BAPI and ALE/IDOC..They have created connection using DBCO TCode and they are telling that to do it using ABAP coding only.

Pls Aditya share me it is possible using Native SQL..if yes then how? or tell me other way, if possible..

Thanks

Mudassar

Read only

0 Likes
846

Hi

Yes you will have to use NATIVE SQL in this case. Fetch all the data using open SQL and then insert using Native SQL.

Please search SCN for the same

Nabheet

Read only

0 Likes
846

Thanks Nabheet..can you share me some sample code for the same..

Rgrds,

Mudassar

Read only

0 Likes
846

Dear Mudassar Ali,

Have found the way to solve this thing?
i am also in search of exactly same thing.....
please share the ABAP Code and also tell me how you have created connection using TCODE DBCO?

Thanking you in advance

Read only

0 Likes
846

Dear Akhtar,

Actually, basis guys are responsible to create database connectivity between sap and other server using DBCO tcode.

Here, I have written some coding example for native SQL.

DATA:  dbs TYPE dbcon-con_name VALUE 'CTDWTEST'.      "Connection opening

     EXEC     SQL.

          CONNECT dbs.

     ENDEXEC.

"To Push the records into native database.

EXEC SQL.

     INSERT INTO native_table_name ( mention here all native table's fields separated by comma )

       VALUE (Write here all internal table's fields separated by colon and comma, Ex- :wa_test-matnr, :wa_test-werks, :wa_test,)

ENDEXEC.