Regards: 

All SAP releases for financial postings generated from a variety of programmes, such as SAP-Logistics, SAP-Financials, etc. Visit the webpage for enterprise resource planning for more details.

Summary

If a CO account assignment object (cost centre, order, or project) was not entered for a cost accounting relevant posting, automatic assignment will take place during postings in external accounting (inside the FI, MM, or SD components). If the R/3 System automatically generated the questioned posting row, then this is always the case.

When the traditional default account assignment (OKB9) based on valuation area or profit centre is insufficient and a default account assignment based on valuation area and profit centre is necessary, this paper offers a different technique.

Author:             Raheem Baksh

Company:        NovelERP Solution Pvt.Ltd.

Created On:      Apr 2013

Default Account Assignment in Standard SAP (OKB9)

The default SAP option (Cost Center/Internal Order) allows users to set a default account assignment.

  1. Based on company code
  2. Per business district
  3. Center for Per Profit
  4. By valuation region

The “Account Assignment Detail” feature in OKB9 is used to indicate a default CO object per Business area, Profit centre, or Valuation area in situations where a default account assignment needs to be specified below the company code.

However, for automatically created lines that relate to the entire page and not specific items, the system does not determine the Default cost object from OKB9.

Take a look at SAP Notes 105024 and 32654 for further details.

Instance: Key

“DIF” (small differences) (minor differences)

“UPF” (unplanned delivery charges) (unplanned delivery costs)

“KDT” (tax exchange rate difference) (tax exchange rate difference)

“OFF” (GTA) (GTA)

“KDR” (exchange rate rounding) (exchange rate rounding)

In OKB9, the default account assignment

Automatic account assignments can be set up. The cost element masters data record in OKB9 or defaults. These assignments can be made according to the controlling area and the IMG according to the company code, business area, and/or valuation area, according to the cost element master data record.

Transaction Code – OKB9

Setting Minimum One Combination to Call is Required Here Assigned Default Account Object

  1. Valuation Area must be used.
  2. Business Area must be used.
  3. Profit centre must exist.

Here, we’ve set the value to “1” (Mandatory Value Area).

Here, your transaction system will pick up the default cost centre according to the valuation area whenever the prerequisite is met.

Substitution Definition OKC9

Instead, the SAP System determines if certain input values meet one or more user-defined requirements. The values are automatically changed to other values if the condition is met.

Normal settings

The default SAP System for Controlling defines the following callup points:

  • For all manual postings in CO and external accounting that are related to CO, document row 0001 is used.
  • 0010 – Order: Irrelevant for account assignment checks and used for order background processing.
  • 0100 – Document header: Used for manually uploading data in CO, such as activity allocation or reposting costs.

Activities

1. Choose the controlling region where you wish to replace the data.
2. Construct a replacement.

Continue as follows:

a) Select “New entries” from the menu.

b) Enter the area that will be used to execute the substitution.

c) Make a callup point entry.

d) Save your submissions 

e)  Select “Environment -> Substitution” 

f) Give the substitute a name and a callup point.

An existing substitute can serve as a guide.

g) Modify the model data to match your needs, or simply copy it as is.

h) Save your submissions. 

 i) If you don’t cite anything, do this instead:

j) By releasing the data for release, you can confirm your entries

k) Describe the substitution in detail.

l) Click “Insert entry” to specify the substitution steps.

m) From the dialogue box that displays, select the replacement fields.

Either “Exit just” or database fields are options. “Exit only” makes sure that only this USER-EXIT has access to all fields that can be substituted. If not, you can only replace one field with a value from the USER-EXIT.

n) Transfer one or more of the substitution fields that are visible.

o) Describe the substitution step here.

p) Under “Prerequisites,” enter one or more requirements.

To do this, use the “Fields for conditions” function. You can also keep rules up to date by selecting the appropriate function.

q) Type constant values into the fields you want to replace them with, or save a substitution exit.

