I've created a condition formula that changes KOMK-TXJCD. It only works when I click Updat on the condition screen. But just saving does not use the new TXJCD that I assigned from the plant in the alternate formula. In debug I see the values changing. Here is a copy of the code.
Any help MUCH rewarded.
Data lv_titlepass(1) type c.
DATA wa_plant_txjcd like t001w-txjcd .
start by assuming default .
lv_titlepass = 'D' .
now look at incoterm field
CASE KOMP-OITITLE.
WHEN '1'.
lv_titlepass = 'D'.
WHEN OTHERS.
lv_titlepass = 'O'.
ENDCASE.
the default is tax is charged using destination txjcd.
If 'O' then change TXJCD
use the plant
If lv_titlepass = 'O' .
clear wa_plant_txjcd .
select single txjcd from t001w into wa_plant_txjcd
where werks = komp-werks .
If sy-subrc <> 0 .
exit .
else.
KOMK-txjcd = wa_plant_txjcd .
endif .
Endif .