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 Andchi on Mar 26 at 9:39 AM
Thanks Horacio...
I found the solution from another posting you was answered...
I replaced the command SET taxpower = taxpower with SET taxpower = :taxpower and the value was stored.

---------------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
Andchi  

ABAP Developer
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements

_.____.__

0 comments:

Post a Comment

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