Updating one table from another table

) if COSP-OBJNR begins with ‘ PR’ Check table PRPS with COSP-OBJNR = PRPS-OBJNR and enter PRPS-PBUKR If COSP-OBJNR begins with ‘ NV’ Check table AFVC with COSP-OBJNR = AFVC-OBJNR, go to Table AFKO with AFVC-AUFPL,go to table AUFK with AFKO-AUFNR and enter AUFK-BUKRS If COSP-OBJNR begins with ‘ OR’ Check table AUFK with COSP-OBJNR = AUFK-OBJNRand enter AUFK-BUKRSCOFP-EINDT = -COFP-SGTXT = -COFP-GEBER = -COFP-KURSF = -COFP-KUFIX = -COFP-GBETR = -COFP-KURSR = -COFP-KURSFIKRS = -COFP-KZKRS = -COFP-UMBKZ = -COFP-KBLNR = -COFP-KBLPOS = -COFP-HI FIVOR = -COFP-LO FIVOR = -COFP-HI ACCOUNT = -COFP-LO ACCOUNT = -COFP-HI LIFNR = -COFP-LO LIFNR = -COFP-HI KUNNR = -COFP-LO KUNNR = -COFP-XDELETE = -COFP-HI XOPVW = -COFP-LO XOPVW = -COFP-ZAEHK = -COFP-CHAINBELNR = -COFP-MWSKZ = -COFP-LEDNR = -COFP-BELTP = ‘1’ COFP-VERSN = ‘0’ COFP-OWAER = COSP-TWAERCOFP-CPUDT = SY-DATUMCOFP-CPUTM = SY-TIMEafter doing updation, its again saying Selection of all entries in table COFP with value type 51 to 62, selected year, selected cost elements above and for all selected WBS elements and all objects underneath. Now, can someone help me as how to proceed with the entire thing?

An elaborate and illustrative answer would be highly appreciable.

You could create a trigger on table B that updates table A every time field_2 on table B is updated.

Hi, Please go through the case I am mentioning below and if possible try to provide with a solution.

Product ID is linked to the Product ID field in the Products table in a one to many relationship.

The Alias table is used so that if a product has more than one name, the names will be recognized as one product by having a common Product ID.

The Product ID in the Aliases table is currently being updated manually after a new product is added.

I would like to automate this using VBA, if possible.

My problem is that I can't figure out how to get the Product ID for the new Product Name copied into the Alias form for the new Product Alias by query or ADO VBA. I can give you DAO code as follows: Inside the button and/or code you use to say it's ok to add the new Product in form Products, call this procedure (this might replace code or punching wherever you are now initially adding a record to table Aliases): Private Function fn Add Alias Record () Dim rs as DAO.recordset Dim ss as string ss = "Select * From Aliases" Set rs = Current DB. Addnew ' Here you are referring to textboxes on your Products form ' Alias ID will automatically be assigned by Autonumber !

If you require any other information...get back to me .

I wish to use an UPDATE query to change data in one column of a table to the values from another table.

Leave a Reply