I have created a substitution rule to change the GL used as part of goods issue posting but for some reason the GL is not being changed. Here is what I have done:
1. Created rule in GGB1 under FI- Line Items.
2. Prereq - If Doc Type = WL & GL = 40000
3. Subst - user exit U101:
IF sy-tcode = 'VL02N'.
lf_auart TYPE auart.
SELECT SINGLE auart INTO lf_auart FROM vbak
WHERE vbeln = bseg-vbel2.
IF lf_auart = 'BLT'.
bseg-hkont = '0000043000'.
What I am expecting to happen is when the goods issue is done at the point of VL02n the FI posting checks the line items and if the rule is true then post to the GL43000 but this is not happening, I have tried to test rule in simulation rule but I dont think you can enter the details for the user exit.