Prob in updating profit&cost centers while useing  'BAPI_GOODSMVT_CREATE'

I am using FM 'BAPI_GOODSMVT_CREATE' , and i am passing below parameters
header info...
        wa_goodsmvt_header-pstng_date = wa_gi-budat.
        wa_goodsmvt_header-doc_date = wa_gi-budat.
        wa_goodsmvt_code = '03'.
item info....
        wa_item-material   = wa_gi-matnr.
        wa_item-plant      = wa_gi-werks.
        wa_item-stge_loc   = 'SL01' .
        wa_item-move_type  = '201'.
        wa_item-entry_qnt  = wa_gi-qty.
        wa_item-entry_uom  = wa_gi-meins.
        wa_item-costcenter = wa_gi-kostl. <==
        wa_item-profit_ctr = wa_gi-prctr.    <==
        wa_item-mvt_ind    = space.
        APPEND wa_item TO it_item.
          CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
          EXPORTING
            goodsmvt_header  = wa_goodsmvt_header
            goodsmvt_code    = wa_goodsmvt_code
          IMPORTING
            materialdocument = v_mat_doc
            matdocumentyear  = v_doc_year
          TABLES
            goodsmvt_item    = it_item
            return           = it_ret.
        IF sy-subrc = 0 AND v_mat_doc <> ''.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
          WRITE:/ 'Good Issue',v_mat_doc.
        ELSE.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
        ENDIF.
data is passing to FM is absolutely fine , problem is after generating document number , if observe profit center and cost center are not updating properly , it is showing material profit center and cost center.....
but it should take and update profit center and cost center which i have passed . what is the solution??

ok

