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

Connect PostgreSql in ABAP Program

Former Member
0 Likes
1,256

Hi All,

I have a requirement, there is an external software with postgresql DB. I want to fetch some data from this postgre DB to in ABAP program. How can i connect this DB in my ABAP program. Please help .

Regards

Jitendra Singh

2 REPLIES 2
Read only

former_member212713
Contributor
0 Likes
744

Hi Jitendra;

I know 2 way connect to nonSAP DB.

First : You prepare program at VS .net and use NCO 3.0 (last version)

Please read below link:

/people/thomas.weiss/blog/2011/01/14/a-spotlight-on-the-new-net-connector-30

Second : Native sql method. Other DB admin give you access permision to DB. And You or other expert prepare view or select or stored procedure at other DB. You call "view or select or stored procedure" from SAP with ABAP native SQL commands.

I used 2 years Native SQL method between SAP and 3.Party Programs DB(Oracle).

It's very healthy method.

Please read below link:

http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3b8b358411d1829f0000e829fbfe/content.htm

Best regards.

Edited by: Melih MUTLU on Jun 9, 2011 9:43 AM

Edited by: Melih MUTLU on Jun 9, 2011 9:51 AM

Read only

0 Likes
744

Hi Mutlu,

Thanks to reply.

Actualy I have a database connection in DBCON

Connc Name String

POSTGRE = MSSQL_SERVER=172.16.0.30,5432 MSSQL_DBNAME=sms_5.0 OBJECT_SOURCE=sms_5.0

with userid & passard .

In my ABAP program I am using this code .

exec sql.

connect to 'POSTGRE'

endexec.

if sy-subrc <> 0.

message 'unable to connect' type 'E' .

return.

endif.

But this PostgreSql DB not connecting .

I have another extenal DB in MSSQL this is connecting by using same way.

Please help me out. What I need to do to connect Postgre DB.

Regards

Jitendra Singh