Application Development 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: 

Export SAP data into Sql tables from sap side only.

former_member572718
Discoverer
0 Kudos

Hi Expert,

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

Thanks & Regards,

M. Ali

6 REPLIES 6

Former Member
0 Kudos

Hi Ali,

       Could you elaborate your issue.

      Regards,

      Aditya Tanguturi.

0 Kudos

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

0 Kudos

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

0 Kudos

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

Rgrds,

Mudassar

0 Kudos

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

0 Kudos

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.