Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Native SQL

Former Member
0 Likes
846

I have one internal table which was processed and there is some change in one filed. Now I want to place these changes back into the database table.

Now as I told u previously to establish link between SAP table and legacy system connection between the table and dictionary has been dropped so I need to write Native SQL there. Such as

 

Loop at t_table into fs_table.

 

Exec sql.

   Update database_table_name

         Set changed_field_name = fs_table-changed_field_name

     Where filed = fs_table-field

Endexec.

 

If I give like this it is going to dump.

If I give values then it is working such as



Exec sql.

 

   Update database_table_name

         Set changed_field_name = u201812345u2019

     Where filed = u2018XYZu2019

 

Endexec.

But if I give variables it is not working, let me know what I can do

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
768

copy_pasted_from

http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm

Edited by: Vijay Babu Dudla on Jan 19, 2009 5:25 AM

5 REPLIES 5
Read only

Former Member
0 Likes
768

HI,

What is the data type of fs_table-changed_field_name & fs_table-field.?

Have you ascertained that the variables are correctly filled during execution?

Read only

0 Likes
768

hi,

in open sql you will check the type of repository structure

in similier .. check the datatype of the base database as

wen you use opensql it directly likes to the database so give the type of bothe variables fs_table-changed_field_name & fs_table-field as same

shiva

Read only

Former Member
0 Likes
769

copy_pasted_from

http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm

Edited by: Vijay Babu Dudla on Jan 19, 2009 5:25 AM

Read only

0 Likes
768

Hi Thanks a lot,

My problem got solved....

Read only

0 Likes
768

Can you please tell me what is the solution ..

I am facing the same problem

Regards,

Amit Teja V