Skip to Content
0
Former Member
Jul 11, 2007 at 03:58 PM

automatically fill data in a column from one table to another

219 Views

Hi experts,

I would like to automatically fill data in a column from one table to another.

I'll explain the situation and I hope you understand what I mean:

When customers order products, they're stored in the table RDR1. The products and their properties are stored in the OITM table, but because these products are in warehouses, there is a table for too, named as OITW. In this table there is this UDF named U_LOCATION, which is the <b>location</b> in the warehouse where a product is stored.

U_LOCATION is what I want to reflect in the RDR1 table. So I made a UDF in the RDR1, named U_MAGLOC.

My goal is: when I insert an order for a specific product, I want to see automatically the warehouse location in the U_MAGLOC field.

I am fairly new in the query business, so I read the Step by Step book about MS SQL Server, looked up all the notes at the SAP portal about queries and tried several SELECT queries myself. The latest one I tried was:

SELECT $[$38.U_LOCATION.0] for browse

That didn't work either... So now I'm quite desperate and any help would be very much appreciated!