cancel
Showing results for 
Search instead for 
Did you mean: 

Check budget on particular cost center in ABAP

Former Member
0 Kudos

Hi all,

Is there any function/BAPI/BADI to check budget on particular cost element in any cost center? The requiement is to check budget in one of the customized ABAP program.

Regards

N|S

Accepted Solutions (1)

Accepted Solutions (1)

iklovski
Active Contributor
0 Kudos

Hi,

You can use BAPI_COSTACTPLN_READPRIMCOST. I assume, that you are referring to planning and not to budget, as budget in CO is not put on cost element.

Regards,

Eli

Former Member
0 Kudos

We have a cost element group, while budget is assigned to Cost Center at cost element group level. I checked out the ABAP code how it checks and prompts unavailability of budget to particular Group through debugging, but unable to find a simplified routine. There must be some function, which simply checks budget, in case if the FI document is directly being posted through ABAP program.

Thanks for your commetns.

BR

iklovski
Active Contributor
0 Kudos

Hi,

The planning (it's not right to use word 'budget' as it represents another functionality in CO) is never put on cost element group. It's always on the intersection between cost centre and cost element. Additionally, availability is not checked on planning.

So, it's one of the two: either you are talking about FM functionality or you have developed in your client special functions which allow checking availability on planning. Therefore, please specify your case...

Regards,

Eli

Former Member
0 Kudos

Thanks for your reply Eli.

Actually, the requirement is to simply have a function to check if budget is available to particular cost object (say cost center in our case). We have Expense GL Account 900101001, which is configured as cost element as well and we use to post through cost center 800101001. The cost center is being derived through OKB9. Now, the requirement is whenever user post aforementioned expense, the availability of budget should be checked.

This use to happen in any standard transaction code, but as we have developed our own TCode for particular functionality, we need to have budget check function.

Further, FM is also activated, so I think i', using the right word Budget, as Fund center is also created similar to the name of cost center.

Hope the requirements are clear

Thanks!

BR

Former Member
0 Kudos

Hi, you can do it if assign Cost Center to Fund Center by default and check budget in FM. Or you can assign Cost Center to statistical IO, and check budget via IO. Of course it's better to do via FM.

iklovski
Active Contributor
0 Kudos

Hi,

OK, if you are talking about FM, then your objects should not be cost centre and cost element. The objects of FM are different: Fund centre, commitment item, fund, etc.

Now, if you have FM and AVC activated, then whenever you do a posting in FI, the FM address is derived (either via master data ot via derivation strategy) and the budget is checked automatically - this is standard and basic functionality of FM. So, I don't understand your point... Can you clarify what your goal is?

Regards,

Eli

Former Member
0 Kudos

Hello Eli,

Thanks for your reply.

Well, here's the scenario:

1. The user wants to book expense in Cash Journal (FBCJ) for scenario A

2. Payment through Cash Journal for Scenario A is executed through customized TCode

3. Cash Journal provides BAPI that Saves FI document, rather posting it

4. With the Saving functionality, the drawback is it doesn't validate CO FM checks

5. Therefore, for budget checking purpose, another BAPI is required which can validate and prompt error when particular expense is charged to some cost center.

6. Through configuration, cost center derives its Fund Center and Fund which check availability of budget in that expense.

I hope, this clears the objective for which I'm in search of BAPI / Function, which can facilitate to achieve this goal.

BR

iklovski
Active Contributor
0 Kudos

Hi,

I see... Even for FBCJ, AVC should issue warning messages. If it does not check notes 868930 and 820209.

If you insist on a BAPI, you can simply try BAPI_ACC_DOCUMENT_CHECK - if it succeeds then there is enough budget.

Regards,

Eli

Former Member
0 Kudos

Thanks Eli for taking interest.

Actually, when we post FI document in Cash Journal, it checks and give error message that Payment Budget Exceeded. But when it comes to Saving CJ document, it doesn't perform any check.

I checked BAPI the requirement of which is Accounting Document Nr. However, no FI document is posted when entry is SAVE. As we are on ECC 6.0 EHP4, SAP Note 820209 doesn't support, while I don't think SAP Note 868930 is for this purpose. As CJ prompts error when POST function is performed.

Any alternate?

Thanks

iklovski
Active Contributor
0 Kudos

Hi,

With this BAPI you don't need to provide document number (the prupose of this BAPI is to check availability of posting FI document, therefore the number is obviously unknown). Please, read the documentation of the BAPI for further info (via SE37 -> Display -> Funciton Module Documentation).

Regards,

Eli

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello All,

I am working on the same issue,

My client requirement is to check plan budget of cost center on posting through any t-code.

If Actual budget exceed to 90% of Planned cost , on every posting of that cost center there should be a warning message.

Or Else if variance % (as displayed in s_alr_87013611) exceed 90 % it should provide message.

Kindly suggest point to code.

Also provide from which table i can check planned and actual cost(Till date consumption) to apply logic.

Thanks in advance.