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

DBlink access in ABAP code

Former Member
0 Likes
1,482

hello all,

need your help.

can someone give me a useful code to access DBlink in sap abap code..?
is there any BAPI that can we use to do this..?

your response is highly appreciated..

1 REPLY 1
Read only

Former Member
0 Likes
714

hello,

Using transaction SE11, create a table (ZTEST) with the same fields as the table in the external database, make sure that the type and lengths of the fields are identical.

Using transaction SE11, create a view (ZTEST_VIEW, projection view) using BASIS table ZTABLE

Using SVRMGRL> (Oracle utility)

create dblink REMOTE_DB (your db link) as connect to remote_user identified by password; (database link created)

drop table ZTEST; (table dropped)

create synonym ZTEST for ZTEST@REMOTE_DB; (synonym created)

Using transaction SE16 , type in ZTEST_VIEW and hit RETURN

Enter  value in key fields and hit execute. (displays rows from the remote table)

also check links

http://scn.sap.com/thread/6887

http://scn.sap.com/thread/1773060

best regards,

swanand