‎2008 Apr 21 10:20 AM
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..........
I used - UPDATE <db TABLE> FROM <TABLE>.
Now... i need to enter all fields.......... if i give all fields "optional" in Export parameter then only non optional fields ned to be given. but all other optional fields which were not given input become blank in the datadict.
what should i do to change only few fields and the fields which i do not enter remain with the old values.???
thank u in advance.
regards.
‎2008 Apr 21 10:34 AM
Hi Naveen,
you can use the following syntax:
if field2,field3,field4 are the fields you want to update
UPDATE <dbtable>
SET field2 = wa_table-field1
field3 = wa_table-field3
field4 = wa_table-field4
WHERE field1 = wa_table-field1.
This will update the fields which you entered in SET condition without affecting the other fields of teh same record.
field1 should be the primary key for the db table
Rewards if useful.
Thanks & Regards,
Swarna Munukoti.
‎2008 Apr 21 10:29 AM
First of all get the entry from Table(with the Key)
into header and change what ever fields you want to change ..
then update table using the header ...
‎2008 Apr 21 10:34 AM
Hi Naveen,
you can use the following syntax:
if field2,field3,field4 are the fields you want to update
UPDATE <dbtable>
SET field2 = wa_table-field1
field3 = wa_table-field3
field4 = wa_table-field4
WHERE field1 = wa_table-field1.
This will update the fields which you entered in SET condition without affecting the other fields of teh same record.
field1 should be the primary key for the db table
Rewards if useful.
Thanks & Regards,
Swarna Munukoti.
‎2008 Apr 21 10:38 AM
hi check this it had n=many options you first check which is best for u..
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/update.htm
regards,
venkat
‎2008 May 29 8:39 AM
hi pal...
which ever fields u want to update make it in input fields where as remaining 90 fields u can put it in output field in proerties..then there is no possibility of changing...u can jst change only 10 records...
regards,
vamshi