ME_PROCESS_PO_CUST Plant and Cost Center Validation Isuue

Hi Friends,
                  I have a requirement to validate ME21N PO creation with Account assignment 'K'. In our Business Process, we have 2 plants lets say 3000 and 5000. Plant 3000 is linked to Business Area say 4000 and Plant 5000 is linked to Business Area 9000. Now we have unique cost center assignment in both Business areas.
My requirement is when i enter wrong cost center then system has to validate it with plant and has to pop up error message in PO creation. With BADI ME_PROCESS_PO_CUST, i am able to populate the error message when i enter wrong cost center but i can save the PO which is wrong.
Please help me on this issue.
I have written in my logic in BADI ME_PROCESS_PO_CUST -> PROCESS_ACCOUNT.
Thanks,
-Ziad

hello ziad
Some sample code, same code is there in POST also. just refer it, not as per your requirement.
CHECK
METHOD if_ex_me_process_po_cust~check.
Konstanten
  CONSTANTS: lc_e(1)  TYPE c VALUE 'E',
             lc_x(1)  TYPE c VALUE 'X',
             bsart    TYPE bsart VALUE 'FO',
             ekorg    TYPE ekorg VALUE 'REPL'.
  DATA: ls_mepoheader TYPE mepoheader.
  INCLUDE mm_messages_mac.
Rechungspläne müssen mit der Belegart FO und in der
EKORG = REPL angelegt sein
Get header data
  ls_mepoheader = im_header->get_data( ).
  IF ls_mepoheader-bsart EQ bsart AND ls_mepoheader-ekorg NE ekorg.
Create Message
    mmpur_message_forced
            lc_e
            'ZI_MM'
            '007'
            ls_mepoheader-bsart
            ls_mepoheader-ekorg
    CALL METHOD im_header->invalidate( ).
  ELSEIF ls_mepoheader-bsart NE bsart AND ls_mepoheader-ekorg EQ ekorg.
Create Message
    mmpur_message_forced
            lc_e
            'ZI_MM'
            '008'
            ls_mepoheader-bsart
            ls_mepoheader-ekorg
    CALL METHOD im_header->invalidate( ).
  ENDIF.

