10-04-2005 10:13 AM
Hi,
There is a table (YKXRDAWERKS) with 2 fields (YWERKS_LOGICAL & YWERKS_LANDLORD). Two new fields should be added to hold the description for the two fields. i.e. YLOGICAL_NAME & YLANDLORD_NAME . The value for this field should be pulled from another table (T001W-NAME1).
The 2 new fields YLOGICAL_NAME & YLANDLORD_NAME need to bring automatically T001W-NAME1 into the table. Users will only enter Landlord plant and Logical Plant into the table and the plant descriptions should automatically populated with the T001W-NAME1 Description.
Please let me the know the Logic & Steps involved in it to implement the logic
Thanks
Suresh Kumar
10-04-2005 10:29 AM
Hi,
Try this:
1) SE54 - environment - Modifiction - events - new entry -
-> choose event 01 (Before saving the data in the database)
And create a include with the form routine e.g. fill_counter
coding:
select single name from t001w into YKXRDAWERKS-YLOGICAL_NAME ...
regards Andreas
10-04-2005 10:31 AM
Hi,
Keep the table YKXRDAWERKS with two new columns added.
First select the records from the table YKXRDAWERKS to an internal table, Say <b>T_YKXRDAWERKS</b>.
loop at T_YKXRDAWERKS into wa_YKXRDAWERKS,
select NAME1 from T0001W into wa_YKXRDAWERKS-
YLOGICAL_NAME where <b>WERKS = wa_YKXRDAWERKS-WERKS</b> .
wa_YKXRDAWERKS-YLANDLORDNAME = wa_YKXRDAWERKS-
YLOGICAL_NAME.
MODIFY T_YKXRDAWERKS from WA_YKXRDAWERKS TRANSPORTING
YLANDLORDNAME YLOGICALNAME.
UPDATE YKXRDAWERKS SET YLANDLORDNAME = wa_YKXRDAWERKS-
YLOGICAL_NAME AND YLOGICALNAME = wa_YKXRDAWERKS-
YLOGICAL_NAME.
Clear wa_YKXRDAWERKS.
endloop.
Message was edited by: Sivakumar Muthusamy