17
Automatic account assignment OKB9 does not work Posted by RAHEEM BAKSH in SAP ERP Financials - Controlling on Apr 22, 2013 1:04:49 PM inShare 2 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 Summary Automatic 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 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 code 2. Per Business area

Automatic Account Assignment OKB9 Does Not Work1

Embed Size (px)

DESCRIPTION

Automatic Account Assignment OKB9 Does Not Work1

Citation preview

Automatic account assignment OKB9 does not workPosted byRAHEEM BAKSHinSAP ERP Financials - Controllingon Apr 22, 2013 1:04:49 PMinShare2

Applies to:All releases of SAP for Financial postings made from a various applications like SAP-Logistics, SAP-Financials, etc for more information, visit theEnterprise Resource planning homepageSummaryAutomatic 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 BakshCompany: 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 areaIn 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 Notes105024, and32654Example: 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

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 1Valuation Area is mandatory

Here whenever Prerequisite met from your Transaction System will pickup default cost center as per Valuation area.

Define Substitution OKC9Insubstitution, 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 settingsThe 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. 0100 - Document header: Used for manual postings in CO, such as reposting costs or activity allocation.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 acallup point.d) Save your entriese) 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 transportTotransportsubstitutions, a separate function is available in the IMG for "General Controlling"

Transaction Code - OKC9

Substitution-

Prerequisite Company code =1000 and Controlling area =1000If Prerequisite is met substitute by User exitUOKB0

Check Client specific user exit GCX2

Transaction code: GCX2

Here you need to check assigned program for the Application AreaGBLS.

You need to some change in Program, First copy from Existing programRGGBS000.

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.

Change in Z Program as below-

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*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*FORMUOKB9.

ifCOBL-WERKSis INITIAL ANDCOBL-BWKEYis INITIAL.COBL-WERKS=bseg-bupla.COBL-BWKEY=bseg-bupla.ENDIF.

DATA:LD_KOSTLLIKECOBL-KOSTL,LD_AUFNRLIKECOBL-AUFNR,LD_PRCTRLIKECOBL-PRCTR,LD_PAOBJNRLIKECOBL-PAOBJNR.

CHECKCOBK-VRGNG='COIN'.

CHECK NOTCOBL-HKONTIS INITIAL.

CALL FUNCTION'RK_KSTAR_READ'EXPORTINGDATUM=COBK-BUDATKOKRS=COBK-KOKRSKSTAR=COBL-HKONTIMPORTINGV_CSKB=CSKBVEXCEPTIONSKSTAR_NOT_FOUND=1.CHECKSY-SUBRC=0.

CALL FUNCTION'K_ACCOUNT_ASSIGNMENT_GET'EXPORTINGBUKRS=COBL-BUKRSWERKS=COBL-WERKSBWKEY=COBL-BWKEYGSBER=COBL-GSBERKSTAR=COBL-HKONTI_COBL=COBLIMPORTINGKOSTL=LD_KOSTLAUFNR=LD_AUFNRPRCTR=LD_PRCTRE_PAOBJNR=LD_PAOBJNR.

IFCOBL-KOSTLIS INITIAL"*!AND NOTLD_KOSTLIS INITIAL.COBL-KOSTL=LD_KOSTL.ENDIF.

IFCOBL-AUFNRIS INITIAL"*!AND NOTLD_AUFNRIS INITIAL.COBL-AUFNR=LD_AUFNR.ENDIF.

IFCOBL-PRCTRIS INITIAL"*!AND NOTLD_PRCTRIS INITIAL.COBL-PRCTR=LD_PRCTR.ENDIF.

IFCOBL-PAOBJNRIS INITIAL"*!AND NOTLD_PAOBJNRIS INITIAL.COBL-PAOBJNR=LD_PAOBJNR.ENDIF.

ENDFORM."UOKB9*&----------------------------------------------------------------------------*Assign Z program in to Client specific user exit GCX2

Please also refer Next related postAutomatic account assignment OKB9 ( Set Acc. Assignment "3 Profite center is mandatory")11129ViewsProducts:sap_erp_financialsTopics:enterprise_resource_planningTags:account,automatic,assignment,okb9Average User Rating

(16 ratings)

inShare2Comments

24Comments

Godavari SAPApr 23, 2013 7:22 AMHello Raheem,

Good article.

Thanks

Like(1)

RAHEEM BAKSHApr 23, 2013 8:19 AM(in response to Godavari SAP)

Thanks Dear ...........

Like(0)

Srinivasa VelupulaApr 25, 2013 7:27 PMDear Raheem,

Very good article. Good work !!!!

Thanks,

Srini

Like(1)

RAHEEM BAKSHApr 27, 2013 10:36 AM(in response to Srinivasa Velupula)

Dear Srinivasa,

Thanks!!!!!

Rate the article if u like it

Regards

Raheem

Like(0)

Jason ShaoApr 29, 2013 8:40 AMthis is very useful

Like(1)

RAHEEM BAKSHApr 29, 2013 10:23 AM(in response to Jason Shao)

Dear Jason,

Thanks!!!!!

Like(0)

Sean XiaoJul 18, 2013 9:33 AMdetailed and systematic, great work!

Like(1)

RAHEEM BAKSHJul 18, 2013 1:21 PM(in response to Sean Xiao)

ThanksSean Xiao

Regards

Raheem

Like(0)

