cancel
Showing results for 
Search instead for 
Did you mean: 

Substitution Rule for Cost Of Sale GL

former_member355038
Participant
0 Kudos

Hi,

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'.

    DATA:

      lf_auart TYPE auart.

    SELECT SINGLE auart INTO lf_auart FROM vbak

      WHERE vbeln = bseg-vbel2.

    IF lf_auart = 'BLT'.

      bseg-hkont = '0000043000'.

    ENDIF.

  ENDIF.

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.

Joe

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member198032
Active Contributor
0 Kudos

Hi Joe,

did you checked the following documentation?

Set Up Substitution for Cost of Sales Accounting - Financial Accounting Global Settings - SAP Librar...

Hope this be helpful for you.

Regards,

Cristiano