‎2008 Jul 30 3:26 PM
i have one alv report output like
kunnr city plant
0000 iiiii 255
and also i want to upload all these data into sql server, how to proceed ?
‎2008 Jul 30 3:35 PM
Hello Vimal,
You can retrieve the data into an internal table and inside your report directly insert the data into the MSSQL server using specific NATIVE SQL statements.
But you need to configure the Transction :DBCO for your MSSQL server database like this :
DB Connection +DBO+0050
DBMS MSS
User Name
DB password /
Conn. info MSSQL_SERVER=iwdf7yt4 MSSQL_DBNAME=IDU OBJECT_SOURCE=idu
Connection Limit 0
Optimum Conns 0
Check the following OSS Messages : 323151, 178949, 738371
Here is a sample code :
DATA: exc_ref TYPE REF TO cx_sy_native_sql_error,
error_text TYPE string.
TRY.
EXEC SQL.
SET CONNECTION 'SSI_SQL'
ENDEXEC.
EXEC SQL.
CONNECT TO 'SSI_SQL'
ENDEXEC.
EXEC SQL.
INSERT INTO SHIFT
(shift_id, shift_name)
VALUES ('8', 'test');
ENDEXEC.
IF SY-SUBRC <> 0.
ENDIF.
CATCH cx_sy_native_sql_error INTO exc_ref.
error_text = exc_ref->get_text( ).
MESSAGE error_text TYPE 'I'.
ENDTRY.
EXEC SQL.
SET CONNECTION DEFAULT
ENDEXEC.
*EXEC SQL.
SELECT db_name() INTO :DBN FROM SVERS
*ENDEXEC.
*WRITE: / 'current database name', DBN.
Hope this solves your probem.
Thanks,
Greetson
‎2008 Jul 30 5:38 PM
hi greetson,
thanks for ur reply.one more clarification.
actually we r using .NET connector so i want to upload the data in .NET, already they are creating structure like my report output format, so how to transfer the data ? BDC method or which method to approach ?
‎2008 Jul 30 5:39 PM