‎2013 Dec 31 11:05 AM
Hi Expert,
Pls share me, how to push sap data into SQL table from abap side.
Thanks & Regards,
M. Ali
‎2014 Jan 01 7:33 AM
Hi Ali,
Could you elaborate your issue.
Regards,
Aditya Tanguturi.
‎2014 Jan 02 5:48 AM
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
‎2014 Jan 02 5:53 AM
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
‎2014 Jan 02 6:04 AM
Thanks Nabheet..can you share me some sample code for the same..
Rgrds,
Mudassar
‎2015 Jan 22 6:47 AM
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
‎2015 Jan 22 10:42 AM
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.