Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from sats35 on Dec 18 at 12:17 AM Dear Anil, You can put this code in one of your performs or field validation checks.. TRY. EXEC SQL. CONNECT TO :DBS ENDEXEC. IF sy-subrc <> 0. RAISE EXCEPTION TYPE cx_sy_native_sql_error. ENDIF. " ZVEHICLE is the ABAP screen table name. GET_XXXX is procedure created in Oracle DB to fetch data into ABAP EXEC SQL. EXECUTE PROCEDURE GET_XXXX(INOUT :ZVEHICLE-DRIVERLICENCE, OUT :ZVEHICLE-VEHICLENO, OUT :ZVEHICLE-INLOADEMPTY,OUT :ZVEHICLE-DRIVERNAME, OUT :ZVEHICLE-ASSISTNAME,OUT :ZVEHICLE-NAME1, OUT :ZVEHICLE-DRIVERPASS, OUT :ZVEHICLE-ASSISTPASS) ENDEXEC. CATCH cx_sy_native_sql_error INTO db_excep. CLEAR e_dbmsg. CALL METHOD db_excep->if_message~get_text RECEIVING result = e_dbmsg. CLEAR: e_dbmsg_long. CALL METHOD db_excep->if_message~get_longtext RECEIVING result = e_dbmsg_long. EXEC SQL. disconnect :DBS ENDEXEC. ENDTRY. In Module Pool Top, you have to declare DATA: dbs TYPE dbcon-con_name VALUE 'SAPORCL', " this connnection has to be created by your basis team db_excep TYPE REF TO cx_sy_native_sql_error, e_dbmsg TYPE string, e_dbmsg_long TYPE string. DATA : db_msg(200), Hope this helps...
| | | ---------------Original Message--------------- From: Anil Dhasmana Sent: Wednesday, December 17, 2014 11:59 PM Subject: Get Data From Other Database In ABAP Is there any way to connect to another database like MSSQL or another Oracle DB in ABAP. Right now we have oracle DB in place. Can we take a report from other DB also? Regards, Anil. | | Reply to this email to post your response. __.____._ | _.____.__ |