Friday, July 25, 2008

How to access an external database from ABAP via DBLINK (ORACLE)

Using transaction SE11, create a table (ZTABLE) 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 (ZTABLE_VIEW, projection view) using BASIS table ZTABLE
Using SVRMGRL>
create dblink REMOTE_DB as connect to remote_user identified by password; (database link created)drop table ZTABLE; (table dropped)create synonym ZTABLE for ZTABLE@REMOTE_DB; (synonym created)
Using transaction SE16 , type in ZTABLE_VIEW and hit RETURN
Enter value in key fields and hit execute. (displays rows from the remote table)
Tips and Tricks
To see the complete text of an error/warning message on the SAPGUI status bar, right click on the message and drag left.
To prevent your spool requests getting deleted from the BASIS cleanup jobs, you need to uncheck the Delete after print checkbox in the print control screen, execute transaction SP01, find your spool#, click on Attributes and change the Delete After date
Short cuts using the OK-code box.
%sc
Search in page
%pc
Download do local file
p+
Page up
p-
Page down
p++
Top of page
p--
End of page
Use transaction AL11 to browse the application servers directory

No comments: