‎2006 Nov 28 10:50 AM
Hi Experts .
I have following Requirement .
i have Z table with Field F1 F2 F3 F4 in My program i am calculting F2 Value if this entry exists in the Ztable I am modifying that record.
When I modify i am able to modify only f2 wher as F3 F4 vales are getting Reset to blank .
I tried .
Modify Dbtab from WA statement Nogo . Modify transporting wont work
Please assit if i can change only F2 value without reseting the F3 F4 .
thanks In Advance
Badari
‎2006 Nov 28 10:55 AM
Hi,
i think first u need to read the contents of the internal table into the workarea. and then make the changes of the field f2. update the workarea. then u can use the modify statement using the wa.
MODIFY dbtab FROM wa.
i think it will help u out.
else u can just use transporting the fields to the database table.
Regards
vamsi
‎2006 Nov 28 10:53 AM
hi,
I think u are using control break statements for calculating F2. example
at new f2...if that is the case your work area wouldnt carry the values for the f3 and f4 components.
any how check the values in wa in the modify statement that will answer many questions of yours.
santhosh
‎2006 Nov 28 10:55 AM
Hi,
i think first u need to read the contents of the internal table into the workarea. and then make the changes of the field f2. update the workarea. then u can use the modify statement using the wa.
MODIFY dbtab FROM wa.
i think it will help u out.
else u can just use transporting the fields to the database table.
Regards
vamsi
‎2006 Nov 28 10:56 AM
hi badari
sorry..... follow the abow
Naresh Reddy
Message was edited by:
Naresh Reddy
‎2006 Nov 28 11:00 AM
Hello,
Can you paste your code,then it will be easier to lcaote the exact issue in program.
Actually field value will be reset if there another activity check is there in program (or control working in the loop e.g. at first,at new field etc.).If your code has something simialr to it,then transfer contents of those fields in other variables defined globally.& then after control statement transfer these value to your reqd fields for print.
Thanks.
Mark points if helpful.
‎2006 Nov 28 11:43 AM
Use the statement as below
UPDATE Ztable SET f2 = wa-f2
f3 = wa-f3
f4 = wa-f4
WHERE f1 = wa-f1.
commit work.
‎2006 Nov 28 12:06 PM
I wanted Solution to modify sigle field whitout having other fields .
EX : I have following table
This is my Z table
Studno Maths Sci Eng
1 10
i get student number and SCi Eng marks in flat file if i upload for respective student number sci and eng has to be updated . with out resetting the Maths Marks .
Solution is not select that record from table add Sci Maths and Eng then Modify . i was seraching for only Sci eng fields to be updated without writing select on the table .
Thanks & regards
badari
Message was edited by:
Badarinarayan Patil