I have a rpg that calls another rpg.
The first rpg is used to save data based on completely new entries in Item Master table(Item codes are unique)
The second rpg is called to save additional data onto the data for which the item code are already existing in Item Master.
SO in both the Item MAster and the secondary table only the Item codes are common
BUT both the table also have a column called Quantity which have been differently named but serve the same purpose
The issue now is that in my second rpg(that is after checking that a Item code exists i add a different value to the quantity field)
Suppose
Item Master table :
ItemCode | Item | Quantity
AA100 | Blueberry | 50
AA200 | Cherry | 20
Goods received table:
ItemCode | Qty
AA100 | 100
Now as can be seen item code value is common but the fields quantity have different names.
Now when i enter value of Goods received table as 100,this value must get added to the previous quantity value of master table.
I have been able to code the addition part.It is infact also getting saved in that Quantity variable of MAster table.But when i perform Runquery on it,that doesnt show the updated value.
In my second rpg,U spec has been given to Master file.Also when i do update a runtime error is seen of trying to enter duplicate value as that is being done by updating the master table record format
eg: UPDATE ITMREC
So how can i update the table only to reflect that one value and not the entire record row.Please help.
The first rpg is used to save data based on completely new entries in Item Master table(Item codes are unique)
The second rpg is called to save additional data onto the data for which the item code are already existing in Item Master.
SO in both the Item MAster and the secondary table only the Item codes are common
BUT both the table also have a column called Quantity which have been differently named but serve the same purpose
The issue now is that in my second rpg(that is after checking that a Item code exists i add a different value to the quantity field)
Suppose
Item Master table :
ItemCode | Item | Quantity
AA100 | Blueberry | 50
AA200 | Cherry | 20
Goods received table:
ItemCode | Qty
AA100 | 100
Now as can be seen item code value is common but the fields quantity have different names.
Now when i enter value of Goods received table as 100,this value must get added to the previous quantity value of master table.
I have been able to code the addition part.It is infact also getting saved in that Quantity variable of MAster table.But when i perform Runquery on it,that doesnt show the updated value.
In my second rpg,U spec has been given to Master file.Also when i do update a runtime error is seen of trying to enter duplicate value as that is being done by updating the master table record format
eg: UPDATE ITMREC
So how can i update the table only to reflect that one value and not the entire record row.Please help.
Comment