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 database table

naveen_inuganti2
Active Contributor
0 Likes
511

hi!

say i have 150 fields............... 100 fields are modiafable..........

i want to change 10 fields among these 100.

what should i use : modify or update??

i dont want to enter remaining 90 fields.....they remain blank in the display screen.....

i only enter these 10 random modifying fields..........

what logic should i use??

thank u in advance.

regards.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
455

Hai,

u can do this from UPDATE statement

first copy one record into one work area .

then change 10 fields of that work area with new values

then update the database table from the edited workarea

select single * from <table > into wa <condition>

wa-field1 = <value1>

wa-field2 = <value2>

..............................

.................................

update <dtab > from wa.

thanks & Regards

sarath p

2 REPLIES 2
Read only

Former Member
0 Likes
455

Hi Naveen,

The statement UPDATE only changes an existing DB entry otherwise sy-subrc 0.

The statement MODIFY updates an existing DB entry or, in no matching entry exists, inserts a new entry into the DB table.

So you can use UPDATE statement.

Thanks.

Read only

Former Member
0 Likes
456

Hai,

u can do this from UPDATE statement

first copy one record into one work area .

then change 10 fields of that work area with new values

then update the database table from the edited workarea

select single * from <table > into wa <condition>

wa-field1 = <value1>

wa-field2 = <value2>

..............................

.................................

update <dtab > from wa.

thanks & Regards

sarath p