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

modify statement for data base table..

former_member217546
Participant
0 Likes
634

hi friends i am using modify statement to update / insert new entries in the db table with internal table.

when i try to modify the data it will be automatically sorted out by the primary keys.

i don't want the data would be sorted out instead it should be updated as it is.

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
609

There is no concept of "order" on a relational database table. Therefore your question is meaningless.

matt

6 REPLIES 6
Read only

Former Member
0 Likes
609

Well what difference does it make whether the DB table is sorted or not with the values you modify?

Read only

Former Member
0 Likes
609

Hi...

use this logic..

select empno status marks from DB into table int2

where empno = DB-empno.

loop at int2 into wa2.

read table int1 into wa1 where empno = wa2-empno.

wa1-status = status.

wa1-marks = marks.

modify int1 from wa1 transporting status marks.

endloop.

Regards,

Lokeswari.

Read only

Former Member
0 Likes
609

Hi Sudheer ,

is the data in your internal table getting sorted automatically or is it the data in the database table.

If its the data in the internal than declare tha internal table as a standard table.If the internal table is declared as type sorted table then by default the data would be sorted.

Hope this helps you.

reagards ,

Navya.

Read only

Former Member
0 Likes
609

And why the same is required?

Check if you can achive your requirement by using logic in code.

Read only

matt
Active Contributor
0 Likes
610

There is no concept of "order" on a relational database table. Therefore your question is meaningless.

matt

Read only

0 Likes
609

thank u ..yes i under stood ..sry for this question.