Profit center for PM order

I want to overwite the Profit center of PM order , which is getting derrived from the cost center assigned to the work center.
Is it possible from Substitution or any standard user exits.
Regards
Ranjan Kumar

Hi Steven,
                    what you have checked the user exits are the avialble user exits for IW31.
Then try with BADI IBAPI_ALM_ORD_MODIFY
You can capture any data in the transaction that is available in the stack during run time in the user-exit.
The below is the sample code.
FIELD-SYMBOLS: <FS> TYPE ANY.
DATA: FIELD(30) VALUE '(SAPMV56A)VTTK-TKNUM'.
ASSIGN (FIELD) T0 <FS>.
Read the below weblog for more help.
/people/brad.williams/blog/2005/04/25/userexits--how-do-i-access-inaccessible-data
<b>Reward points</b>
Regards

Similar Messages

  • Profit center for purchase order without account assignment

    I've requirement to include profit centers in purchase orders without account assignment category.
    The trouble is when there is no profit center maintained in material master.
    Is there a way to determine profit center in purchase order for such cases?

    Dear Abinash,
    Define substitution in GGB1 at line item level as shown below:
    Prerequisite : BSEG-WERKS = Maintain plant
    Substitution : BSEG-PRCTR = maintain profit centre as constant value
    After define it, assign to the co.code.
    Regards,
    Mukthar

  • Profit center in sales order .... WRT to Distribution channel

    Dear Folks,
      Here is a strange requirement to my client...based on distribution channel profit center needs to be derived in sales order  needs solution in  Standard SAP if available...typical example Mat X serves from 3 Distribution channels.....3 different profit centers needs to be derived in sales order based on DC ....I suggested the Substitution rule in FICO...but client is denying that....he  needs solution in SD only..if there is any wayout please let me know .
    Best Regards,
    SGR

    hi
    Defaulting PC from the material master is just one of the ways that SAP can do it, but since I can't currently remember anything about PCA I can't tell you what the others are!
    However, I did find the following documentation which looks to be the "standard" way of doing what you want. This is the IMG documentation of transaction 0KEM (menu path SPRO-Controlling-- Profit Center Accounting-- Assignments to Profit Centers-- Sales Orders-- Sales Order Substitutions).
    Define Substitution Rules
    In this activity you define substitution rules for finding the default profit center for sales order items. It makes sense to use substitution rules if the profit center proposed from the material master does not meet your requirements.
    Example
    You want to use a sales office or a distribution channel as a profit center.
    Standard Settings
    No predefined substitution rules exist.
    Activities
    Proceed as described under Maintain Substitutions in Customizing for FI-SL Special Purpose Ledgers. The following are predefined in
    Customizing for Profit Center Accounting:
    o The application area (Profit Center Accounting)
    o The callup point (Create Sales Order)
    o The field to be substituted (Profit Center)
    You can substitute the profit center with a constant value or by assigning a table field. It is also possible to use a user exit.
    Additional Information
    For more information on substitution rules, see the documentation for Financial Accounting on the component "FI-SL Special Purpose Ledgers" (in the chapter "Basic Functions"). Also, read the notes in the online documentation under Financial Accounting -> Special Ledgers ->Validation and Substitution -> Substitution.

  • How to update "profit center for billing"(VBAP-PCTRF) for sales order.

    Now, we need to bring "profit center for billing" in sales order to correspondence with meterial master, while BAPI "BAPI_SALESORDER_CHANGE" contain not this field, is there any way to achieve except modify database table directly.
    Thanks!

    Hello,
    Pay attention with BAPIs in SAP, they often use different names as input parameters as the actual fieldnames.
    In your example you can use the BAPI BAPI_SALESORDER_CHANGE.
    You have to check the parameter ORDER_ITEM_IN (table) with field PROFIT_CTR.
    This will correspond with the field VBAP-PCTRF that you want to update.
    You will also have to use the table ORDER_ITEM_INX of the BAPI and flag your field (PROFIT_CTR) with an 'X' in order to update it in the database.
    Always use the RETURN (table) parameter from the BAPI to see what the result is of your update.
    Success.
    Wim

  • How to change the Profit Center in Sales Order

    Hi Gurus,
    Previously they setted the profit center (YB999) in sales order, now i want to change the profit center and need to give the amount into this profit center 100500.
    So, could you guide me how to change the profit center in sales order.
    Thank you for your replies.....
    Thanks & Regards,
    Chandrababu.B
    Edited by: Chandrababu Naidu on May 25, 2011 12:44 PM

    Hi
    If this SO is processed partially - i.e. transactions happened - You cant change it
    You can use ABAP and change it in Debug mode, but not advisable... Better to short close the SO and open a new SO for Balance qty
    br, Ajay M
    Edited by: Ajay Maheshwari on May 25, 2011 5:10 PM

  • Change the Profit Center in Sales Order line item's Account assignment tab

    Hi Gurus,
    I need to change the Profit Center at Sales order Line item in Account Assignment Tab. Currently  The Profit center is coming from Material Master for the Line Item's Material as default but I have to change / overwrite  that.
    Can any body provide me how can i achive that means
    Any User exits, substitution or any thing ?
    I tried MV45AFZZ but i am not able to find out the right place where I can change COBL-PRCTR.
    Sony

    Hi
    There is perform which moves the values to VBAP field.
    This PRCTR field is stored in VBAP (i.e., SO line item table)
    USEREXIT_MOVE_FIELD_TO_VBAP
    Hope it works.
    VVR

  • User exit to populate profit center in production order change (CO02)

    Hello,
    The requirement is to populate the profit center in production order change (Tcode CO02). I know the user exit that can populate profitcenter in CO01 but it's not called in CO02. Ther other user exits that I found are for checking but not for changing
    Is there a user exit /BADI that can acheive this requirement?
    Thanks a lot for your advise.
    Joe

    Hi,
    Use the user exit PPCO0007 ,function module EXIT_SAPLCOZV_001
    HEADER_EXP-PRCTR
    Thanks,
    Shailaja Ainala.

  • Copying Profit Center from sales order to Purchase order

    Hi Champs,
    Please let me know if anyone has implemented this scenario of copying profit center from sales order to purchase order and then to goods receipt.
    Thanks
    Pirzada

    Hi,
    Profit center flows from material master to other documents such as PO,SA GRN and MIRO.Please let me know what are you looking for?

  • BAPI_PO_CHANGE me22n add profit center for purchase requisition number

    Hello all,
    I have to add an item line for a specific sales order( p_vbeln ).
    for that i use BAPI_SALESORDER_CHANGE and it works and the item is inserted.
    ( p_posnr = sales order item and ln_etnr = schedule_line = 1 )
    Now I have to maintain the specific po item line and to insert the Profit Center related to the Purchase Requisition Number that was assigned to the above sales order item like using transaction ME22N.
    when i use the transaction all i have to do is to ADD the Purchase requisition number to the PO Order Number and to add the PROFIT CENTER.
    for this i use BAPI_PO_CHANGE.
    i colect the folowing data:
    from table VBFA( vbelv = sales order number vbeln = l_ebeln)
    PO Number = p_ebeln.
    from table VBEP ( vbeln = sales order number, posnr = the previously inserted sales order item )
    Purchase Requisition Number = l_banfn
    Purchase Requisition Item = l_bnfpo
    from table VBAP (vbeln = sales order number, posnr = the previously inserted sales order item )
    Profit Center = l_prctr
    from table EKKN
    select max(  ebelp )
    from ekkn
    into l_ebelp
    where ebeln = l_ebeln.
    add 10 to l_ebelp
    Purchase Order Item = l_ebelp .
    and i move the data:
      i_t_poitem-po_item = l_ebelp.
      i_t_poitem-preq_no = l_banfn.
      i_t_poitem-preq_item = l_bnfpo.
      i_t_poitem-acctasscat = cc_x.
      APPEND i_t_poitem.
      i_t_poitemx-po_item = l_ebelp.
      i_t_poitemx-po_itemx = cc_x.
      i_t_poitemx-preq_no = cc_x.
      i_t_poitemx-preq_item = cc_x.
      i_t_poitemx-acctasscat = cc_x.
      APPEND i_t_poitemx.
      i_t_poaccount-po_item = l_ebelp.
      i_t_poaccount-itm_number = p_posnr.
      i_t_poaccount-SCHED_LINE = ln_etnr.
      i_t_poaccount-profit_ctr = l_prctr.
      APPEND i_t_poaccount.
      i_t_poaccountx-po_item = l_ebelp.
      i_t_poaccountx-profit_ctr = cc_x.
      APPEND i_t_poaccountx.
    then i use the function BAPI_PO_CHANGE:
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          purchaseorder                = p_ebeln
          testrun                          = l_test
       TABLES
         return                            = i_t_return_po
         poitem                          = i_t_poitem
         poitemx                        = i_t_poitemx
         poaccount                    = i_t_poaccount
         poaccountx                   = i_t_poaccountx.
    BUT i get the folowing result ( messages in return table)
    Insert item for PO-order                                                                               
    Message:  Changing of PO using Enjoy BAPI unsuccessful ;                                                
      Message:  Purchase order item 00120 still contains faulty account assignments ;   
      Message:  Enter Profit Center ;                         
    what should i do?
    best regards,
    emilia

    hello,
    i debugged the function.
    first the data from poaccount is copied in lt_account.
    then this happens:
      PERFORM get_current_data
          TABLES    poitem               poschedule               poaccount
                    pocondheader         pocond
                    extensionout
                    poexpimpitem         allversions              popartner
                    potextheader         potextitem               return
          USING
                    l_po                 lf_header_currency
          CHANGING
                    expheader            exppoexpimpheader.
      exppoexpimpheader = poexpimpheader. "foreign trade export workaround
    after this form is executed poaccount-profit_ctr is empty.
    lt_account-profit_ctr in not empty but then it is not anymore.
    in the form this happens:
    item data
      CALL METHOD im_po->get_items
        IMPORTING
          ex_items = lt_items.
      LOOP AT lt_items INTO an_item.
        l_item ?= an_item-model.
        CALL METHOD l_item->get_data
          IMPORTING
            ex_data = ls_mepoitem.
        ls_mepoitem-ebeln = ls_header-ebeln.
        APPEND ls_mepoitem TO lt_item.
    schedules
    accountings*
        CALL METHOD l_item->get_po_accountings
          IMPORTING
            ex_accountings = lt_accountings.
        LOOP AT lt_accountings INTO an_item.
          l_accounting ?= an_item-model.
          CALL METHOD l_accounting->get_data
            IMPORTING
              ex_data = ls_mepoaccounting.
          ls_mepoaccounting-ebeln = ls_header-ebeln.
          APPEND ls_mepoaccounting TO lt_account.
        ENDLOOP.
    item conditions
    foreign trade (item data; EIPO)
      ENDLOOP.
    so it acctualy copies every item from purchase number ebeln in lt_item.
    for each one of them it copies the account data into lt_account.
    so the last loop is for the item that i want to enhance.
    here it copies all the necessary data in lt_account except of course the profit center because that's the one that i need to insert.
    after this loop there is a form:
      PERFORM move_account_out TABLES lt_account
                                                                ext_poaccount
                               USING  header_currency.
    where the ext_poaccount is the poaccount parameter.
    this form:
    clears ext_poaccount.
    copies the data from lt_account into ext_poaccount.
    and returns the ext_poaccount with the empty Profit center field
    and so after performing get_current_data my parameter is deleted.
    then it's almost the end of the function and nothing else related to the poaccount parameter.
    so it's no use for me to insert the field Profit_Center?
    is there another FM that i should use to be able to insert the profit center?
    what should i do?
    Best regards,
    Emilia

  • Substitution for profit center for credit line item

    Hi
    There is some common material sold in two segments. (Example head phone is sold from cell phone segment and computer segment). These segments are created as a division also for SD purpose.
    Now for determining the profit center, i am using the validation rule. Logic: if the division in sales order is cell phone, entry should be posted in cell phone division. So my revenue and PGI will be in cell phone segment.
    When head phone was procured, it was procured in computer segment (division). So my inventory credit should be the posted to computer segment (via profit center) and consumption should be posted to cell phone division (for matching with revenue). Hence i want some substitution rule for posting to two different profit center ( or segments, determined by profit center) at the time of PGI. Debit (consumption) should be to the profit center for cell phone and credit (inventory posting) should be to profit for computer.
    Please help.
    Edited by: Meenu_ND on Jun 23, 2011 8:02 PM

    Hi
    In an ideal scenario, profit center is derived from material master. Since, your business is such that profit center is nto known as unique for a material master, try using the following BADI to derive profit center at the time of Goods movement document. You should not maintain profit center in material master in such a case.
    MB_MIGO_ITEM_BADI
    MB_MIGO_BADI
    Regards
    Sanil Bhandari

  • Re:assign profit center to a order type

    hi gurus,
    good morning to everybody,
    i have a question i have 1000 materials in my organization using by 5 company codes in that few material i need to assign profit center so i went to mm change and assigned the profit center for sales:general/plant and plant data/stor.2, if i want to assign profit center to order type how can i assign, if i cannot assign in order type i need to assign profit center in mm change for 500 materials, so if i change manually in mm change for 500 materials is it going to effect for the other company code when they post the transactions please give me your opinions.
    thanks in advance and points will be assign for useful answers.
    kumar.

    Dear Kumar
    You cannot assign the Profit Center to Sale Order type.  Whatever you maintain in Material Master, that will flow automatically in sale order as and when you create. 
    If you want to change the profit center in material master in bulk, you can do so via MASS.  In fact for sale order also, you can achieve this via MASS but no partial delivery should have been made against that sale order.  In case, you have already made partial delivery, then the field would become grey and you cannot change the same.
    thanks
    G. Lakshmipathi

  • Profit Center for Billing Substitution

    Hello,
    I am currently using this substitution in 0KEM to populate the profit center for billing (PCTRF) in an inter-company sales order.
    PrCtr Type = '2' AND Profit Center = '' AND (
    Sales Org. = '5010' OR Sales Org. = '5020' )
    It is working because the profit center for billing (driven by PrCtr Type = '2' ) field is originally blank and so I can substitute in a different profit center value.
    My question is I would like to take this a step further and substitute different profit centers in the profit center for billing field (PCTRF) based on the value in the profit center field (PRCTR).  Has anyone had any luck with this?  I see that is is controlled using the PRCTR_TYPE 1 and 2 in the PCASUB area, but I am yet to figured out the right combination for it to work.
    Appreciate any help.
    Kevin

    Kevin,
    Refer to SAP Note 815972 - PCA substitution for cross-company-code sale.. It gives the details on how to fill the two fields "Profit Center" and "Profit Center for Billing within the substitution.
    Thanks
    Venkata Ganesh Perumalla

  • Change profit center for accounting document on item line

    HI
    I need to change profit center for accounting document on item line, for that purpose I have used user-exit EXIT_SAPLV60B_004, but my new profit center gets latly overwritten in FM CO_DOCUMENT_CHECK (which is called from FM AC_DOCUMENT_CREATE). It gets overwritten from COBL. Is there any way to solve this?

    HI,
    possible reasons are :
    In GR document profit center pulled from PO Material :
    If you have ordered with material code, must check profit center assigned into material by mm03/Plant Data2
    If you have ordered without material code, than check cost center assigned Profit center by 1KE4

  • DBM Order - Assign Profit Center By DBM Order Type

    Hi SAP Gurus,
    I have new requirement from my user to have different Profit Center by DBM Order Types.
    Currently, we only have One profit center for all DBM Order types.
    The DBM Order type that we are using is :-
    1. Counter Sales (DBM Order Type 1000)
    2. Service Order (DBM Order Type 2000)
    3. Insurance (DBM Order type 2001)
    purpose new profit center
    1. Counter Sales (DBM Order Type 1000) - Profit Center MMXX-11000
    2. Service Order (DBM Order Type 2000) - Profit Center MMXX-11001
    3. Insurance (DBM Order type 2001) - Profit Center MMXX-11002
    the requirement is, when user choose Order type 1000 Counter sales, the System will use profit center MMXX-11000,
    if the user select Insurance Order Type 2001, system will use profit center MMXX-110002.
    is there any Substitution involve in this configuration ?
    is there any others configuration need to be configure ?

    Hi Fairulnizam,
    You need to add the field order type & define the sequence number in the table of the configuration & then use table maintenance generator to generate the maintenance view
    Once generated you will be able to maintain Profit center at the order type level along with the other standard criteria.
    Other option to generate another table in the sequence to make it generalized at order type level if the first table criteria is not met.
    Regards,
    Sachin Balmiki

  • Default profit center in sales order line item level

    Hi Experts,
    In creation of a sales order, I want to default the profit center for every line item in the order depending on some logic. How do I go about it.
    Warm Regards,
    Abdullah Ismail

    Hi,
    You would need to implement a user exit:
    try this user exit :
    USEREXIT_MOVE_FIELD_TO_VBAP
    Use this user exit to assign values to new fields at sales document item level. It is described in the section "Copy customer master fields into the sales document".
    regards,
    Advait

Maybe you are looking for

  • Open File from PL/SQL

    Problem: Can not specify path to read a file from stored procedure. Potential cause: Improper configuration Description: I have created a procedure that opens a tab-delimited file, reads it, and inputs it into the database. In the procedure I specify

  • Load balancing in Tuxedo 9.1 and RAC

    Hello to all, I have some doubts on the way of balancing load in tuxedo 9.1 and RAC (Oracle 10gR2). Before, without RAC our configuration was the following one: GRP_A: service A001, service A002 GRP_B: service B001, service B002 Both groups were atta

  • How to Call Oracle Form From Oracle ADF

    Hi All, Version - Oracle Jdeveloper 11.1.1.5 In Oracle Adf - when i click on Button how to call oracle form? Please help.... Thanks.. Sk

  • Mandatory fields for inbound - idoc  HRMD_A07

    Hi All, I need to create an Employee master record in R/3 by triggering an idoc . i came to know ,i can use "HRMD_A07" . can any one help me giving the mandatory datas to  trigger the HRMD_A07. Thanks & Regards, Arun

  • Where did my url toolbar go on Safari on Mavericks?

    How do I get it back? Why did it disappear in the first place? I'm on 10.9.2 and this is a white macbook from 2009.