sachin djadhavJul 18, 2013 2:36 PMGood Job Raheem

Sachin j

Like(1)

RAHEEM BAKSHSep 5, 2013 2:13 PM(in response to sachin djadhav)

Thanks sachin,

Like(0)

Naresh KrishnamoorthySep 5, 2013 2:18 PMVery Informative...Many Thanks.

Best Regards,

Naresh K.

Like(1)

RAHEEM BAKSHSep 5, 2013 2:23 PM(in response to Naresh Krishnamoorthy)

Thanks Naresh,

Like(0)

niran orkkatteri kariyadanOct 10, 2013 11:30 AMReally Good work Yaar!!

.Many Thanks.

Best Regards,

Niran.OK.

Like(1)

RAHEEM BAKSHOct 10, 2013 2:02 PM(in response to niran orkkatteri kariyadan)

Thanks Niran

Like(0)

Satendra Singh SikarwarOct 10, 2013 12:05 PMHello Raheem,

Very useful and informative article.Thnx 4 ur fabulous article.

Regards,

Satendra

Like(1)

RAHEEM BAKSHOct 10, 2013 2:02 PM(in response to Satendra Singh Sikarwar)

ThanksSatendraLike(0)

Sada BandlaFeb 4, 2014 10:21 AMHi Raheem

Its very good and useful info...Like(1)

RAHEEM BAKSHFeb 4, 2014 10:36 AM(in response to Sada Bandla)

Thanks

Like(0)

Lakshmi SamaFeb 4, 2014 1:31 PMHello Raheem,

Its a very good article. Thanks for sharing your knowledge and keep sharing.

Regards,

Lakshmi S

Like(1)

RAHEEM BAKSHFeb 4, 2014 1:37 PM(in response to Lakshmi Sama)

Thanks Lakshmi,

Like(0)

JS 55Feb 6, 2014 6:25 AMGood one.....

Like(1)

RAHEEM BAKSHFeb 7, 2014 6:07 AM(in response to JS 55)

Thanks

Like(0)

Pavan Kumar ArvapallyJul 1, 2014 1:14 PMHi Ramesh,

Nice document.....

Regards,

Pavan Kumar Arvapally

Like(1)

RAHEEM BAKSHJul 1, 2014 1:43 PMThanks Pavan,

Its Raheem

Regards

Raheem

Automatic account assignment OKB9 ( Set Acc. Assignment "3 Profite center is mandatory")Posted byRAHEEM BAKSHinSAP ERP Financials - Controllingon Feb 4, 2014 8:11:11 AMinShare1Hi All,

I am writing here My Next blog which is related to Automatic account Assignment OKB9 does not work. In My previous Blog there was Mention that in OKB9 set Acc assignment 1 As valuation area is mandatory, Now here in case if you have set Acc assignment 3 Profit Center is mandatory.

All steps will remain same as mention in Previous blog Please refer the LinkAutomatic account assignment OKB9 does not work.

Now question is here, if you have set Account assignment In OKB9 "3 Profit Center is mandatory"

The System not able to get Cost center from OKB9 for Auto-generated line item or for Eg. You have Created COGS Account as cost element and assigned it on GBB-VAX.

Make Some Addition changes in Program "ZRGGBS000_1"IF COBL-PRCTRISINITIAL. COBL-PRCTR=COBL-PPRCTR.

and

I_PRCTR= COBL-PRCTR

2421ViewsTags:account,automatic,assignment,okb9Average User Rating

(5 ratings)

inShare1Comments

10Comments

Sada BandlaFeb 4, 2014 3:40 PMThanks for sharing Knowledge mr. Raheem ...Like(1)

RAHEEM BAKSHFeb 5, 2014 6:16 AM(in response to Sada Bandla)

Thanks

Like(0)

Muthyam GFeb 5, 2014 6:11 PMHello Raheem,

Thanks for the above 2 Blogs and it helps alot but i need your advice on OKB9 as Business Area as mandatory

As attached 2 snaps we have designed our system, but we are not getting what kind of test can be done

Please guide me ?

Like(1)

RAHEEM BAKSHFeb 6, 2014 6:46 AM(in response to Muthyam G)

Hi Muttu G,

We have mention here for order combination in this program Just do one thing, add code as below and check-

-------------------------------------------------------------------------

IF COBL-GSBERISINITIAL. COBL-GSBER=COBL-GSBER.--------------------------------------------------------------------------

I am sure you will get answer.In case not resolved after mention above code , Please share steps what you have done.RegardsRaheem

Like(0)

JS 55Feb 6, 2014 6:26 AMThanks for sharing doc...........Like(1)

RAHEEM BAKSHFeb 6, 2014 6:35 AM(in response to JS 55)

Thanks Dear

Like(0)

Rajneesh SaxenaFeb 18, 2014 1:05 PMRaheem Bhai

Shukriya for sharing.

Rajneesh

Like(1)

RAHEEM BAKSHFeb 18, 2014 1:10 PM(in response to Rajneesh Saxena)

Thanx Rajneesh Bhai!

Like(0)

Satendra Singh SikarwarFeb 18, 2014 1:14 PMHello Mr. Raheem,

Thnx for ur blog.Keep sharing such blogs.

Regds,

Satendra

Like(1)

RAHEEM BAKSHFeb 19, 2014 5:13 AM(in response to Satendra Singh Sikarwar)

Thanks Satendra

Regards

Raheem