How to connect SAP to External Database

Source: Internet
Author: User

In the previous article, we continued the example of connecting SAP to an external database.

Here we mainly talk about external MSS links:

First Run DBCO:

Click the first pen to enter the modification status:

Create an entry, such:

In, DBMS is filled with MSS, representing Microsoft's SQL server database. Link information:

MSSQL_SERVER = server name MSSQL_DBNAME = Database Name

Save.

Link field in ABAP:

PERFORM CONNECT_MSS USING 'test'. "Link

PERFORM DISCONNECT_DB USING 'test'. "disconnected

* LINK SQL

FORM CONNECT_MSS USING Test.

Exec SQL.

Connect to: Test

ENDEXEC.

IF SY-SUBRC = 0.

MESSAGE '(or all) data volume link successful 'type '.

"Perform database operations

ELSE.

MESSAGE 'Type s' is missing for some (or all) data links '.

ENDIF.

ENDFORM. "CONNECT_MSS

Remember to disconnect:

* Disconnect

FORM DISCONNECT_DB USING Test.

Exec SQL.

DISCONNECT: Test

ENDEXEC.

ENDFORM. "DISCONNECT_DB

Once the connection is successful, you can use Native SQL to directly operate the database ~ I will not go into details here!

 

Download this PDF:

Http://files.cnblogs.com/mengxin523/SAP%E9%93%BE%E6%8E%A5%E5%A4%96%E9%83%A8%E6%95%B0%E6%8D% AE %E5%BA%93%E7%9A%84%E5% AE %9E%E7%8E%B0%E6%96%B9%E6%B3%95.pdf

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.