Similar Messages

  • Error while using BAPI_GOODSMVT_CREATE wiht movement type 311.

    Hi All experts,
    i am geting error msg, while using BAPI_GOODSMVT_CREATE wiht movement type 311.
    the error msg is " For reservation 0000443815 0000, no movements can be posted".
    Here is my code.
    IF I_ZMM_S_MBIB_LOT[] IS NOT INITIAL.
    *moving posting date and document date  to header
        GOODSMVT_HEADER-PSTNG_DATE = ZMM_S_MBIB_311-BUDAT.
        GOODSMVT_HEADER-DOC_DATE   =  ZMM_S_MBIB_311-BUDAT.
        LOOP AT I_ZMM_S_MBIB_LOT WHERE MENGE NE '0'.
          IF I_ZMM_S_MBIB_LOT-IND = 'X'.
    *moving material and plant ,stge_loc,qty and movement type  to header
            GOODSMVT_ITEM-MATERIAL       = I_ZMM_S_MBIB_LOT-MATNR.
            GOODSMVT_ITEM-PLANT          = I_ZMM_S_MBIB_LOT-WERKS.
            GOODSMVT_ITEM-BATCH          =  I_ZMM_S_MBIB_LOT-CHARG.
            GOODSMVT_ITEM-STGE_LOC       = I_ZMM_S_MBIB_LOT-SLGORT.
            GOODSMVT_ITEM-MOVE_TYPE      = '311'.
            GOODSMVT_ITEM-ENTRY_QNT      = I_ZMM_S_MBIB_LOT-MENGE.
            GOODSMVT_ITEM-ENTRY_UOM      = I_ZMM_S_MBIB_LOT-MEINS.
            GOODSMVT_ITEM-MOVE_MAT       = I_ZMM_S_MBIB_LOT-MATNR.
            GOODSMVT_ITEM-MOVE_PLANT     = I_ZMM_S_MBIB_LOT-RWERKS.
            GOODSMVT_ITEM-MOVE_BATCH     = I_ZMM_S_MBIB_LOT-UMCHA.
            GOODSMVT_ITEM-MOVE_STLOC     = I_ZMM_S_MBIB_LOT-UMLGO.
            GOODSMVT_ITEM-RESERV_NO      = I_ZMM_S_MBIB_LOT-RSNUM.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
            EXPORTING
              GOODSMVT_HEADER               = GOODSMVT_HEADER
              GOODSMVT_CODE                 = '04'
          TESTRUN                       = ' '
          GOODSMVT_REF_EWM              =
            IMPORTING
          GOODSMVT_HEADRET              =
              MATERIALDOCUMENT              = MATERIALDOCUMENT
              MATDOCUMENTYEAR               = MATDOCUMENTYEAR
            TABLES
              GOODSMVT_ITEM                 = GOODSMVT_ITEM
          GOODSMVT_SERIALNUMBER         =
              RETURN                        = RETURN.
          GOODSMVT_SERV_PART_DATA       =
          EXTENSIONIN                   =
        ELSE.
    Moderator message: duplicate post locked.
    Edited by: Thomas Zloch on Feb 23, 2011 11:46 AM

    Hi Sachin,
    Pass the Item Number of Reservation to GOODSMVT_ITEM-RES_ITEM .
    Regards
    DKS

  • Report for cost centers when using MVT 261

    Guru's,
    Most of the request for material for our storerooms are done through a work order and issued out using MVT 261. We're trying to find a report that shows the cost centers used when using MVT 261. I've tried using MB51 and MVT 261 but no cost centers populate. When I use MB51 and MVT 201 for reservations created manually there's no problem, all cost centers are populated.
    Thanks
    Eric

    Hi,
    The movement 261 is for Issue to Order & no issue to Cost Center, hence you have the problem.
    You will get only the order number is case of 261.
    Regards,
    Prashant

  • Capturing Excise values while using BAPI_GOODSMVT_CREATE

    Hi,
        I am able to successfully create the GR using BAPI_GOODSMVT_CREATE taking PO as the reference but unable to capture the excise values.
       I am trying to use BAPI_EXCINV_CREATE_FROMDATA to capture excise values but without success.
      I have already checked the forum but have not found any suitable answer.
      pls guide me through this....
    murali.c
    Edited by: murali ch on Nov 25, 2009 4:24 AM

    Hi Murali,
    Could you Let me know how you sort out this issue. I am facing a similar problem.
    I created the Goods movement for MIGO with 101 and I am trying to post excise details with the bapi
    BAPI_EXCINV_CREATE_FROMDATA,
    The Return messsage are zero but its actually not posting to excise tables.
    Regards
    Aromal R

  • Data not updated in the excel while using Live office

    Hi all,
         I have a Trial balance Crystal report in BOE and have created a Live Office document connecting that report. Now I've imported that document to the Xcelsius environment.
       In Xcelsius a Filter component having the YTD values as the Labels and its destination is bound to the cell having input to the Crystal report of the Live Office document. Now in the Preview mode when I change the select the year its corresponding data should be displayed in the Chart but unfortunately that's not that case. But when I change the year in Non Preview mode
    the data is getting updated.
    What could the error ?
    Thanks
    John

    Thanks Senthil, its working!!
    But its taking lot of time for the data to get updated in the chart upon changing the year. Is there any way to speed up the process ?
    Thanks
    John

  • Error while using BAPI_GOODSMVT_CREATE

    Hi friends,
                    When I do a 301 movement from MIGO transaction using BAPI BAPI_GOODSMVT_CREATE ..  I m getting an error "The plant material data is locked by the user".. Can you help me out to solve this and post the goods movement.. it is very urgent requirement... Will reward points for helpfull answers,
    Thanks in advance,
    Rama..

    Hi ,
    Check the Following :
    Is your material is being edited by some user via MM02 etc.
    Can you try calling the BAPI FM in Background task ? I guess that might Solve the problem ?
    <b>REWARD IF USEFUL</b>
    Regards,
    Saket Sharma
    null

  • Multiple cost centers postings in RE-FX.

    Hello everyone!
    We are currently implementing SAP Flexible Real Estate solution to manage the company's properties. We are facing some problems regarding the distribution of rental costs among multiple costs centers. Our scenario is basically this (example):
    1)In our usage view we have one building with three rental spaces connected to it. Each rental space has different area-measurements and represents different segments in our company (with a specific cost-center associated to it).
    2)The company doesn`t own the building, the structure is rented from a person outside the organization. In this case we`ve created a Commercial lease-in type of contract (external contract, where the company is the user of the object).
    3)This contract contains the three rental spaces mentioned above, and we've configured the contract condition to distribute the rental costs among these objects based on the area measurement.
    4)When we perform transaction RERAPP for this contract to pay the vendor we`ve noticed that even though the costs where divided among the objects, the cost-centers were not updated.
    Considering that the contract doesn't have a cost center field in it and also considering that we have to update multiple cost-centers (with a distribution criteria based on measurements), we would like to know if someone have this kind of problem before?
    We are using an older version of the SAP System(4.7) that doesn't offer as many options as more recent versions (such as 6.0)
    Thanks a lot!
    Gizele Bueno

    Hi,
    In this case, instead of Cost centres, Real estate Objects will act as the Cost carriers. No need for Cost centres at all.
    Since the Real Estate Objects master data contain Profit centre field, the values posted to Real estate Objects will be automatically carried to the Profit centres as well.
    During Periodic processing of Real Estate Contracts, the system will automatically post to the Transfer and Posting. During transfer posting values will be posted from Real Estate Contract to the Real estate Object.
    You can track costs and revenues through Real Estate Objects directly, No need for Cost centres at all.
    Thanks
    Siva

  • Unable to update profit center or plant code in the customer line item

    Hi,
    We require the profit center and plant code and division in FI
    documents (Posted through billing document or through direct FI entry)
    We are unable to input plant or profit center in the customer line item
    while using F-21 or any other FI transaction
    The plant and profit center is not appearing even in customer line item
    in RV document (From SD billing)
    We have made the Field status group as optional for the reconcilation
    accounts.
    Regards
    Sembian

    Hi
    Profit center / cost center are generally entered in revenue & expense line items (P&L items). Customer / vendor master and line items are balance sheet items which will not show profit / cost centers.
    Regards
    Neeraj

  • Profit/Cost center best practice

    Hi,
    I'm looking for some best practice document on how to setup properly profit/cost centers for a manufacturing company. I'm thinking at a very simple manufacturing company which purchases some raw materials and manufactures and sells some finished goods.
    Any advice on that?
    Thanks!
    Fabio

    Hi ,
    check below links:
    https://websmp101.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700002498432003E
    https://websmp201.sap-ag.de/~sapidb/011000358700000760832007E/CW34_FIN_Profit_Centers.pdf
    Thanks,
    Neetu

  • Is there any SAP Standard programe to posr cost centers in LSMW

    Hi
    Is there any Direct input or Batchinput programe to load cost centers
    by using LSMW

    No. Also a note that these tables store data in a different way. Meaning that if say for a material , period and plant combination (primary keys of tables) the value of stock has not changed then there will be no entry in these history tables. So usually you would need to write a Function module to read these tables and populate values accordingly for BW reports to make sense.
    Hope this helps.

  • Probs during creating cost centers

    Hi CO Gurus,
    today i have 2 questions:
    1. I m creating cost centers in my ides system. i ask me to run V8J: Maintain Cost Center Hierarchy first. can anyone tell me when should i run this.
    2. when i creating cost centers using ks01, it reports Controlling area XXXX does not have a standard hierarchy (please assign one).
    3. when i was creating the standard hierarchy,  it said You have not yet created a cost center standard hierarchy for COAr IDCN
    can anyone guide me how to fix this prob.
    any response will be awarded.
    thanks
    samson

    For creation Cost Center, Creating of  controlling area in OKKP and creation of noranges for Controlling docs under Groups In KANK is required. But whenever you require assign Profit center to Cost Center then only you can create Profit center group under Hierar key under KCH1 later create profit Center in KE51 and assign it in Cost Center.But it is not mandatory to create Cost center. while creating cost center it gives worning message to remember you about non assingmet of profit center if you ignore it with pressing enter then cost center is allowed to create.
    assign points in the way of say thank.
    Regards,
    NSB

  • Profit centers and cost centers - language maintenance

    Hi!
    We have an SAP environment running where three countries use local languages and the fourth one uses English, also most people working centrally with the system uses English. Also the hierarchies are exported to BI from the English language version of the system. Thus we have a need to maintain names of hieararchy nodes and profit centers/cost centers in several languages.
    Is there any easier way to do this than logging in to all relevant language versions (usually one local and English) to maintain these? Is there some setting that makes it enough to maintain in for instance the English version and it updates all the other languages?
    Best regards,
    Jan Pettersson

    Not really the answer I was hoping for
    it's business side users in each country maintianing the hieararchies and PC/CC... so LSMWs and imports and exports is unfortuntantely not the best of options.
    Hoping for someone else with a similar situation with additonal ideas.

  • Issue in updating Cost Centers for Employees

    Hi All,
    1.     Is it necessary that infotype 0000 & 0001 needs to be in synchronization i.e. both the infotypes should contain same no. of records?
    2.     Is it necessary to assign cost center to both the position and the employee in infotype 0027 for Payroll purpose or either of one assignment is sufficient? What is the purpose of assigning cost center to a position & cost center to an employee in infotype 0027
    3.     We have assigned cost centers to positions & all the employees via infotype 0027. Now I have a situation that the company has created new cost centers as per their business line with effect from Jan 2011. How do I update these new cost centers to position as well as all the employees?
    If I assign new cost center to all the positions thru PO13 from 01.01.2011 than system delimits the record in infotype 0001 so now there is 1 record in infotype 0000 & 2 records in infotype 0001. For example an employee is hired on 01.03.2009 with cost center A assigned to his position & in infotype 0027. Now if I assign new cost center B to his position than the system delimits hiring record in infotype 0001. So now there are 2 records in infotype 0001 i.e. 01.03.2009 to 31.12.2010 & second is 01.01.2011 to 31.12.9999. If I do the assignment of new cost centers only in infotype 0027 then system posts the payroll result to old cost center rather than new cost centers. How to resolve this issue?
    Regards,
    VG

    1. Yes. It should be. But in your case this is an exception. It will still work even if the 0000 and 0001 don't have the same number of records.
    2. You should only use it0027 if an employee is charging costs to two or more cost centers. You can define here the cost centers where they are charging and the percentage of division between cost centers
    If you dont have scenarios like this, DO NOT use this infotype.
    For assignment of cost centers to employee (Infotype 1) or to positions (via PO13). You should only use one method. If you are assigning the cost center manually in IT0001 during hiring then you don't need to enter the cost center in the positions.
    If you are entering the cost center in the Positions objects, then configure the system so that everytime you do hiring actions (or maintain infotype 1) the cost center assigned to the position is inherited in the infotype 1's cost center field.
    Don't assign it to both Infotype 1 manually and the position at the same time, using this method, you'll eventually have data inconsistencies.
    For you issue regarding the delimitation of the IT0001, this is ok. This is standard, the infotype 1 is delimited since you have a new cost center assignment for the succeeding period.  You don't have to create an Action record since there was no employee movement, only change in cost center assignment. (which is the purpose of the Action infotype-- to record employee movement)
    It won't mess with your payroll, your infotype 1 just have an extra record.

  • 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 Prikockis

    Hi 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

  • Is it possible multiple line items debit & single line item credit and different cost centers and different profit centers in fbcj

    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

Maybe you are looking for