cancel
Showing results for 
Search instead for 
Did you mean: 

Substitution rule for Business area in Accounting

appasaheb_nagargoje
Active Participant
0 Kudos

Hello Experts,

We have mutiple plant for single company code.

e.g.

Comp. code :1111

plants code :  1100

plants code :  1200

plants code :  1300

plants code :  1400

plants code :  1500

plants code :  1600

plants code :  1700

Business area:

plants code :  1100 =  Z100

plants code :  1200=  Z200

plants code :  1300=  Z300

plants code :  1400=  Z400

plants code :  1500=  Z500

plants code :  1600=  Z600

plants code :  1700=  Z700

we have written substitute rule in GGB1 Financial accounting - Line ites as follows

Step1:

Company Code = '1111' AND Plant = '1100' AND

Transaction code = 'MIGO' OR Transaction code = 'J1IEX' OR

Transaction Code = 'MIRO' OR Transaction Code = 'ZMIRO' OR

Transaction Code = 'MR8M' OR Transaction Code = 'FB08'

then Bussiness area as constant valuse = Z100

Step2:

Company Code = '1111' AND Plant = '1200' AND

Transaction code = 'MIGO' OR Transaction code = 'J1IEX' OR

Transaction Code = 'MIRO' OR Transaction Code = 'ZMIRO' OR

Transaction Code = 'MR8M' OR Transaction Code = 'FB08'

then Bussiness area as constant valuse = Z200

Step3:

Company Code = '1111' AND Plant = '1300' AND

Transaction code = 'MIGO' OR Transaction code = 'J1IEX' OR

Transaction Code = 'MIRO' OR Transaction Code = 'ZMIRO' OR

Transaction Code = 'MR8M' OR Transaction Code = 'FB08'

then Bussiness area as constant valuse = Z300

for all plants upto plant 1700

When we are trying to post MIRO for plant 1100 business area is coming of plant 1700. i.e. Z700 as by default.

Please help how we can achieve it

Bussiness should be Z100 for plant 1100.

Bussiness should be Z200 for plant 1200.

Bussiness should be Z300 for plant 1300.

Bussiness should be Z400 for plant 1400.

Bussiness should be Z500 for plant 1500.

Bussiness should be Z600 for plant 1600.

Bussiness should be Z700 for plant 1700.

Best regards,

Appasaheb

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member198650
Active Contributor
0 Kudos

Hi,

Which line item it is picking wrong BA in MIRO?

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

Its picking wrong for all line items.

Regards,

Appasaheb

former_member198650
Active Contributor
0 Kudos

Hi,

Check the PO which plant does it have? So the GR/IR clearing account should have the BA based on the plant. For vendor line item it picks from the GR/IR clearing account, if you have defined document splitting and selected inheritance check box.

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

PO is belong to plant 1100, document spliting is active.

In MIGO GR/IR account BA is updated and aslo for Cenvat clearing account is updated for BA.

the same account is updating BA in MIRO but VAT account is not getting update.

Regards,

Appasaheb

former_member198650
Active Contributor
0 Kudos

Have you checked the VAT line item in GL view. It will update the BA in this view.

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

For VAT g/l it is not updating.

We need to update for VAT.

Regards,

Appasaheb

former_member198650
Active Contributor
0 Kudos

Hi,

If you want to update BA for VAT GL. For that you need to configure business place. After configure it then create a substitution for business area based on this business place. After done this, when you maintain the business place in MIRO header then system will automatically update the business place & business area in the VAT GL. There is a one more advantage using this business place, you can check the details based on business place in the report S_ALR_87012357. For configuration of business place, go through the below link:

Activation of Business Place - Local Taxation - SAP Library

How to determine business place for FI document | SCN

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

I have activate bus place and assigned to plant then created substitute for same I.e.

Tcode= miro and bus place = z100

Then bus area = z100

For all steps.

But its not triggering

Regards,

Appasaheb

former_member198650
Active Contributor
0 Kudos

Hi,

1. Have you assigned the substitution to the co.code in OBBH?

2. Have you maintained business place in the MIRO header?

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

Assigned in obbh and also selected bus place at header and checked .

Only last step is triggering.

What would be the reason? Why only last step get triggered.

Regards,

Appasaheb

former_member198650
Active Contributor
0 Kudos

Hi,

Share screen shot of GGB1?

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos
iklovski
Active Contributor
0 Kudos

...and where are the brackets?

iklovski
Active Contributor
0 Kudos

...also 'ZMIRO' will not be in BKPF table. If you want to base your logic on transaction code introduced by the user, you should use sy-tcode and not bkpf-tcode.

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

Bracket removed due not triggering.

Now update syst-tcode and tested but same issue.

Only last step triggered.

iklovski
Active Contributor
0 Kudos

Well, I cannot add much... You can, of course, remove the brackets, but that makes your rule useless, as following the logic it will be always triggered when you launch MIRO. And, through trace, you should be able to see why the rule is not triggered, when you put the brackets. Most probably, your BUPLA is empty, but could be something else.

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

I again applied brackets and activate trace and launch miro but not getting any trace or breakpoint.

Same result as last step triggered.

Buspla is not empty.

appasaheb_nagargoje
Active Participant
0 Kudos
former_member198650
Active Contributor
0 Kudos

Share screen shot of OBBH.

appasaheb_nagargoje
Active Participant
0 Kudos
former_member198650
Active Contributor
0 Kudos

Hi,

Just input business place in prerequisite and remaining all things remove it.

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

Removed all others and kept only Bus Place

and tryed not triggering any BA.

former_member198650
Active Contributor
0 Kudos

Hi,

It substitutes after save the document. So save it and check the accounting document.

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos


Hi,

Document posted BA not updated.

