We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE: [sap-dev] Native SQL in Updating Numeric Field to an External MS SQL Database

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from horacio zapettini on Mar 26 at 7:11 AM
the problem is that taxpower is a SAP variable! and you're missing something in the syntax.... (I could tell you the problem, but I can see you know the solution , as in the where clause the syntax is correct.

---------------Original Message---------------
From: Andchi
Sent: Tuesday, March 26, 2013 6:31 AM
Subject: Native SQL in Updating Numeric Field to an External MS SQL Database

Dear all,

i've got a problem in updating numeric fields to an external MS SQL
Server database.
The code is:

data: taxpower type i.

try.
EXEC SQL .
UPDATE [KosmocarUsedNew].[dbo].[u_cars]
SET taxpower = taxpower
WHERE ID = :i_site
ENDEXEC.

EXEC SQL.
commit
ENDEXEC.

catch cx_sy_native_sql_error into lo_exc_ref.
lv_error_text = lo_exc_ref->get_text( ).
lv_len = strlen( lv_error_text ).
lv_len = lv_len - 50.
lv_error_text1 = lv_error_text(50).
lv_error_text2 = lv_error_text+50(lv_len).
lv_error = 'X'.
message i398(00) with lv_error_text1 lv_error_text2.
endtry.


The database field "TAXPOWER" is also type I.
The return code of the procedure is "0" but sql databse field is unchanged.
When i pass the value in this way : SET taxpower = '20000' ,then the update is succesful.

Thanks and regards,

Andromachi.

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2013 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
horacio zapettini  

12 achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Have an SAP Question? Ask Your Peers at Toolbox for IT

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language