I have a scenario, a plant (eg. TN01) operation is stopped from MM side and the client want to stop posting from FI side as well. While processing F-02, after giving GL account, we have option to enter plant data in more tab, I want to restrict posting only for TN01 plant in line item.
I tried giving validation in OB28 like below but not working.
BKPF-BUKRS = 'TN' AND BKPF-TCODE = 'F-02'
BSEG-WERKS <> 'TN01'
Z8 Plant TN01 not allowed.
Could you please help me how to restrict from posting of plant TN01 in line item from FI side?
BKPF-TCODE = 'F-02' is not the right field: you should use SY-TCODE, as BKPF-TCODE is not the exact transaction that the user enters. Also, as general rule, if your subsitution does not work, you can set a trace and run the transaction: you'll see exactly which condition is incorrect.