Help on fox used to one/all profit center/cost center of one company code

Hi experts,
I have a fox formula witch is to be applied in diferent situations:
1. To one cost center
2. To all cost centers of one company code
3. To one profit center
4. To all profit centers of one company code
I'm using the following variables:
ZIPROFCE (1st profit center selected in query)
ZIPROFC2 (number of profit centers selected in query)
ZICOSTCE (1st cost center selected in query)
ZICOSTC2 (number of profit centers selected in query)
The formula is actually like below, guess it is not worrking because I can't have an integer number accepted by chars 0profit_ctr and 0costcentr. I am thinking of adding another char in the infocube witch is integer (without master data), and it would do the job. Is there other way out, so I can mantain actual aggregation levels and filters?
DATA PERIOD TYPE 0FISCPER3.
DATA PER_P TYPE 0FISCPER3.
DATA PCENTER TYPE 0PROFIT_CTR.
DATA PCENTER1 TYPE 0PROFIT_CTR.
DATA PCENTER2 TYPE 0PROFIT_CTR.
DATA CCENTER TYPE 0COSTCENTER.
DATA CCENTER1 TYPE 0COSTCENTER.
DATA CCENTER2 TYPE 0COSTCENTER.
DATA PLANPER TYPE F.
PCENTER1 = VARV (ZIPROFCE).
PCENTER2 = VARV (ZIPROFC2).
CCENTER1 = VARV (ZICOSTCE).
CCENTER2 = VARV (ZICOSTC2).
PLANPER = VARV (ZEPLANPE).
PER_P = VARV (ZEPLAPER).
*IF CCENTER2 = 1.
CCENTER = CCENTER1.
*ENDIF.
IF PCENTER2 = 1.
CCENTER = #.
PCENTER = PCENTER1.
ELSEIF PCENTER2 > 1.
CCENTER = #.
ENDIF.
FOREACH CCENTER, PCENTER.
PERIOD = PER_P.
DO.
IF  { ZCOMPROM, CCENTER,  013, PCENTER } <> 0.
  { 0AMOUNT,  CCENTER, PERIOD, PCENTER} = { ZCOMPROM,  CCENTER, 013, PCENTER } / PLANPER.
ENDIF.
PERIOD = PERIOD + 001.
IF PERIOD = 013.
EXIT.
ENDIF.
ENDDO.
ENDFOR.
Tanks in Advance,
João Anastácio

Hello João,
you are making it more complicated than it is:
Fields to be changed: Key figure, period
DATA PERIOD TYPE 0FISCPER3.
DATA PLANPER TYPE F.
PLANPER = VARV (ZEPLANPE).
PERIOD = VARV (ZEPLAPER).
IF { ZCOMPROM, 013 } > 0.
{ 0AMOUNT, PERIOD} = { ZCOMPROM, 013 } / PLANPER.
ENDIF.
Regards,
Marc
SAP NetWeaver RIG

