How to Override Cost Center in IT 1 based on certain conditions

Hi,
I have a pretty good understanding on how Cost Center gets defaulted based on Org Structure.  The standard SAP solution for Cost Center will not work for my client and I need to determine the cost center based on certain conditions. I understand that I have to write custom code in some user exit or badi. I tried user exit EXIT_SAPFP50M_001, but it did not work.
Here is my code:
DATA: I0001 LIKE P0001.
CASE INNNN-INFTY.
    WHEN '0001'.
      CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
        EXPORTING
          PRELP = INNNN
        IMPORTING
          PNNNN = I0001.
This is just an example to test the concept
I0001-kostl = 'COST_CENTER'.
     CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
        EXPORTING
          pnnnn = i0001
        IMPORTING
          prelp = innnn.
endcase.
When I change IT 1 record and hit enter, I can see that my code is being executed. I can see cost center being updated on the screen, but when I save it, its not able to retain that new cost center value. This might be because cost center is not an open field.
How can I change my code so it retains its value after saving?.
Thanks!

Contd to manoj
Cost Center will be a Open feild when the value of   the  switch PLOGI ORGA  should be balnk if it is haveing 1 than it will not default the value kindly check

Similar Messages

  • How to restrict cost center in ME51N

    Hi all,
    can anyone please let me know,how to restrict cost center in ME51N transaction?
    Thanks in advance for your efforts

    Dear,
    Go to Transaction,
    KS02- Change Cost Center.
    Go to the Control Tab.
    Tick on the checkbox for desired transaction activity you want to lock this cost center.
    Any postings made against the cost center will not be allowed.
    Regards,
    Syed Hussain.

  • How to assign cost center to cost element.

    Hello,
    Can any one please guide how to assign cost center to cost element.
    Thanks in Advance..
    Have a nice day...

    Hi ,
    There are 3 ways :
    1. Default the cost center in cost element - Ka02 - account assingment tab enter cost center .
    2. Use OKB9 for diffrent combinations as per your requirement .
    3. Use GGB1 for substituting the cost center based on some conditions .
    Regards ,
    Dewang T.

  • How to use cost center hierarchy?

    Hi,
                  How to use cost center hierarchy?I have created that but how to use that.Can somebody help me?
                                        Sekar

    Once the Cost Centre Hierarchy is Created, it can be used in Profit Centre Reports.
    Choose Financials -> Cost Accounting -> Profit Center Report ->Template.
    Here Choose, the Cost Centre Hierarchy the you had created and generate the report.
    Also refer these threads
    [Reg... Costcenter hierarchy;
    [cost centre hierarchy;

  • How to Enable Cost Center Field in Infotype 0001

    Dear all my Friends,
    Can anybody please tell me that how to Enable Cost Center Field in Infotype 0001, actually the problem is while hiring the employee the field itself disable and not allowing me to put any CC on that field but which should be enable while hiring or if we intend to change in future through PA30 and after that i thought i can do in Infotype 0027 also but in infotype 27 the field called Master Cost Center field is still disabled which will reflect in 0001 or Vice Versa.
    So friends pls tell me where my configuration is wrong or how will i get enable that field in 0001 infotype so that i calculated the cost of that employee.
    Waiting for ur Reply friends,
    Thanks,
    Prashant.

    Dear Rajesh,
    Thanx for ur Solution and i got the answer, actually i m maintaining through OM and u gave me the exact solution .
    Gr8 job dear. Thanx allot once again
    Thanks,
    Prashant.

  • How batch append cost center group to standard hierarchy by batch

    Hi Guys,
    Would you please tell how me how append cost center groups to standard hierarchy by batch, every time I have to do it one by one, is there  a convenient way? thanks.
    Best Regards
    FS

    Hi,
    You can create any number of cost center groups as per your requirement.
    But one thing is crucial. If you crin your eate the groups using the T Code:OKEON. those will effect  to the standard hierarchy.
    Cost centers created wil KSH1 will not effect to standard Hierarchy.
    Main point here is the main hierarchy should be maintained in OKEON. Later you can add any number of groups to that. LSMW will work, before that Hirarchy Area(Cost center group) should be maintained in the system for effective work of LSMW.
    Regards,
    Pavan Kumar Arvapally

  • How to add cost center field to IT0001

    Hi
       How to add a cost center filed in IT 0001...I know normally this will be there but in my client system it is been hided or removed ..So can I know where to make a changes to get it back.
    Thanks

    hi
    check your infotype customizing in IMG .
    note down the screen number , and in there you can check if the fld is hidden or not.
    Regards
    sameer

  • Report Painter- How to make cost center report for Jun07-Jul08 ?

    Hi Experts,
    I need to make a P&L (Actual/ Plan) report for Jun 07 - Jul 08 by using Report Painter, but I'm having difficulty to make column for the next year period (2008) and some other things.
    We are using K4 Fiscal Year Variant in ECC 6.0.
    The layout is somehow like this:
    Header : Cost Center
                 Actual/Plan Report
                 June 2007 to July 2008
    Body:
    Cost Element     |   Total Actual   |   Total Plan |  Actual  June | Plan June .................Actual July | Plan July    
    xxxx       
    xxxx
    Account Group (total)
    xxxx
    xxxx
    Account Group (total)
    Grand Total  
    How to:
    a. make the header "June 2007 to July 2008" ?
    b. make the selection screen to provide parameter for June 2007 to July 2008? (e.g.: period 6 fiscal year 2007 to period 7 fiscal year 2008)
    c. provide layout (rows and columns) as described above? it should provide detail cost elements and also calculate it as the total per account group, then finally the Grand Total for all of account groups. 
    Thank you before,
    -=Meila.S=-

    Hi,
    1. Put Year and Month as your General Selection parameters
    2. In the label of the fields, if you put the parameter name with & before, it will display the value
    3. If you put cost element in General selection, it will come with a group, and when you selecting the group, the report does the sub-totals automatically.
    Regards,
    Eli

  • How to SeeThe Cost Center Budgeting Report

    Hi Experts,
    I am preparing the scnario for Cost Center Budgeting,once we enter the details in the budgeting plan,,we will post to the cost centers as well.after that how can we see the Cost Center Budgeting Report....will it be available in S_ALR_87013611 or anything else????
    Regards
    Sap Guru

    You are right, i.e you can view the budget/planning  report from S_ALR_87013611. But some other reports are available to view the planning data like S_ALR_87013612, S_ALR_87013613, S_ALR_87013614 where you can view the actual vs planning data. You can view only planning data from KSBL, KSBP etc.
    Thanks,
    Regards,
    Ramnath V.

  • How to control cost center authorization when do ABSO/ABAA

    Dear :
    As our system organization structure is with mutiple profit center and
    cost centers, in order to avoid processing TCODE ABSO/ABAA with wrong
    input, we want to make authorization check with cost centers, as there
    is no standard authorization check and control in TCODE ABSO/ABSS , we
    want to know how could we realize the requirement
    to control the TCODE with cost center authorization check, thanks in
    advance.

    Hi,
    check SAPNET note 370082 + related notes + 698401 / 565436.
    Best regards, Christian

  • How to delete cost center - KS04

    Hi,
    we need to delete the current cost centers however we can not do it due to the fact thar records available in table COKA.
    In order to get rid of this problem we have tried to change the valid through date as, for example, 01.01.2011 - 31.12.9999 and tried to delete with these values and got the message cost center can be deleted, KS04, but how to delete it?
    i looked for a butto etc to delete the cc but could not find any.
    All heplful answers will be appreciated.
    Thanks.

    Try to follow the process mentioned in standard sap Help.
    http://help.sap.com/saphelp_46c/helpdata/en/03/7c9d3962749d08e10000000a11402f/content.htm

  • How to capitalise cost center based purchase

    Hi Friends ,
    Presently we are buying all plant and machine and Building related on cost center based purchase with GL accounts . We want to capitalise these once project compleate , how to capitalise material with cost center based purchases .
    Raghu

    Hi,
    This as a manual posting in FI from your cost center to the asset.
    TC like FB01
    Use for the asset posting key 70  asset number TTtype 100 fill in the information
    Credit you cost center with posting key 50 GL accounts.
    Wy you don't use Internal orders or projects? From there you can settle your investment to AUC and the final asset.
    Paul

  • How to capitalise cost center based purchases

    Hi Friends ,
    Presently we are buying all plant and machine and Building related on cost center based purchase with GL accounts . We want to capitalise these once project compleate , how to capitalise material with cost center based purchases .
    Raghu

    Hi,
    This as a manual posting in FI from your cost center to the asset.
    TC like FB01
    Use for the asset posting key 70  asset number TTtype 100 fill in the information
    Credit you cost center with posting key 50 GL accounts.
    Wy you don't use Internal orders or projects? From there you can settle your investment to AUC and the final asset.
    Paul

  • How to delete cost center

    Hi,
    I created some wrong cost center in SAP, how to delete it?

    hi,
    go to T.Code : KS04 and delete the cost center.
    regards,
    mohammed

  • How to find Cost center

    Hi all,
    Please tell me how to get the cost center if i'm having G/L account, company code and fiscal year.
    I can see in the Tcode FB03, but how do i retreive the cost center and cost center category from tables.
    Please help.
    Thanks and regards
    Poorna

    Since you have the G/L Account and not the document number, you should go to BSIS and BSAS:
    REPORT ztest LINE-SIZE 80 MESSAGE-ID 00.
    TABLES: bsis, bsas, cskt.
    SELECT-OPTIONS: s_bukrs FOR bsis-bukrs,
                    s_hkont FOR bsis-hkont,
                    s_gjahr FOR bsis-gjahr.
    DATA: BEGIN OF itab OCCURS 0,
            bukrs LIKE bsis-bukrs,
            hkont LIKE bsis-hkont,
            gjahr LIKE bsis-hkont,
            kostl LIKE bsis-kostl,
            ktext LIKE cskt-ktext,
          END   OF itab.
    SELECT bukrs hkont gjahr kostl
      FROM bsis
      INTO TABLE itab
      WHERE bukrs IN s_bukrs
        AND hkont IN s_hkont
        AND gjahr IN s_gjahr.
    SELECT bukrs hkont gjahr kostl
      FROM bsas
      APPENDING TABLE itab
      WHERE bukrs IN s_bukrs
        AND hkont IN s_hkont
        AND gjahr IN s_gjahr.
    SORT itab.
    DELETE ADJACENT DUPLICATES FROM itab.
    LOOP AT itab.
      SELECT SINGLE ktext
        FROM cskt
        INTO itab-ktext
        WHERE spras  = sy-langu
          AND kokrs  = s_bukrs
          AND kostl  = itab-kostl
          AND datbi >= sy-datum.
      IF sy-subrc = 0.
        MODIFY itab.
      ENDIF.
    ENDLOOP.
    LOOP AT itab.
      WRITE: /001 itab-bukrs,
                  itab-hkont,
                  itab-gjahr,
                  itab-kostl,
                  itab-ktext.
    ENDLOOP.
    Rob
    Message was edited by: Rob Burbank

Maybe you are looking for

  • How to tell if you have correct USB 2.0 driver?

    Hi, I seem to be having a problem with my front panel usb wich are plug in JUSB3.  When i connect a external case in these front panel i get message that a have a high speed device plug in a low speed hub.  My D-bracket is install in JUSB2.  If i plu

  • CRM reports other than Interactive reports

    HI,       In my projects we have lot of custom fields developed in BP, Lead and Opportunity. The client needs a report based on the cutom fields. When we tried to creat new reports through interactive report we can find one reports for lead and oppor

  • Best way to save XML results to a file via command line

    I'm trying to set up an easy way that I can save my XML results to a file via the command prompt. Here's my current command line statement sqlcmd -S server/database -E -i C:\XML.sql -o C:\Test.xml -h -1 -m 1 -y0 That works about 95% of the way. The p

  • MPLS VPN routes with core IGP costs

    Hi, Is there any way to use the IGP cost between PEs, and pass that into the VRF prefixes? For example: A branch site has 2x CEs (CE-A & CE-B), each with a link to a different PE (PE-A & PE-B). EBGP is used between CE-PE. IBGP Between CE-A & CE-B. CE

  • How do i get new texts

    i don't have any clue on how to add new texts. i am new to after effects so i am still learning the basics. can please someone help me. I am only 15