r) Save the replacement steps.

s) Go back to the home page.

t) Set an activation level for your controlling area and provide the name of the replacement.

The substitution is guaranteed to be active in the appropriate controlling region by activation level “1”.

u) Save the substitution.

Note on transportation

A second “General Controlling” function is offered in the IMG to transfer substitutes.

Transaction Code – OKC9

Substitution-

Company code = 1000 and controlling area = 1000 are prerequisites.

If the prerequisite is met, use User exit UOKB0 instead.

GCX2 Client Specific User Exit

Code for transactions: GCX2

Check the designated programme for the GBLS Application Area here.

You must make a few changes to the programme. Start by copying RGGBS000 from the existing application.

Copy of SE38’s exiting programme

Change in Z Program after Copying from Existing Program, Ask a technical person if you don’t know anything about the software; you need the developer ID to duplicate or modify a new application.

Z Program Change as Per Below-

Note: If you are using Business Area, OKB9 can be determined by Business Area. Changes below are depending on organisational structure; you must decide which field you can enter to acquire Cost centre.

Although we set up OKB9 to assign accounts based on valuation areas, the system does not identify profit centres or valuation areas for automatically created line items.

Our Business’s Section Code and Place are both equal to Plant (Valuation Area)

*&———————————————————————————————————————————————————————————-*
*&      Form  UOKB9
*&———————————————————————————————————————————————————————————*
*       text
*———————————————————————————————————————————————————————————–*
FORM UOKB9 .

if COBL-WERKS AND COBL-BWKEY are both initial.
Bseg-bupla = COBL-WERKS
Bseg-bupla = COBL-BWKEY

ENDIF.

LD KOSTL LIKE COBL-KOSTL, LD AUFNR LIKE COBL-AUFNR, LD PRCTR LIKE COBL-PRCTR, and LD PAOBJNR LIKE COBL-PAOBJNR ARE THE DATA.

VERIFY THAT COBK-VRGNG = “COIN”

Make sure COBL-HKONT is not the first.

CALLS ‘RK KSTAR READ’ FUNCTION
EXPORTING
DATUM is the same as COBK-BUDAT.
KOKRS equals COBK-KOKRS
KSTAR is the same as COBL-HKONT.
IMPORTING
CSKB = CSKBV in V CSKB
EXCEPTIONS
KSTAR NOT FOUND equals one
SY-SUBRC = CHECK = 0.

USE THE ‘K ACCOUNT ASSIGNMENT GET’ FUNCTION.
EXPORTING
COBL-BUKRS = BUKRS
COBL-WERKS = WERKS
COBL-BWKEY = BWKEY
COBL-GSBER = GSBER
KSTAR is equal to COBL-HKONT
COBL = I COBL
IMPORTING
Since KOSTL = LD KOSTL
Input: AUFNR = LD AUFNR
Input: PRCTR = LD PRCTR
LD PAOBJNR equals E PAOBJNR.

IF  COBLKOSTL IS INITIAL              “*!
AND NOT LD_KOSTL IS INITIAL.
COBL
KOSTL LD_KOSTL.
ENDIF.

IF  COBLAUFNR IS INITIAL              “*!
AND NOT LD_AUFNR IS INITIAL.
COBL
AUFNR LD_AUFNR.
ENDIF.

IF  COBLPRCTR IS INITIAL              “*!
AND NOT LD_PRCTR IS INITIAL.
COBL
PRCTR LD_PRCTR.
ENDIF.

IF  COBLPAOBJNR IS INITIAL            “*!
AND NOT LD_PAOBJNR IS INITIAL.
COBL
PAOBJNR LD_PAOBJNR.
ENDIF.

ENDFORM.                                                    “UOKB9

*&—————————————————————————-*

Assign Z program in to Client specific user exit GCX2

Also, please see Automatic account assignment OKB9 (Set Acc. Assignment “3 Profite centre is mandatory”) is the next linked post.