Regards,

Appasaheb

iklovski
Active Contributor
0 Kudos

There is no plant on VAT line, so how do you expect your rule to be triggered?

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

For VAT line Plant is not not updating,

how we can update Plant for VAT line???


former_member198650
Active Contributor
0 Kudos

Hi,

Does the business place updated in the vendor line item?

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

Bus Place is updated for all line items.

Regards,

Appasaheb

former_member198650
Active Contributor
0 Kudos

Then definitely business area should also updated. Check the field status of the VAT GL account for business area.

appasaheb_nagargoje
Active Participant
0 Kudos

hi,

please check SS.

No BA updated.

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

I have achieved by using below logic.

( BKPF-TCODE = 'MIRO' OR BKPF-TCODE = 'ZMIRO' OR

BKPF-TCODE = 'MR8M' OR

BKPF-TCODE = 'VF01' OR BKPF-TCODE = 'VF02' ) AND

BSEG-BUPLA = 'S201'

Default:

Business Area          Constant value    Z201

Substitute Name ZSMA was already created in system (for MIGO and J1IEX) and there were existing 9 Steps and now i have created 7 more steps for

( BKPF-TCODE = 'MIRO' OR BKPF-TCODE = 'ZMIRO' OR

BKPF-TCODE = 'MR8M' OR

BKPF-TCODE = 'VF01' OR BKPF-TCODE = 'VF02' ) AND

BSEG-BUPLA = 'S201'

Default:

Business Area          Constant value    Z201

its working Fine in development system as per our requirement.

now we have transported in Production system.

but in production system it is not working.

what will be the possibilities??

Regards,

Appasaheb

former_member198650
Active Contributor
0 Kudos

Hi,

1.Have you moved the business place configuration in production?

2. Check the substitution in production in GGB1 for correctly transported or not

3. Check the assignment to the co.code in OBBH.

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

Yes,

business place configuration is transported in Production system.

1.  Business place configuration and  assignment to the co.code was in seperate TR.

2. GGB1 substitute was in seperate TR.

first TR Imported: GGB1 substitute was in seperate TR. Import

Second TR Imported: Business place configuration and  assignment to the co.code was in seperate TR.

Assignment to the co.code in OBBH. is available in Production.

Regards,

Appasaheb

former_member198650
Active Contributor
0 Kudos

Hi Appasaheb,

For MM/SD transactions you do not need to define any substitution. You have to assign for each plant to its respective business area in OMJ7.

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos

Hi Mukthar,

Thanks for suggestion,

We have already assigned in OMJ7 for all plant and div.

we have the common div for all plants.

Best Regards,

Appasaheb


former_member198650
Active Contributor
0 Kudos

Hi,

In that case do not assign any division combination, just enter plant and assign BA for it.

Regards,

Mukthar

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

we have checked it as per your suggestion and try but for VAT G/L account its not picking the correct Bus. Area.

Regards,

Appasaheb

former_member198650
Active Contributor
0 Kudos

Hi,

Usually the tax account will not get BA if you check the document in entry view, if you check in GL view then it will show the BA. However, if you want BA for tax GLs in entry view, then you have to create business place for each plant and assign this business place to plant. After that define substitution for business area based on business place. So when you input business place in the MIRO for the vendor, then system will default the business area based on this to VAT GL.

Regards,

Mukthar

former_member184580
Contributor
0 Kudos

Hi Appasaheb,

Since you have multiple plants and business areas to be substituted, i would suggest user exit. Please check with ABAPer they will help you in developing User Exit with your logic.

Regards,

Prasad

former_member229024
Contributor
0 Kudos

Hi,

The system may be picking up the success value of last substitution step with result Z700 due to precedence of logical operator AND than OR. Put the transaction code values in a set and use this set in validation.

Example: Company code ='1100' AND Plant = '1100' AND Transaction code in 'SET NAME'.

then business area = 'Z100'

hope this works,

Cheers,

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

In our substitution its picking last steps only.

we have deleted last step and tryed to post MIRO then it picking Bus. Area Z600.

any valuable guideline.

Best Regards,

Appasaheb

iklovski
Active Contributor
0 Kudos

Hi,

This statement should be put in brackets, like this:

AND (Transaction code = 'MIGO' OR Transaction code = 'J1IEX' OR

Transaction Code = 'MIRO' OR Transaction Code = 'ZMIRO' OR

Transaction Code = 'MR8M' OR Transaction Code = 'FB08')

Otherwise, by Boolean rule any of these transactions trigger the substitution.

Regards,


Eli

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

I tried as per you suggested but no success...

then substitute is not triggering.

Regards,

Appasaheb

iklovski
Active Contributor
0 Kudos

Set a trace on substitution and see why condition is not met. Or why your last step overwrites the first one. I hope, you put the brackets on all 7 steps; otherwise, it won't work.

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

I have put brackets for 7 steps but now it is not triggering anyone of it.

It excluding all steps.

Regards.

Appasaheb

iklovski
Active Contributor
0 Kudos

As I mentioned, set a trace and see why your condition is not met.

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

How to set trace ??

Please tell in detailed

Regards

Appasaheb

iklovski
Active Contributor
0 Kudos

Menu - Extras - Activate Total Trace

appasaheb_nagargoje
Active Participant
0 Kudos

Hi

Actived and checked miro no changes.

Still triggering last step only.

Regard

Appa

iklovski
Active Contributor
0 Kudos

Yes, great. But you should have seen in the trace all the steps which were called and see why step 1, for example, is not triggered.

appasaheb_nagargoje
Active Participant
0 Kudos

Hi,

Activated Trace total.  trying MIRO

how to check trace while trying MIRO????

waiting valuable feedback

Regards,

Appasaheb