Similar Messages

  • Document change/display - Profit Center / Cost center name

    Hi,
    We have a requirement where client wants to display the profit center and cost center names (short or long) when displaying or changing a parked or a posted document. As we all know SAP shows only the profit center and cost center code and not the description during the document display. After all the deliberations, this seems to be an important piece of information while posting a parked document or even viewing it as a posted document.
    What are our options?
    Any help is much appreciated.
    Regards,
    Subodh

    Thanks for your response Tamim.
    Profit center / cost center naming is following a different convention and we are in a roll out phase, therefore we can't think of first item.
    About match code, the requirement is not so much during the posting but primarily while releasing the parked document or viewing the parked / posted document - they want to see the description along side profit / cost center.
    I was looking for clues on any utilities / enhancements / BTE that I may use to bring extra fields during document display.
    Regards,
    Subodh

  • Is it possible to differentiate one payroll area with different currency under same company code

    Hi experts ,
    MY client wants to pay in yemen currency for the employees who working in yemen, but it was comes under same company code created for india.we have differentiated yemen under different payroll area wise . so is it possible to  differentiate one payroll area with different currency under same company code.
    thnx,
    vamshi keshavapatnam

    Hi Vamshi,
    I don't think so what you have done is correct. It seems like Global Employment functionality. As I understood you have some EEs which are Indian but working in company branch of Yeman.
    If this is the case you should define a new company code for Yeman branch and use Global Employment functionality. By this you can make decision to pay in home currency or traget country currency.
    Regards,
    Omid

  • How to use iMessage for all the iOS devices registered on one apple ID

    I have 5 iOS device for my family on my appleID. But I want have different ID to use iMessage for all devices. Is it possible? How?

    Sign in with whatever Apple ID desired on the device in iMessage setup.
    This has no affect on the Apple ID used for store purchases or iCloud.

  • Profit Center / Cost Center Distribution

    Hello,
    I'm trying to send Profit Centers / Cost Centers via IDoc.  I can create the master records with PRCMAS01 / COSMAS01, but I'm not sure how to do the assignment to a company code via IDoc.  Can anyone shed some light?
    Thanks,
    Harrison

    Update:
    The cost center IDoc contains a field for company codes even though it's not mentioned in the IDoc documentation for COSMAS01.  As cost centers are only assigned to one company code the field only supports one entry
    Profit centers on the other hand do not support the assignment of company codes via IDoc.  I believe this is because SAP by default assumes that you want to assign a profit center to all company codes, therefore it doesn't have a purpose for a structure to support this in the IDoc.

  • Transfer of Inventory from One Plant to another with in the same company code

    Hello All,
    Can you please let us the possible option's for transfer of Inventory from one plant to another plant in different geographical location with in the same state.

    PLANT TO PLANT TRANSFER IN THE DIFFERENT GEOGRAPHICAL LOCATION UNDER THE SAME COMPANY CODE
    Assume - plant 1 - 1000 ; plant 2 - 2000.
    From 1000 - 2000 u shall transfer the parts using 641 movement By creating a Stock transfer order with the following conditions.
    1, Master & source list to be extended for both the plants vice versa. including accounting & excise view
    2. Create an Sto po in ME21n  for one time only /ME31N as scheduling agreement
    3. Generate pick list and do Post goods issue in va02.
    4. Create excise invoice & do the Gate entry in the other plant & stocks are up loaded.
    5. In India excise rules are becoming stingent & you have to inform both the Excise ranges before starting the transactions

  • PO created successfully using BAPI. But G/L, Cost Center are not displaying

    Hi,
    I am trying to create a purchase Order type limit order using BAPI_PO_CREATE1. PO created successfully. when I try to see the PO using ME23N transaction,in  the account assignment tab G/L and cost center are blank. In my BAPI, I am populating all the values in item and account internal tables.
    I am debugging all the time and not able to find why G/L and Cost center are not poplulating in PO.
    Pls suggest me how to finish this problem.
    Thankm,
    Ram

    Hi,
    Are you passing the update flag in POACCOUNTX table?
    regards,
    Ankur Parab

  • Profit Center - Cost Center link

    Given the Profit Center, is there a table I can check to find which Cost Centers are linked to it?

    since we assign the profit center in the cost center master data, go by the cost center.
    use table CSKS for cost center > profit center link, then sort on profit center.

  • Can i settle one order to different cost center

    Hi experts
    pls solve my problem
    i posted some expenditure to one order
    one order expenditure : salaries 2500, rent 1500 , Travelling exp 3500
    here i need post salaries to cost center admin-1001
    and i need to post rent , travelling to cost center Markeing-2001
    is it possible or not
    if , how tell me the process
    Regards
    Rams

    Hello Rams
    What ever the settlement u r going to do in IO are dependent on the settlement rule u have defined in SETTLEMENT PROFILE in KOA1
    whereu  have to
    <b>activate the check box %</b>
    <b>activate the amount settlement - activate,.</b>
    <b>the radio button  to be settled in full to be activated.</b>
    U can settle the costs of the orders partly to diffrent cost centers as required. ( as u have explained)
    again u check it out in KOT2 ( creation of order type) wheather u have activated
    <b>CO PARTNER ACTIVATED  X  ( active)</b>
    Hope u would be able to solve the problem
    Expecting some valuable points if it is useful
    Thanks

  • Profit center & cost center

    Hi,
    i look for a transaction with which i can show the profit center correspond to each account.
    i hope your help
    regards
    jehade

    Hi,
    i look for a transaction with which i can show the cost center correspond to each account.
    i hope your help
    regards
    jehade

  • Add freight cost in a cross company code scenario using a costing sheet

    Dear Forum,
    I will like to add freight cost to a material using a costing sheet. The freight percentage is very easy to add and works fine when the cost is added in the company code costing. My problems start when I want to add the freight in the cross-company code costing. I want to setup a cross-company code costing where the freight cost is added to the material in the buying company code and not on the selling company code. The cross-company code costing is setup using special procurement costing keys. 
    In below costing (CK11N) the procurement costing key is not used.
    From the itemization it is shown that purchase info.record 5300067643 is read and the price of 12,97 is determined. There is added 10% in freight coming from the costing sheet.
    The freight is shown in the cost component structure as well.
    The special procurement type is now changed from ‘20’ to ‘AT´ on the MRP2 screen in the material master. The procurement is now pointing to an internal plant called ‘DCN’.
    The costing of material 105050 is now repeated. I get the expected result from changing the procurement key, as I can now see the material is sourced from plant ‘DCN’. DCN is sourcing the material from BJ07, but that is not relevant for the example.
    If I now look at the itemization again on the costing in BGA1 I now see that the price is not coming from the info.record. It is the costing in DCN that is used.
    I will still like to add the freight cost in BGA1.
    How do I add freight cost in BGA1 when I at the same time want to have the costing to be taken from plant DCN?
    Please let me know if you need additional information on the customizing setup of the system.
    Best regards,
    Kim Hjorth Poulsen

    Hi Srinu,
    Thank You for a prompt feedback.
    I have tried to follow Your advise. The special procurement costing key is customized like below.
    I have updated the special procurement costing key on the costing 1 view of the material master. When costing the material it is using the special procurement key. This can be seen from the qty. structure tab in CK11N.
    It is also costing cross company as intended.
    The itemization looks like below.
    and the cost component structure looks like below.
    Unfortunately the freight is not added in the costing in BGA1.
    I noticed that when the costing is made without special procurement key the costing sheet used in the costing is for material components. If the costing is made with the special procurement keys the costing sheet used is for finished and semi-finished materials. The customizing in both of the costing sheets are the same, but only when costing is without the special procurement keys the freight is added.
    So unfornutely Your suggestion did not solve the problem.
    Best regards,
    Kim

  • Trial Balance table Profit Center/Cost Center

    Hi SAP Experts,
    I want to download SAP trial balance as per profit centre,cost centre, I know there are lot of standard report but I am looking for tables where I can download these values?
    Thanks,
    Suyog

    Hello Suyog ,
    Long before I had worked on such a report.
    Please try with any of the tables between FAGLFLEXA or FAGLFLEXT  ( If I have recalled correctly  )
    FAGLFLEXT is for TOTALS so I think it will be appropriate.
    Please check.

  • One order type different number range for different company code

    Hi
    I have created one order type. Same order type I extended in another company code (plant).
    I required different number range for another company code.
    Can any give detail solution.
    Regards
    ARK

    Hi,
    In CO82, define groups of order types. Define number intervals and assign number intervals to groups. Organize order types that you want to assign same number interval under groups.
    Regards.

  • S_ALR_87013336-Profit Ctr Group-Balance Sheet-In Company Code Currency

    Does anybody know how to have SAP Transaction/Report S_ALR_87013336 output data in Company Code Currency?  I have tried to run this transaction several ways but it is coming up in Controlling Currency (USD) and we would like the ouptut to be in Company Code Currency.
    Thanks in advance for your review and advice.
    Roman

    The report is built on drill-down reporting tool and is defaulted to "Balance in profit centre local currency (i.e. controlling area currency)".  It works with form and report.
    Change the key figure from "Balance in profit centre local currency" to "Balance in company code currency"
    KE85 Chang form.  Select form 8A-PCA013G
    Key figure on the right side > double click on the line item s > Element definition screen popped up - from there change the key figure from "Balance in profit centre local currency" to "Balance in company code currency"

  • Profit center cost center assignment

    Dear All ,
    1) i need the total list of cost centers assigned to which profit center ?
    2) tcode to view the balance sheet
    pl guide

    Hi,
    1) Check Assignment to Profit center
    2) The T code to get into Balance sheet SA38 -> RFBILA00 or S_ALR_87012284.
    Regards,
    Akhila.

Maybe you are looking for

  • Change ARD settings with bash script?

    Hello my fellow friends. First i am sorry for my bas English but hope you survive. I was wondering if it was possible to write a script that activated and deactivated ard? I looked in Controlpanel -> shared and its a option to stop or start a service

  • Can't see screen during bootup m58

    Hi, I have a SFF ThinkCentre M58.  I had a video prob on one of my partitions (not related to my current prob).  I went into bios and switched my video from automatic to I think "IGN" (or something like that)which I thought would be on board video in

  • Error On Distribution Model in the Backend

    Hello, I'm customizing our SRM and Backend to work together. I'm in the part Distribution Model. It works on SRM but on my backend, when I want to "Generate Partner" I have a message "No messages have been defined for the selection conditions in the

  • Trace files ( .trc ) for Explorer

    Hi, We have trace enabled for our polestar servers and the traces are getting created. but, the trace files are in .trc format. i am not sure how to read that format..Can somebody explain  me how to read .trc files ?

  • Swing ActionListener help?

    Hi there, I'm trying to get to grips with Swing and I'm reasonably comfortable with laying out the GUI now. However, I'm still trying to get to grips with ActionListeners. As I understand it, you can have any old class as an ActionListener as long as