Automatic account-assignment-okb9-does-not-work
-
Upload
anil-kumar-g -
Category
Business
-
view
345 -
download
4
Transcript of Automatic account-assignment-okb9-does-not-work
Generated by Jive on 2016-04-11Z1
SAP ERP Financials - Controlling: Automaticaccount assignment OKB9 does not work
Posted by RAHEEM BAKSH Apr 22, 2013
Applies to:All releases of SAP for Financial postings made from a various applications like SAP-Logistics, SAP-Financials,
etc for more information, visit the Enterprise Resource planning homepage
SummaryAutomatic assignment occurs during postings in external accounting (with in the FI, MM, or SD components) if
you did not enter a CO account assignment object (cost center, order, or project) for a cost accounting relevant
posting. This is always the case if the R/3 System automatically created the posting row in question.
This paper highlights an alternative approach where standard default account assignment (OKB9) based on
Valuation area or Profit Center is not sufficient and a default account assignment based on Valuation area and
Profit center is required.
Author: Raheem Baksh
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z2
Company: NovelERP Solution Pvt.Ltd.
Created On: Apr 2013
Standard SAP – Default Account Assignment (OKB9)
The standard SAP offers to specify a default account
assignment (Cost Center/Internal Order)1. Per company code2. Per Business area3. Per Profit Center4. Per Valuation area
In cases, where a default account assignment is to be specified below the company code, then “Account
Assignment Detail” field in OKB9 is used to specify a default CO object per Business area or Profit center or
Valuation area.
But system does not determined Default cost object from OKB9 for automatically generated lines that reference
the entire document and not individual items.
For More Information Read SAP Notes 105024, and 32654
Example: Key-
"DIF" (minor differences)
"UPF" (unplanned delivery costs)
"KDT" (tax exchange rate difference)
“OFF” (GTA)
"KDR" (exchange rate rounding)
Default Account Assignment in OKB9You can define automatic account assignments In OKB9 or defaults in the cost element masters data
record .The cost element master data record can determine these assignments per controlling area, and the
IMG per company code, business area, and/or valuation area.
Transaction Code - OKB9
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z3
Here it is mandatory to set Minimum One Combination to call Default Account Assigned Object1. Valuation Area is mandatory2. Business Area is mandatory3. Profit center is mandatory
Here we have set as “1”Valuation Area is mandatory
Here whenever Prerequisite met from your Transaction System will pickup default cost center as per Valuation
area.
Define Substitution OKC9In substitution, the SAP System checks whether particular input values satisfy one or more user-defined
conditions. If the condition is fulfilled, the values are automatically replaced by other values.
Standard settings
The following callup points are defined in the standard SAP System for Controlling:• 0001 - Document row : Used for all CO-relevant postings in external accounting as well as for manual
postings in CO.• 0010 – Order: Used for order background processing and irrelevant for account assignment checks.
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z4
• 0100 - Document header: Used for manual postings in CO, such as reposting costs or activityallocation.
Activities1. 1. Determine in which controlling area you want to substitute values.2. 2. Create a substitution.
Proceed as follows:
a) Choose the "New entries" function.
b) Enter the controlling area in which the substitution is to be executed.
c) Enter a callup point.
d) Save your entries
e) Choose "Environment -> Substitution".
f) Enter a name and a callup point for the substitution.
You can use an existing substitution as a reference.
g) Change the model data to meet your specifications, or copy them without changes.
h) Save your entries.
i) If you do not use a reference, proceed as follows:
j) Verify your entries by freeing the data for release.
k) Enter a description of the substitution.
l) To define the substitution steps, choose "Insert entry".
m) Choose the substitution fields in the dialog box that appears.
You can choose "Exit only" or database fields. "Exit only" ensures that all fields allowed for substitution are
available only in this USER-EXIT. Otherwise, you can replace one field only, using a value defined in the
USER-EXIT.
n) Transfer one or more of the displayed substitution fields.
o) Enter a description of the substitution step.
p) Enter one or more conditions under "Prerequisites".
Use the function "Fields for conditions" to do so. You may also maintain rules by choosing the corresponding
function.
q) Enter constant values for the fields to be substituted, or store a substitution exit.
r) Save the substitution steps.
s) Return to the initial screen.
t) Enter the substitution's name for your controlling area and set an activation level.
Activation level "1" ensures that the substitution is active in the correct controlling area.
u) Save the substitution.
Note on transport
To transport substitutions, a separate function is available in the IMG for "General Controlling"
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z5
Transaction Code - OKC9
Substitution-
Prerequisite – Company code =1000 and Controlling area =1000
If Prerequisite is met substitute by User exit UOKB0
Check Client specific user exit GCX2 Transaction code: GCX2
Here you need to check assigned program for the Application Area GBLS.
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z6
You need to some change in Program, First copy from Existing program RGGBS000.
Copy from Exiting program SE38Copy from Existing program and change in Z Program, Ask technical guy if you are not familiar on Program, for
copy or change new program you need to developer ID.
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z7
Change in Z Program as below-
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z8
Note : see below changes are based on organization structure here you need to determine which field you can
enter to get Cost center, if you are using Business area so OKB9 can be determine by Business area .
We have made OKB9 account assignment as per Valuation Area, but here system does not determine profit
center and Valuation Area for auto generated line item,
Our Business Place and Section Code is equal to Plant (Valuation Area)
*&----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*
*& Form UOKB9
*&---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*
* text
*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*
FORM UOKB9 .
if COBL-WERKS is INITIAL AND COBL-BWKEY is INITIAL.
COBL-WERKS = bseg-bupla.
COBL-BWKEY = bseg-bupla.
ENDIF.
DATA:
LD_KOSTL LIKE COBL-KOSTL,
LD_AUFNR LIKE COBL-AUFNR,
LD_PRCTR LIKE COBL-PRCTR,
LD_PAOBJNR LIKE COBL-PAOBJNR.
CHECK COBK-VRGNG = 'COIN'.
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z9
CHECK NOT COBL-HKONT IS INITIAL.
CALL FUNCTION 'RK_KSTAR_READ'
EXPORTING
DATUM = COBK-BUDAT
KOKRS = COBK-KOKRS
KSTAR = COBL-HKONT
IMPORTING
V_CSKB = CSKBV
EXCEPTIONS
KSTAR_NOT_FOUND = 1.
CHECK SY-SUBRC = 0.
CALL FUNCTION 'K_ACCOUNT_ASSIGNMENT_GET'
EXPORTING
BUKRS = COBL-BUKRS
WERKS = COBL-WERKS
BWKEY = COBL-BWKEY
GSBER = COBL-GSBER
KSTAR = COBL-HKONT
I_COBL = COBL
IMPORTING
KOSTL = LD_KOSTL
AUFNR = LD_AUFNR
PRCTR = LD_PRCTR
E_PAOBJNR = LD_PAOBJNR.
IF COBL-KOSTL IS INITIAL "*!
AND NOT LD_KOSTL IS INITIAL.
COBL-KOSTL = LD_KOSTL.
ENDIF.
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z10
IF COBL-AUFNR IS INITIAL "*!
AND NOT LD_AUFNR IS INITIAL.
COBL-AUFNR = LD_AUFNR.
ENDIF.
IF COBL-PRCTR IS INITIAL "*!
AND NOT LD_PRCTR IS INITIAL.
COBL-PRCTR = LD_PRCTR.
ENDIF.
IF COBL-PAOBJNR IS INITIAL "*!
AND NOT LD_PAOBJNR IS INITIAL.
COBL-PAOBJNR = LD_PAOBJNR.
ENDIF.
ENDFORM. "UOKB9
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z11
*&----------------------------------------------------------------------------*
Assign Z program in to Client specific user exit GCX2
Please also refer Next related post Automatic account assignment OKB9 ( Set Acc. Assignment "3 Profite
center is mandatory")17248 Views Tags: account, automatic, assignment, enterprise_resource_planning, sap_erp_financials, okb9
RAHEEM BAKSH in response to Akash Dhakulkar on page 11Oct 12, 2015 9:11 AM
Hi Akash,
if COBL-WERKS is INITIAL AND COBL-BWKEY is INITIAL.
COBL-WERKS = xxxxxx """""""""""" {identify the value on particular line item (where object is missing ) that
can be used to identify the Valuation area. In case nothing is matching with valuation area / Business area /
Profit center keep Valuation area in memory id from first line item and import that ID here
COBL-BWKEY = xxxxxxx """""""" Same as above
Akash DhakulkarOct 9, 2015 8:10 AM
Nice Blog Shared Bro.... Really Descriptive & Helpful
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z12
Akash DhakulkarOct 9, 2015 8:04 AM
Hi, Raheem Bhai
Thanks for the Documentation provided by you, My requirement is to update the Center Field & I have done
with every thing , But I have an issue in the code while substituting the values of BSEG in COBL..... the BSEG
is not Returning values of WERKS & BWKEY..... Its empty while cheking in debugging
Can u help with this??
*& Form UOKB9
*&---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*
* text
*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*
FORM UOKB9 .
if COBL-WERKS is INITIAL AND COBL-BWKEY is INITIAL.
COBL-WERKS = bseg-bupla. """""""""""" over here
COBL-BWKEY = bseg-bupla. """""""" over here
ENDIF.
RAHEEM BAKSHJul 1, 2014 1:43 PM
Thanks Pavan,
Its Raheem
Regards
Raheem
Pavan Kumar ArvapallyJul 1, 2014 1:14 PM
Hi Ramesh,
Nice document.....
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z13
Regards,
Pavan Kumar Arvapally
RAHEEM BAKSH in response to JS 55 on page 13Feb 7, 2014 6:07 AM
Thanks
JS 55Feb 6, 2014 6:25 AM
Good one.....
RAHEEM BAKSH in response to Lakshmi Sama on page 13Feb 4, 2014 1:37 PM
Thanks Lakshmi,
Lakshmi SamaFeb 4, 2014 1:31 PM
Hello Raheem,
Its a very good article. Thanks for sharing your knowledge and keep sharing.
Regards,
Lakshmi S
RAHEEM BAKSH in response to Sada Bandla on page 13Feb 4, 2014 10:36 AM
Thanks
Sada BandlaFeb 4, 2014 10:21 AM
Hi Raheem
Its very good and useful info...
RAHEEM BAKSH in response to Satendra Singh Sikarwar on page 13Oct 10, 2013 2:02 PM
Thanks Satendra
RAHEEM BAKSH in response to niran orkkatteri kariyadan on page 14Oct 10, 2013 2:02 PM
Thanks Niran
Satendra Singh Sikarwar
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z14
Oct 10, 2013 12:05 PM
Hello Raheem,
Very useful and informative article.
Thnx 4 ur fabulous article.
Regards,
Satendra
niran orkkatteri kariyadanOct 10, 2013 11:30 AM
Really Good work Yaar!!
.Many Thanks.
Best Regards,
Niran.OK.
RAHEEM BAKSH in response to Naresh Krishnamoorthy on page 14Sep 5, 2013 2:23 PM
Thanks Naresh,
Naresh KrishnamoorthySep 5, 2013 2:18 PM
Very Informative...Many Thanks.
Best Regards,
Naresh K.
RAHEEM BAKSH in response to sachin djadhav on page 14Sep 5, 2013 2:13 PM
Thanks sachin,
sachin djadhavJul 18, 2013 2:36 PM
Good Job Raheem
Sachin j
RAHEEM BAKSH in response to Sean Xiao on page 14Jul 18, 2013 1:21 PM
Thanks Sean Xiao
Regards
Raheem
SAP ERP Financials - Controlling: Automatic account assignment OKB9 does not work
Generated by Jive on 2016-04-11Z15
Sean XiaoJul 18, 2013 9:33 AM
detailed and systematic, great work!
RAHEEM BAKSH in response to Jason Shao on page 15Apr 29, 2013 10:23 AM
Dear Jason,
Thanks!!!!!
Jason ShaoApr 29, 2013 8:40 AM
this is very useful
RAHEEM BAKSH in response to Srinivasa Velupula on page 15Apr 27, 2013 10:36 AM
Dear Srinivasa,
Thanks!!!!!
Rate the article if u like it
Regards
Raheem
Srinivasa VelupulaApr 25, 2013 7:27 PM
Dear Raheem,
Very good article. Good work !!!!
Thanks,
Srini
RAHEEM BAKSH in response to Godavari SAP on page 15Apr 23, 2013 8:19 AM
Thanks Dear ...........
Godavari SAPApr 23, 2013 7:22 AM
Hello Raheem,
Good article.
Thanks