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

UPDATE DB with empty field

Former Member
0 Likes
2,277

I have a structure and a field of it is empty.

I would like to overwrite the field in the database with this initial field.

but it seems that update only changes values if they are filled.

Does any workaround exist?

1 ACCEPTED SOLUTION
Read only

tarangini_katta
Active Contributor
0 Likes
1,753

Hi ,

USe Modify then it solves the problem.

Thansk

I have a structure and a field of it is empty.

I would like to overwrite the field in the database with this initial field.

but it seems that update only changes values if they are filled.

Does any workaround exist?

7 REPLIES 7
Read only

tarangini_katta
Active Contributor
0 Likes
1,754

Hi ,

USe Modify then it solves the problem.

Thansk

Read only

former_member404244
Active Contributor
0 Likes
1,753

Hi,

Use modify statement.. it will work..

Regards,

Nagaraj

Read only

Former Member
0 Likes
1,753

This message was moderated.

Read only

Former Member
0 Likes
1,753

hi.

just check like this.

select f1 f2 from ztable into corresponding field of itab 
where condition.

loop at itab into wa_itab where f1 ne 0. " suppose f1 is field which u want to modify
  wa_itab-f1 = 0.
modify itab from wa_itab index sy-tabix.
endloop.

Edited by: tahir naqqash on Feb 11, 2009 6:53 PM

Edited by: tahir naqqash on Feb 11, 2009 6:53 PM

Read only

Former Member
0 Likes
1,753

Hi,

Try this, this will surely solve ur problem

MODIFY <dbtab> from <your wokarea or internal table>.

Edited by: Digvijay Singh Pawar on Feb 11, 2009 2:59 PM

Read only

Former Member
0 Likes
1,753

Hi,

you can use,

MODIFY <db tab> FROM TABLE <int tab> "Here int tab contains the initial values

Regards,

Manoj Kumar P

Read only

Former Member
0 Likes
1,753

hi,

use the following statements as per your requirement

Modify DBTAB from wa.

Modify DBTAB from table itab.

These statements modify or insert based on the records in the data base table.

Thanks

Sharath