cancel
Showing results for 
Search instead for 
Did you mean: 

Substitution for MIGO not working

Former Member
0 Kudos

Hi Gurs,

Substitution is not working for T.code: MIGO, Plant and Exchange gain or loss cost element. Cost center (xxxx) should substitute.

I have defined prerequisite as below

SYST-TCODE = 'MIGO' AND BSEG-WERKS = '1100' AND

BSEG-KSTAR = '6300010'

Substitution defined for cost center(xxx).

GL : 6300010 will not pick for all GRN documents but it pick for few GRN. When ever through GRN pick GL 6300010 it should pick cost center.

Regards,

Sai.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Substation defined as

SYST-TCODE = 'MIGO' AND BSEG-WERKS = '1100' AND

BSEG-KSTAR = '6300010'

working now.

Regards,

Sai

Answers (2)

Answers (2)

ajaycwa1981
Active Contributor

Hi Sai

Let me give you some background before i give the actual solution

Ideally, Just maintain the CC per Valuation Area in OKB9.. If the Plant is populated in your FI line item, system will read the default CC from OKB9

However, in some postings, Plant is not populated and hence system is unable to read the default CC assigned at Plant level from OKB9.. In such cases, system reads the CC assigned at Co Code level in OKB9 (i.e. OKB9 1st screen).. If you are not satisfied with this, you can write a substitution.. However, you will have to use userexit to read the Plant Code from Purchase order involved and then read the CC maintained in OKB9 at Plant level

To Summarize,

1. maintain the default CC in OKB9 at Plant level

2. Check if system Picks it up automatically for the Forex Gain/Loss

3. If not, ask your client if CC maintained at Co Code level will suffice

4. If not, write a substitution using user exit

Br, Ajay M

Former Member
0 Kudos

Hi Ajay,

I have to explain what i did for better understanding.

I have done OKB9 with valuation area working fine in MIGO. But error cost center not flowing at the time of foreign currency valuation FAGL_FC_VAL. So OKB9 changed acct assignment details defined (3) profit center wise now working fine for FAGL_FC_VAL  and incoming and outgoing payment time exchange gain and loss. Now  MIGO time for foreign ex gain and loss cost center not flowing.


I am trying to do substitution for MIGO.


Regards,

Sai.

ajaycwa1981
Active Contributor
0 Kudos

Hi

In that case, use substitution with user exit.. it will work

However, can u please explain why the Forex Gain/Loss posting during MIGO??

Br, Ajay M

Former Member
0 Kudos

Hi Ajay,

In PO client selected Exch.Rate fixed for few PO so due to Forex values changes going to Exchange Gain/Loss.

Can you please guide me how can i give logic to ABAP for user exit above requirement.

Regards,

Sai.

ajaycwa1981
Active Contributor
0 Kudos

Hi Babu

Prerequisite in Subst - GL account for fx gain/loss AND Company Code

Logic: If BSEG-HKONT = XXXX AND BSEG-KOSTL IS INITIAL, fetch the WERKS (Plant) from the Purchase Order (BSEG-EBELN / EBELP)

Once you read the Plant from PO and You have GL No, get the Cost Center from a Z Table wherein you will maintain the default CC per Plant for that GL Account

Br, Ajay M


Former Member
0 Kudos

Hi Ajay,

Thanks for guidance.

I am looking for solution with out development. Why substitution is not working with SAP standard process can you please explain.

Prerequisite: MIGO and Plant and GL(Exchange Gain/loss)

Substitution: BSEG- KOSTL.

Regards,

Sai.

ajaycwa1981
Active Contributor
0 Kudos

Hi Sai

The reason is that Plant Field is not populated many a times in the FI line item.. This is as designed by SAP

Br, Ajay M

former_member197737
Contributor
0 Kudos

Hi Babu P,

As an aid try to activate the Trace for substitution in order to see if all fields defined as pre-requisites are populated as you expected.

First activate the trace:

Go to your transaction (in this case MIRO) and execute it. Substitution trace should be triggered and enables you to see substitution data:

You can see data from BKPF, BSEG and SYST tables plus your "used data" (table %USE). This will help you to see if all fields are populated as you expected or not. It will also show you if substitution was successful or not.

I hope it's helpful.

Best regards!

Mgitur