Expandable Table Need to Sum Different Cost Centers
I am trying to complete a mileage reimbursement form. I think I have a good design (?) but I am missing a critical efficiency within the form. I want the form to be able to calculate the cost centers across the expandable table within the subform. I have a dropdown that has different cost centers. How would I be able to sum like cost centers within the expandable table? Can I populate another table with just the totals for a particular cost center by calculation? I would need this for all cost centers This would help out the accounting department as the mulitple cost centers would be added.
My first page is expandable to accomodate multiple rows and has a page total and a grand total that floats if more rows are needed. My second page is more or less just for accounting I have a seperate table that right now is manually completed. The clerk has to printout the form and then manually add each cost center and then add it to the table on the second page.
I have tried to just use a numeric field on the second page attempting to get the calculations based of the test entry in the cost center of Edit. It only places the data of the first entry and does not cycle through and capture all cost centers in the expandable table that are Edit. Any help in the code and ideas on how to present the total in a new table would be greatly appreciated.I am a beginner at this and am trying to learn and complete this on my own but I am not sure what to do. Attached is my form.
http://aaa9.org/Updated%20Employee%20Mileage%20Expense%20Form.pdf
The following JavaScript will loop through the table and total up according to what is selected in the dropdown list. Put it on the Calculate event of a numeric field.
You'll need a separate field for each category and you'll need to update the rawValue test to the appropriate number for each field (I started with 2 because your first entry, which is 1 is blank). Depending where you put the fields you'll need to update the path to "Table1".
var nTotal = 0;
for (var i=0; i < Table1._Item.count; i++){
if (xfa.resolveNode("Table1.Item[" + i + "].DropDownList2").rawValue == 2){
nTotal ++;
this.rawValue = nTotal;
Couple of tips:
You've got an extra subform on your "page 3", you've wrapped one subform with another which isn't needed.
It's important to name your subforms, especially when scripting.
Similar Messages
-
Different Cost Centers for Different Line Items in a single Reservation
Hello Gurus,
When we create a Material Reservation, we give the cost center at the header level and that cost center is accounted for each of the line items in the reservation. But when the reservation has many line items which depend on different cost centers, there is a need to enter different cost centers for different line items in the same Material Reservation. How can this be done? Please suggest.Hi,
It's a standard restriction in SAP functionality where one reservation document can only accommodate one cost center.
You can not maintain multiple cost centres for individual line items.
You have to create seperate Reservations for each cost centre.
check below thread:
ONE RESERVATION FOR DIFF COST CENTERS
Umakanth R
Edited by: Umakanth R on Dec 8, 2011 7:53 AM -
Customized report for cost centers by different cost centers
Hi All,
Customized report for cost centers by different cost centers:
I need to build a customised report with the following format:
Cost element columns | Cost center 1 | cost center 2 | cost center 3, etc -> dynamic cost center columns
CE 1 .............................. amount xxx | . amount xxx | .. amount xxx
CE 2 .............................. amount xxx | . amount xxx | .. amount xxx
CE 3 .............................. amount xxx | . amount xxx | .. amount xxx
CE 3 .............................. amount xxx | . amount xxx | .. amount xxx
User selection screen:
Controlling are:
Fiscal Year:
From period to period:
cost center group ... <range of CC group> or
cost center value ... <range of CC value>
Questions:
From the above selection screens, I need to pull out all the data stored in the table: COEP
But, the problem is that inside this table, there is no cost center or cost center group stored; and therefore the program should be smart enough to pull out all the documents from the table: COEP and then make sure that the document / list of documents that pull out should belongs to the cost center or cost center group, as well as date range.
KIndly advise how functional description/design should be built in order ABAPer can understand the requirement?
What should be the tables to refer in order meet the requirement.
Similar Standard SAP cost center report should be S_ALR_87013611 - Cost Centers: Actual/Plan/Variance, but this report read from many tables.Hi,
Please find the logic below & try it at your system-
Here cost center group is not possible (also i not checked it so do it on your own simultaneously i am trying the same).
Use Table BSEG-> in bseg give the cost center-> with the help of cost center find the account number (field HKONT)-> take this GL account number & got to table COEP-> in this give the GL account number at field 'offsetting account' (field GKONT) & you will get the line item.
Try it & let me know if you have any question.
Thanks -
Depreciation posting for two different Cost Centers
Hello everybody,
My client has an asset that was assigned to Cost Center #1 from the 1st of january to the 20th. Then it was reassigned to Cost Center #2. (Cost Center is configured to be a time dependent field).
We were expecting the system to split the depreciation amount into these two Cost Centers at the end of the month. Apparently we were expecting too much. The depreciation amount is going completely to Cost Center #2 wich is incorrect.
Do you think that there is something missing in the configuration? Or SAP just does not split the depreciation amount according to the time intervals? If that is impossible, do you have any alternative solutions?
Thanks a lot,
PlácidoDistribution of Depreciation and Interest
It is only possible to enter one cost center in the asset master record. You distribute depreciation and interest to different cost centers using settlement within Controlling (CO). The cost center in the asset master record then serves the function of a distribution cost center.
The disadvantage of this approach is that reports show only the distribution cost center, and not the cost centers that are actually debited. Also, you need to create a separate cost center for the distribution.
A different approach is to follow this procedure:
· Determine the cost center that you want to be shown in asset reports as the cost center of the asset. Enter this cost center in the asset master record.
· Enter an internal order in the asset master record. The system then posts to this order when it posts depreciation. The system does not post to the cost center.
· Settle the internal order to the cost centers that you want to debit. -
Hi all ,
I have a requirement to Post Cash Journal Document using FBCJ tcode.
Is it possible multiple line items debit & single line item credit and different cost centers and different profit centers
for exp:
pk GL a/c description amount cost center profit center
40 400101 telephone exp 500 1403 P 1000
40 400101 telephone exp 100 1404 P 2000
50 200100 cash in hand 600-
This is My requirement is it possible in fbcj
Please suggest me.ASAP.
Regards
Naresh.Hi,
This you can do it in two ways:
1. Make three header under top level....one Product A, 2nd Product B ( as Billing element) and third as Common expense ( only cost). Now 1st & 2 nd WBS, you have to have sales order linking with individual lint item, for third you will accumulate all the common expense till the period end then make a reposting of the same in desired proportion to both products WBS hierarchy
(This is if you want to have a track on the common expense as well.......like planning, budgeting & control)
After this reposting, run RA for individual billing element and hence you will all the complement detailing and control over Revenue and expense with respect to Product A and Product B individually.
2. If you don't want to maintain that kind of detailing the common expense and keep track of it through project, then have cost centers accordingly and make an assesment/ distribution with respect to expenses accumulated at those cost centers for the period to the respective WBS under each product. Then execute the period end processes for the project.
Or
You can try with have two more line items in the costing sheet as an overhead against common expenses with respect each product.
I hope this should help you.
Regards
Avisek Bhardwaj -
Trip approval workflow on different cost centers.
Hi Experts,
I have a business case that trip shall be approved by Cost Center HOD's (Cost center Owner).
For Example:
Case 1: if an employee is going on business trip and charging is on his master cost center. Then his approval shall be done by his HOD or Cost center HOD (Stnd Solution)
Case 2: If an employee is going on business trip other than his master cost center, then approval shall be required from his Cost center owner (HOD).
Case 3: if employee is going on such trip where his charging shall be charged on Different Cost Centers (Master Cost Center + other cost center's) . Firstly approval shall be made his Master Cost Center (if available) then approval shall be required for all cost center in-charges.
Assume that there is one to one relationship between cost center and Org unit.
Please suggest some solutions for case 2,3
Thank you in advance!Hi Muhammad,
As suggested by Thomas, you can use Rules to determine the agent who should get the workitem for approval.
Within the rule you could embed a FM wherein you could write your logic to determine the appropriate approver based on the trip data and the cost center of the user creating the trip.
Hope this helps!
Regards,
Saumya -
Trip approval on different cost centers.
Hi Experts,
I have a business case that trip shall be approved by Cost Center HOD's (Cost center Owner).
For Example:
Case 1: if an employee is going on business trip and charging is on his master cost center. Then his approval shall be done by his HOD or Cost center HOD (Stnd Solution)
Case 2: If an employee is going on business trip other than his master cost center, then approval shall be required from his Cost center owner (HOD).
Case 3: if employee is going on such trip where his charging shall be charged on Different Cost Centers (Master Cost Center + other cost center's) . Firstly approval shall be made his Master Cost Center (if available) then approval shall be required for all cost center in-charges.
Assume that there is one to one relationship between cost center and Org unit.
Please suggest some solutions for case 2,3
Thank you in advance!
Edited by: Muhammad Umer on Jan 12, 2011 8:59 AMHi,
you can try to create function module that could be used as a method in workflow.
create function module that achieve your requirement.
again, you can ask your abaper to help u to create function module.
hope it helps.
or you can post on SAP business workflow forum.
Edited by: nzworld on Jan 12, 2011 10:35 AM -
Maintaining percentage for different cost centers
Hi All,
we have one Expense GL a/c: 45010 (Electricity)
when the expenses occur... the amount hits this GL a/c
Example GL amount = 50,000
Now we want to maintain the percentage for different COST CENTERS....
& that 50,000 should be distributed automatically to respective cost
centers depending on %
So how do we go about it...please adviseHi,
look here:
http://help.sap.com/saphelp_47x200/helpdata/en/49/4398375ae2f84ae10000009b38f8cf/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/08/514e2143b511d182b30000e829fbfe/frameset.htm
A. -
What are the tables involved in hierarchy of cost centers?How to link them?
I want to generate the report for the GFIMs attached o the cost centers.
It should be similar to the transaction OKENN .
if a cost center is having an hiearchy , a cost group then will go on taking the parent node till the last node.
Which are the tables used in the transaction OKENN?
which are the tables which links the hierarchy of the cost centers.How is it linked.It is a simple process to trace the transaction (ST05/SE30) and discover the information for yourself...
-
WBS Elements and Asset Under Constructions have different Cost Centers
Hello Experts,
We have created a WBS element in one of the projects.
As per standard process, when we create the WBS Element the Asset under construction is also getting created through the settlement rule within the WBS.
These assets should have the same Cost Center as the WBS has. However we are in a situation wherein the Cost Center in the asset under construction is different than the Cost Center in the WBS.
I have checked the settings like automatic account assignment, etc but all settings look correct.
Can you please explain first what could be the reason for such a difference between Cost Centers in WBS and AuC's and what is the solution to avoid it in future?
Thanks in advance
LeenaThanks for your replies...
@ Alex - There is no Investment Programme ID maintained for this WBS in question since there is no IM for this project.
@ Abdul - Please elaborate more on Validation and Substitution.
Regards,
Leena. -
Cost allocation to different cost centers
Hello,
How can we allocate cost to the cost centers?
Thanks.Hi,
You can use Distribution / Assessment / Activity Allocation for this. You can reposting of costs also. -
How to extract cost centers and their number of appendant assets to internal table?
Hello,
my aim is to get an internal table with all my selected cost centers and the number of their appendant assets to pass this to a SmartForm.
The result would be something like:
cost center
number of assets
100000
65
100001
13
100002
105
100007
3
100008
57
What I did so far: I made up an SQL statement, which I tested in the transaction DBACOCKPIT (Performance -> Additional Functions -> SQL Command Editor), which works fine and gives me exactly what I need.
The SQL statement is (slightly simplified, and exemplarily only for costcenters 100000 and 100001):
select costcenter, count( assetnr ) as numberofassets from
( select anlz.kostlv as costcenter, anla.anln1 as assetnr, anla.deakt, anla.aktiv from anla
join anlz on anla.mandt = anlz.mandt and anla.bukrs = anlz.bukrs and anla.anln1 = anlz.anln1
where anlz.kostlv = '0000100000' or anlz.kostlv = '00000100001' )
group by costcenter
Now, I want this SQL statement to work in my ABAP code. To match the requirements of the ABAP Editor (SE80), I
- replaced all the point delimiters (.) by a tilde (~),
- removed all commas,
- added "into costcenter_assetcount" to store my result in an internal table.
So in my ABAP code the SQL looks like this (alias assetnr inb the first line is printed in red):
select costcenter count( assetnr ) as numberofassets from
( select anlz~kostlv as costcenter anla~anln1 as assetnr anla~deakt anla~aktiv from anla
join anlz
on anla~mandt = anlz~mandt
and anla~bukrs = anlz~bukrs
and anla~anln1 = anlz~anln1
where anlz~kostlv = '0000100000' or anlz~kostlv = '00000100001' )
into costcenter_assetcount
group by costcenter
Checking my code, ABAP Editor gives me a syntax error pointing to the SELECT of the subquery (it's in German, because this is my default language setting). After my first FROM, ABAP seems to expect a table name instead of a subquery.
Programm Z_FIAA_ASSETCOUNT @0A\QFehler@
"SELECT" ist im ABAP-Dictionary nicht als Tabelle, Projektions- oder
Datenbank-View deklariert.
Isn't it possible to use a SELECT subquery after my FROM in the ABAP Editor?
What would be the best practice to put the data in an internal table?
Looking forward to your comments!Hi,
I think, You make it to complicated, try this:
select anlz~kostlv as costcenter count( distinct anla~anln1 ) as numberofassets
from anla
join anlz
on anla~mandt = anlz~mandt
and anla~bukrs = anlz~bukrs
and anla~anln1 = anlz~anln1
where anlz~kostlv = '0000100000' or anlz~kostlv = '00000100001'
group by anlz~kostlv.
Jarek -
OKEOK: in which table can I see a certain Group and its Cost Centers ?
Hi All,
with reference to the Standard Hierarchy for Cost Centers (OKEON) , could anyone tell me in which SAP table i can find the Cost Centers associated to a certain Group?
Thanks a lot for your help.
G.Rossi
Moderator: Please, search SDN; this question has been asked several times on the forumHi,
all CO groups are stored in tables SETHEADER, SETLEAF, SETNODE. The values assigned to groups are stored in SETLEAF, for cost centre groups: SetClass 0101, SetName: the name of your cost center group (no matter if its standard hierarchy or not).
Best reards, Christian -
Usage of Cost Centers, Profit Centers and Internal Orders
Hello everyone,
i have perhaps for some of you a simple question but it bothers me alot.
Imagine we are using Cost centers and Internal Orders. For them we create statistical key figures using transaction KB31N.
Now we are installing SAP BI and want to create a report which would be generated acording to cost centers but with statistical key figures.
The question would be how to make a connection between cost centers orders and those stat.key.figs?
In our case the economists say that we are using this kind of scenario:
Dist.chanel ->
Sender: Cost center, Cost element
Receiver: Int.Order
and Stat key fig.
This is the only place where we have a connection between thos objects. Is there other way how to connect them. perhaps using profit centers?
If somebody didnt understand it, maybe ill try to explain it a bit better
Reagards
Laurynas PrikockisHi Laurynas,
Pls try to understand the concept as explained hereunder...
Cost Element:
Primary Cost Element : Replication of GL to bring costs into CO module when they are posted in FI
module
Secondary Cost Elements: Carriers of costs between two Cost Objects (when we want to transfer the
cost from Cost Centers to Internal Orders, vice versa and more, we create
Secondary Cost Elements to carry the costs and transfer them to the
reciever objects from sender objects)
Cost Center: It is a Cost Object, maintained on long-term basis, where we can capture the costs (Ex:
Marketing Cost Center)
Internal Order: It is also a Cost Object, maintained on shor-term basis, where we can capture the costs
(Ex: Internal Order for Special Marketing Campaign). Ultimately, whatever the costs
posted to this Internal Order, will get settled to Marketing Cost Center.
Staitistical Key Figure: It is used as a basis for allocation of certain expenses (Simple example would
be, Total rent paid for office is $100000 per month. This cost has to go to
different Cost Centers like Finance and Accounts, Marketing, Purchase Dept
etc on the basis of "Area Occupied". So, We will define "Area Occupied" as a
Statistical Key Figure in our system.
Now, when the Rent amount is posted in FI, it wil reach a Virtual Cost Center
(An "Allocation Cost Center" with name "Rent" to be created under your
Controlling Area) "Rent". From there, it has to reach the other Cost Centers (lie
F&A etc as explained above) on the basis of Area Occupied (SKF Created
for "area occupied")
For this, you need enter the Area Occupied values (Ex:Sq Ft) in KB31N and you need to create an Allocation Cycle (Distribution / Assessment) where in you will select "Area Occupied" (SKF) as your Receiver Tracing Factor.
I hope I am clear, don't hesitate to revert back for more explanation...
Srikanth Munnaluri
Edited by: Srikanth Munnaluri on Mar 3, 2009 7:26 PM -
One warehouse with three cost centers
Dear GURUs,
We are facing a problem while doing following activity
1. We have one warehouse (suppose 2465), which is sending material to three sales offices(2415,2416,2417) from sales office the material is dispatched to customer.
2.(Old setting)We have assigned the each sales office to each cost center & profit center is taken through material at plant.
3. (new setting) Profit center is removed from material master .
4. While sending a material from warehouse to sales office customer ,we are putting the profit center at sales order field.System automatically picking the profit center which is entered in the sales order.
5. But at same time if freight or any other condition(discount or rounding off) is put then system is picking warehouse as cost center
But we require respective sales office cost center
Note: Customer's sales office should be considered as a cost center as material will be dispached directly from warehouse to customer.
With Regards
Sandeep & AjayDear,
IF you have to take care of capacity planning and scheduling, then you need to use only one WC and having two WC will not serve the pirpose.
Generaly you cannot assign WC to 2 different cost center unless the period is different.
Then the only solution is let the cost get posted to 1 common cost centre. Then at the month end distribute the cost to 2 different cost centers depending on then qty produced.
This is the one laternative we are following.
Maybe you are looking for
-
Help! iTunes has completely disappeared off my iPhone 4s. Yes the Program, not just the app! All my music has just vanished! How do I get this back!! (p.s. I do suspect a deletion has occurred courtesy of my 4 year old nephew, some other stuff ha
-
Problem: Adobe Bridge CC has stopped working
I run a Windows computer with Windows 8 64bits OS. When I try to start Adobe Bridge CC I get a message "Adobe Bridge CC has stopped working". I Tried to delete preferences (started with ctrl-key) but no cigar. Then I uninstalled Adobe Bridge and rein
-
Euro character display problem
Hi, I stored the euro sign (� ) (press alt+0 1 2 8 on Windows to get that sign) in an Oracle database table in varchar2 type column. when I do 'select * from table_euro;', I get the euro sign displayed properly in SQL prompt. SQL> select * from table
-
Update 10.7.3 major issues
After the automatic installation of the update 10. 7.3 my system is no longer working. Each and every program start is failing. Windows have funny control buttons. Apple has no solution to offer. Some discussions suggest to install the combo support
-
hello i lost all my new macbook pro wth retina , data twice and 6 days, and the laptop is not even a month old, pls advice how to recover this data n solve this problem forever.