Need to pass value from one table to another



I have a field A  with two or 3 values in one table.

I have the same field in another table..

I need to pass the maximum value of the field A to the same field in another table.

  • In reply to Kunal:

    I updated the value in Header table using insert method as:
    public void insert()
    AX_BookMaster axbm;
    AX_SubscriberMaster axsm;
    AX_TransactionHeader axt;
    AX_TransactionLine axtl;
    select maxof(tobereturndate) from axtl where axtl.Trans_Id==this.Trans_Id;
    update_recordset axt setting tobereturndate = axtl.ToBereturnDate where axt.Trans_Id==this.Trans_Id;

    It gets the max of tobereturndate in line table and passed it to Header table tobereturndate field.