Similar Messages

  • Plant and Cost Center are not displaying in FI doc. for asset scrap ABAVN.

    Hi All,
    When we do asset retirement by Scraping using Transaction Code ABAVN, Plant and Cost center are not appearing in the FI document. But, in the master data the Plant and Cost center are assigned for the particular Asset. 
    When I see the FI document display, the fields Cost Center and Plant are blank.  Business Area and Profit Center fields are getting updated.
    Can any one help me how to get this Plant and Cost Center in the posted document.  Is there any OSS notes for this.  I am using ECC 6.0 version.
    Thanks in advance for your help.
    Regards,
    Rajesh

    Rajesh
    Aditional on me answer.
    The systemtakes not the cost center from the asset you have to assign it in OKB9 or to fill in during this posting:
    Steps
    Click on Simulate, than you see the posting screen:
    Click on the line (pk 40)
    Click on Goto and Additional account assignment and fill in the cost center whatu2019s in the master record of the asset and post
    An other option is to make a substitution to get this information

  • Payment method and cost center validation check in MIRO while save or simul

    Hi,
    I want to put a validation check between payment method and cost center while posting MIRO against PO (MIGO done) . If my payment method and cost center matches then system should allow that entry otherwise should popup a message .
    We tried this with user_exit - EXIT_SAPLMRMP_010 enhancement LMR1M001 .
    But thing is it is not getting triggered at all either at the time of simulation or at the time of saving . We are also looking into BADI - update_invoice .
    Any body having any idea on this please share.
    Thanks

    Hi,
    Please don't open multiple threads for the same question..Please close this one..
    THanks,
    Naren

  • Plant and cost center.

    Can any body tell me where i can see that a plant is mapped with cost center

    Hello,
    Cost Centers are NOT assigned to Plants. (They are independent of plant).
    Just for your information, plants are part of MM organization structure where as Cost centres are part of Controlling (CO-CCA).
    Cost centers have a time frame where as plants no time frame.
    Regards
    Ambadas

  • Validation on PLant and profit center for Material

    Hi gurus
    please advise on validation.
    On FB50 transaction, Our users want a validation for particular accts say (GL:  No 999888)
    that if  a material is entered in FB50, a plant and profit center must also be entered AND the entered plant and profit center should be the one from  the material master MM03.
    Please advise steps as how to build validation for the above requirement.
    Many thanks in advance

    Hi
    You should never post any entry to a material account from FB50. FB50 is a purely FI transaction, and the Inventory accounts get hit automatically by various MM transactions. If you will post an entry from FB50 to a material account, there will always be inconsistency between FI & MM records.
    regards
    Parag Bhargava

  • Cost center validity change and assign it to new company code

    Hello
    We are having 10 Cost centers  in 1000 Company code, And validity of these cost centers is .01.01.2001 to 31.12.9999.
    Now business want to create one more company code 2000. and wants to extend these same cost centers to 2000 company code also. But as per SAP std Cost center extention is not possible , bcz cost center can use by only one company code.
    Now Company is saying that..they wants the same number for new company code from 23.09.2010 to 31.12.9999..
    system is not allow me to change validity period of these cost centers, bcz  these saying that the cost center is already defined for given period.
    Beacuse new company code will start working from 24.09.2010. so i,e the reason , we want to make example "2561 cost center  validity 01.01.2001 to 22.09.2010 for company code 1000. then after words 23.09.2010 to 31.12.9999 the same cost center 2561 will for 2000 company code.
    but system is not allowing me to change the validity
    Regards
    Mahesh

    Hi Mangesh
    What you wish is not possible.. You will have to create new cost center and assign to the new company code...
    may be for simplicity sake, you can add a prefix or suffix to the existing cost center no i.e Cost Ctr 2356 can become N2356 in new comp code
    Regards
    Ajay M

  • Control G/L account and Cost Center for movement type 251

    Dear Friends,
    I would like to use mov. type 251 for GI for sale and like to control over G/L account and Cost center.
    The G/L account is by default from the valuation class of the the material and if the user will enter wrong G/L
    we had done the customising in OMJJ movement type 251 - Account grouping - Unchecked the check box of column
    "Check account assignment" - Impact is " the system always uses the G/L accounts or account assignments determined automatically"
    I also made default cost center for G/L account and plant wise through OKB9.
    Now I would like to suppress/dispaly the G/L account and cost center - for same I had done Setting in Entry control menu of OMJJ for 251 of field Account control - Value  - "-" field is suppressed. But it is not working.
    Please advise to solve this situation.
    Thanks & Regards
    Rajan

    Dear Rajan
    Yes, I have checked in MB1A earlier. We have separate node for Field seletion layout for Enjoy transaction MIGO for mvt type in which the G/L account (KONTO) an Cost center (KOSTL) have only optional or required entry selection.
    warm regards
    Ramakrishna.

  • G/L Accounts and cost center

    i would like to find the list of valid G/l Accounts and cost center for a input company code. Is there any good tables for getting this information. ?

    I don't think there is such a thing. If a GL is valid for a company code and a cost center is valid for the corresponding controlling area, then the transaction should post. A relationship between controlling area and company code is in table A059 (Controlling Area/Company Code). This table is empty in our system, so I don't think that checks will be made.
    Rob

  • RE - Change profit center and cost center after LO activated

    Hi ppl, One question. Is there any harm if we change the profit center and cost center of the business entity, building, rental unit only after the lease out has been activated?

    No need to change the cost center, as you want to have valid from date as 01.10.2010.
    Having profit center before that date is not an issue and does not have any negative impact.
    Regards,
    SDNer

  • Functionality of Profit Center and Cost Center

    Hi,
    I am unable to understand the functionality of Profit center and cost center, I know that cost center represents area within an organization for which you will like to see the expenses for a particular time period. for example in an organisation we have three cos centers Accounts, HR and Admin. whenever you post an accounting document in FI you will specify the cost center to which the expense relates. but in some cases when you post an expense and give the relative cost center the profit center is also driven by the system. why is this behavior? i mean i have posted an expense not an income then why is system driving the profit center as well?
    Profit centers are used if you want to see the profit of different area of your organisation. in what kind of postings we use profit center? and if we could use profit center to draw income and loss for a specific area why do we need segment reporting? and what is the difference between Segment and Business area. what i understood from their definition is that they are both same and use for same purpose.
    I am totally lost in these concepts. please some one help me out with an example. i am stuck at this point. some one please clarify my concept of Profit Center, Cost Center, Segments and business area please.

    Hi,
    Cost center & Profit Center are organizational units   within the enterprise structure , created for better internal control.
    As the name suggests Cost Center  is  the lowest level  of the organizational unit representing a defined location of cost incurrence or otherwise to which you can meaningfully assign the cost(both direct & Indirect).
    Profit Center is an organizational unit  in accounting  ,where management would require to see the profitability & fix the responsibility. It may be each plant/division of the company .
    If you consider the Plant is the Profit center, you can take the various deptts in the Plant as cost centers. you can draw a balance sheet & profit & loss account statement at profit center level but this will be for your internal use.From this you can know the ROI on particular area. Profit centers are assigned inside the cost center so when you update cost center, profit centers are updated automatically.
    Where as Segments are used for legal reporting of your accounting standard as per IFRS. Both Business Area & Segments are more or less same with some technical difference.
    Business area  is a free organizational unit. It can be derived through cost center or can be entered manually.
    But segment is a dependent organizational unit. It is defined & attached inside the  profit center master data. It can’t be entered manually.
    SAP suggest to use the Segment concept.
    Thanks & regards
    Deepak

  • Change Cost center valid date

    Hi, Export,
         Can we change the cost center valid date from 2007.10.01 to 2007.08.01? If it can change, Pls tell me how to change it.Thanks.
    best regards
    Park Han

    Well, it's a little late to reply to the original question, but I found this thread while trying to figure out how to do the same thing myself and thought I would update it with the answer in case anyone else stumbles across this thread while searching as I did.
    You can actually make a change in the valid from date by using a KS01 Create Cost Center transaction and referencing the original cost center to create the additional period you want to add. 
    In this case in KS01 you would fill out the fields in this manner:
    Cost Center: Existing Cost Center to be changed, let's say 1000
    Valid From 2007.08.01
    Valid to: 2007.09.30
    Reference Cost Center: 1000
    Controlling Area: Whatever the controlling area is
    In effect, rather than changing the cost center, you are creating the extra time period from the new from date to the original from date and referencing it to the cost center.
    The end result for us was that KS03 shows the cost center with the new from date and the old to date, which was the change we wanted.
    Not quite as obvious as a change, but it worked for us.

  • Link between Plant and Profit Center

    Hi,
    Can any one let me know how to derive profit center for a plant or where this info is stored.
    thanks,
    preetham s

    Hi
    There is no direct relationship between a plant and profit center. Based on your configuration in the system, however, you can have various relationships. For eg, if your plant is one valuation arrea, there is a relationship for various cost center and cost elements at the valuation area level in T Code OKB9. In such a case, every valuation area relates to a plant and profit center derives the data for a plant from the cost center and cost element combination. Another way could be through the material master, where, for every plant view, you can assign a profit center. Another way of looking things could be a scenario, where every plant is also a profit center. In such a scenario, in EEC 6.0, you can draw Financial Statements also at Profit center level.
    Thanks & Best Regards
    Sanil K Bhandari

  • Change Cost Center Valid To Date

    Hi,
    I want to change cost center valid To date. Please let me know which t code I use for that. Thanks in advance.
    Thanks & Regards,
    Hemant Maurya

    Hi,
    You can change cost cener validity by creating new cost center through t.code KS01 with reference to same cost center.
    Ex. suppose you have created cost center 5009000000 from 01.07.2005 to 30.06.2006. Now you want the same cost center to be created from 01.07.2006 to 31.12.2009.
    So, Go to KS01 and put this CC code and Valid From to To Date as 01.07.2006 to 31.12.2009. Also put same CC code with CO area in reference. The same CC will be created with all required information. Also If profit center is required field in your CC, then first of all you need to extend your profit center through KE52 t.code.
    Pls get back for further query.
    Thanks & Regards,
    Taral Patel

  • Book cost to WBS and Cost Center

    Hello All,
    TEST SYSTEM
    I post cost to WBS ( 5150 real ) and cost center (1001 real). The wbs 5150  is assign to cost center 1001.
    I do not have validation and subs.
    The system allow me to book cost to both cost object (WBS/Cost Center)
    How does the system recognize this.
    To my knowledge even though you booked cost to both cost object the system will automatically make wbs as statiscal.
    Is this correct ?
    Please advise
    Thanks
    bali

    Hi,
    If your WBS is not defined as statistical in the master data, then booking to WBS and cost centre, will create statistical posting to cost centre and not to WBS.
    Regards,
    Eli

  • Cost center validation while creating PO

    Hi,
    How can we put a cost center validation in PO.
    we are experiencing issues with PO's created for a different company code at the time of posting invoices.
    how can we put a check while creating a PO to validate the cost center.
    Can we put a check on User authorization to input only come cost centers at the time of PO creation?
    Highly appreciate your thoughts as it is very important.
    Thanks
    Madhu

    Hey Madhu,
    I believe certain error messages have been deactivated in you system, as the cost center master data wouldd have a company code in it and it is supposed to validate it.
    go to OBA5 and enter application are KI and activate message 113 to an error
    KI113 would not allow you to purchase across company codes

Maybe you are looking for

  • "Open Link in New Tab" doesn't remember first page in history

    I recently noticed that the "Open Link in New Tab" is not remembering the very first page in the tab history. The replication is simple. # Go to any page (Google works well) # Right click and chose to open a link on the page in a new tab # On the new

  • No stereo recording

    After weeks of futility with everyone blaming everyone I finally got hold of someone through the Toshiba Depot number who would admit that there is nothing that can be done to make my M305 record a stereo wave file. Its monaural recording from extern

  • Asset PO made wrongly(controls)

    Hi friends, I see lot of Asset PO's being made as regular PO's and during MIGO the items goes to stock. What is it in a PO by which we can force the user to type "A" in Account assignment category. I had seen one option as "Purchase Type" when user s

  • How can I handle REP-0108 error

    I have a column in my database that contains the name of an image file. I created a field on the report for this column, with the 'Read from File' set to Yes and the format set to 'image'. The problem is, that the database contains file names that po

  • Window 7 on macbook pro not recognising external hard drive

    Hello I have windows 7 installed on my macbook pro.My new external hard drive,western digital black caviah 2.5' 1tb with cradle is not recognised.I want to use it to back up my windows side of my macbook pro.Does anybody have any ideas? Thanks John