HALLOW
hallow
i have two tables that i wont to move the data(price) from first table INTAB_A132
to table zempkostlprice_rec. in table zempkostlprice_rec i have 2 colman one is date and resrc and i wont to add from table INTAB_A132 the price to zempkostlprice_rec .
i give example.
<b>REMOVED BY MODERATOR</b>
i give the tables.
INTAB_A132
resrc date kbetr(price)
0000123456 20070101 20.0000
0000123456 20070601 25.0000
the date mean that from 01012007 until 01062007 the price where 20.0000
this is what i have in table right now zempkostlprice_rec and i wont to add price colman from INTAB_A132
zempkostlprice_rec
rserc date
1 0000123456 012007
2 0000123456 022007
3 0000123456 032007
4 0000123456 042007
5 0000123456 052007
6 0000123456 062007
7 0000123456 072007
8 0000123456 082007
9 0000123456 092007
10 0000123456 102007
11 0000123456 112007
12 0000123456 122007
13 0000123456 012008
this is what i wont to add price colman to thired table from intab_konp
u can see that price have to be change after 01062007 to 250000
resrc date price
1 0000123456 012007 20000.00
2 0000123456 01022007 20000.00
3 0000123456 01032007 20000.00
4 0000123456 01042007 20000.00
5 0000123456 01052007 20000.00
6 0000123456 01062007 250000.00
7 0000123456 01072007 250000.00
8 0000123456 01082007 250000.00
9 0000123456 01092007 250000.00
10 0000123456 01102007 250000.00
11 0000123456 01112007 250000.00
12 0000123456 01122007 250000.00
13 0000123456 01 012008 250000.00
I TRY WIT THAT CODE BUT I GET JUST PRICE WHERE DATE > 01062007
I WONT ALSO WHEN DATE LESS THEN 01062007 WHERE PRICE 20.00000
(i use the function to cahnge the format of day to be the same format in both table)
LOOP AT zempkostlprice_rec INTO wa_zem.
READ TABLE intab_a132 INTO wa_intab_a132.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = wa_zem-date
IMPORTING
date_internal = tmp_date.
IF wa_intab_a132-datab LE tmp_date.
MOVE: wa_intab_a132-kbetr TO wa_zem-kbetr.
MODIFY zempkostlprice_rec FROM wa_zem TRANSPORTING kbetr .
CLEAR:wa_zem,wa_intab_a132.
ENDIF.
ENDLOOP.
0000123456 012007 0.00
0000123456 022007 0.00
0000123456 032007 0.00
0000123456 042007 0.00
0000123456 052007 0.00
0000123456 062007 250000.00
0000123456 072007 250000.00
0000123456 082007 250000.00
0000123456 092007 250000.00
0000123456 102007 250000.00
0000123456 112007 250000.
regards
Message was edited by:
Alvaro Tejada Galindo