Change Material Number using BAPI_PO_CHANGE, PO OrderUnit reset to base UoM

Hi Experts,
I am using IDOCs and BAPI_PO_CHANGE to update PO's in SAP (as PO's are created/maintained in an external system and interfaced to SAP). This works fine except for a change in the material number, the PO Order Unit is getting reset to the Base UoM of the Material Master and not the value from the BAPI(BAPIMEPOITEM-PO_UNIT).
we are passing the following for BAPI_PO_CHANGE.
POHEADER
POHEADERX
POITEM-PO_ITEM = '1000'
POITEM-MATERIAL = 'MAT_B'
POITEM-PLANT = '3001'
POITEM-STGE_LOC =  '1000'
POITEM-QUANTITY = '100.00'
POITEM-PO_UNIT = 'SET'
POITEM-ORDERPR_UN = 'SET'
POITEM-PO_ITEM = '1000'
POITEM-MATERIAL = 'X'
POITEM-PLANT = 'X'
POITEM-STGE_LOC =  'X'
POITEM-QUANTITY = 'X'
POITEM-PO_UNIT = 'X'
POITEM-ORDERPR_UN = 'X'
Say for the example above if the existing PO values are
Material = MAT_A
Quantity = 100.00
PO Order Unit = SET
after update from BAPI the values are
Material = MAT_B (is getting update from BAPI fine)
Quantity = 120.00 (recalculated based on base UoM)
PO Order Unit = PC (resets to Base UoM and does not take value coming from BAPI?)
The above is for PO's where there is no Purchase Order History yet, i.e., PO just created and then ammendment is coming thru.
Would really appreciate any help/advise on this.
Thanks so much.
Sneha

I have tried in ME22N and am able to change the material number and then PO unit to a specified unit (other then base) and save the PO ok.
The variable order unit is allowed and we can create PO's in any unit (other then base UoM) and its working ok as well.
Any other reason for the problem I am facing?
Thanks.
Sneha

Similar Messages

  • FM to change material number of equipment

    Hi
    I need to change the Material number of an Equipment. I can do it on IQ03 Edit-> Special Ser.No Function->Change Material Number.
    I need to do this from a program. Does anyone knows which/what FM does this task? Please...
    Thank you.
    Regards,
    Vinod

    Thanks for the tips.  but i need this change to be reflected on the Action Log.
    Please do let me know if there are other FM thanks. I presume there would be a series of FM that helps to this task.
    Still stuck and lost.....need help....
    Regards,
    Vinod

  • How to Change Material number in Accouting Document on ML81N

    Hi,
    I have a requirement to change the Material Number based on the User custom data from the Custom Tab.
    Since Service PO does not contains any material number, so based on the custom tab, we are trying to update the same.
    Using ML81N T-Code.
    Please suggest is there any User Exit or BADI to add or change the Material number in the Accounting Document.
    Regards.
    Praveer.

    You have to update the field BSEG - MATNR from your custom field to see the material number in accounting document.
    There are many exit or badi available for t-code ML81N.. Just find appropriate one by using the document Methods to find Customer/User Exit's & BADi's for a Transaction Code!

  • Changing material number when Process Order is released

    Hello,
    We have a scenario in which the material number of a process order may need to be changed after the process order is released.  We will have both in process and post production inspection types assigned to this order, and both inspection lots are created at process order release.  We also will have a batch number created at process order release. 
    When recording test results in the inspection lot before a process order has been confirmed, the users may identify that the material number should be different.  We would like a way to be able to either change the material number in the process order (and inspection lots).  We know this involves a lot of updates (master data changes to the existing process order and inspection lots).  Currently, there is no way to transfer information to a new material number without receiving product in and performing a usage decision in the post production inspection lot to transfer to a new material number. 
    The client has implemented all modules, except PP (which we are in the process of now).  We know that Variant Configuration would have been the right solution for this, but this is not an option since MM is already implemented. 
    If you have any suggestions, please reply. 
    Thanks in advance.

    Hi Prasobh,
    The exact scenario is as follows:
    1. A semi finished good will be used as a component to produce the finished good.
    2. This semi finished good will have treatments added to it, and quality inspection will be performed as treatments are added. 
    3. Inspections will occur several times as treatments are added.  If during one of these inspections, material is out of spec, and the blend should be transferred to another material number, we need to be able to change to another material number.  To have a customization where material number is changed in all of the relevant PP and QM tables seems risky. 
    This is why we can't really use material classification.  We also do not have the option to use VC bc the MM module is already implemented. 
    Thanks.

  • Changing Material Type using BAPI

    Hi All,
    I am trying to change a material. I able to change many fields of the material  except 'Material Type' using BAPI_MATERIAL_SAVEDATA. 
    Did any one used BAPI_MATERIAL_SAVEDATA or any other BAPIs to change the material type of a material? I do not want to develop BDC for the same as of now.
    Thanks in advance.
    Regards,
    Rama

    Did you use BAPI_TRANSACTION_COMMIT after BAPI_PO_CHANGE.
    Look also at this <a href="http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm">Sample Abap code on BAPI_PO_CHANGE</a>
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          PURCHASEORDER = T_POHEADER-PO
          POHEADER      = T_BAPI_POHEADER
          POHEADERX     = T_BAPI_POHEADERX
        TABLES
          RETURN        = T_BAPIRETURN
          POITEM        = T_BAPI_POITEM
          POITEMX       = T_BAPI_POITEMX.
      READ TABLE t_bapireturn WITH KEY type = c_err TRANSPORTING NO FIELDS.
      IF sy-subrc NE 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = c_x.
      ENDIF.
    Regards

  • How to change material number?

    Hi guruz,
    Is there a way to change the muterial number (eg ABC123 to ABC223)?
    Thanks,
    Utpal

    HI,
    can we clear this up because the thread is becoming confusing with the different viewpoints being expressed (all right in their own way, but still confusing).
    Firstly, you cannot change the material number of a materail master record. This is simply NOT POSSIBLE.
    The 309 movement type that has been suggested will simply move STOCK from one material number to another. Even if this is what you wanted to achieve a 309 is NOT the recommended option for this. The 309 movement is NOT designed to correct errors, it has a VERY specific purpose. It is designed to be used where the material has physically changed somehow without a production process happening. So if you make cheese (or wine etc.). The material matures naturally and even though you have not actually done anything to it, the new cheese (or wine) will change into a saleable product. this is what a 309 is designed for.
    Similarly if a material ages and becomes a lower quality just due to its age, a 309 is appropriate for that purpose because no physical process was involved (it there was a physical process then a PP order should have been used).
    To use a 309 movement to correct an error (such as the wrong material was GRd etc.) is wrong. The accounting postings involved will be corrupted by a use such as this (for example, any value difference will be shown as a gain/loss of profit due to the material improving or degrading and this is WRONG). I
    If an error has occured and the wrong material has been GRd etc. the correct way is to reverse the GR and do it correctlty.
    So please do not use a 309 to corrct errors.
    So the answer is NO you can't change the material number and a 309 is NOT a relevant solution to this situation.
    Steve B

  • Material desc automatically filled when enter material number  using SM30

    Hi all,
    I have  created Z table with fields material number(MATNR) and material description. Iam maintaing table using SM 30 transaction. If  I enter material number  the material description automatically filled when press enter button.
    Is there any solution for this
    Thanks
    Sudarsana

    Hello,
    whenever you create a maintainance for a table an SAP program is generated which will have the name SAPL(name of the function group to which the table is assigned)....you can go directly to the program inside SM30 by clicking on the top menu -> system -> status ->program name and screen number
    inside SM30 go to the screen where you have to see the description(based on 1step and 2step ) and note the screen number and program name
    once you go the program -> go to the particular screen -> and confirm the screen
    inside the PAI or PBO
    write the code :
    if Material number is not initial.
    select and put material description into the screen field for text.
    else.
    clear the value for text in screen field
    endif.
    Disadvantages : whenever you create a new maintainance by using the table maintainance generator the code is over written
    solution:the screen code will be always over written..but inside the SAPL program when you create the PBO/PAI make an include and save it...when regenerating the include will not be over written but you will have to go to the screen flow logic and give the name of the PBO/PAI modules
    A table once finalised will not require regenerating the maintainance again but this is a draw back ...but the solution just provided is the widely accepted and followed one
    Reward if useful
    Regards
    Byju

  • How to change Phone Number used for activation

    Hi,
    just got myself an iPhone and when I activated it via iTunes, it took over my phone number I entered
    in my Mac account (which was my home phone number).
    This number shows now up on iTunes (when the iPhone is highlighted) as "My Number".
    I changed my number in my Mac account profile to the cellular phone number which I use, synched again (even restored the iPhone) but the old number is still shown.
    Is there any possibility to change this entry after activation of the iPhone?
    Thanks for all additional info on this (still an iPhone n00b I am)
    Cheers,
    S.

    You are right,
    it doesn't change anything on the functions itself, it's just hum, let's say "Not good looking:
    I thought that maybe there is an easy way of changing this, but it seems not...
    Anyway, if someone has an idea (maybe I have to call the local Apple Support in France on Monday for asking them though) I would be pleased if you share it with me.
    Cheers,
    S.

  • Change Material Number and unit of measure

    Can we change material code and / or its Unit of measure . Please help

    http://sap-img.com/materials/change-base-unit-of-measure.htm
    Re: change material code
    Change of unit of measure

  • Issue in transporting changed material type using ALE-IDOC

    Hi All,
    I am sending the material master data from one system to another using ALE-IDOC.The issue is that teh material type is not getting sent from one system to another after changing the material type.I mean the changes in material type are not getting updated.I will be indeed thankful if anyone can guide me resolve this issue.
    Thanks.

    Hi,
    Not all the fields that are changed in material master are sent in the Idoc. Material type is one such field.
    Create change pointer on some other field ex. net value or material desc. and transfer the material type changes under it.
    KR Jaideep,

  • Changing Customer number using COPA derivation

    Hi,
    Have a requirement to change the Customer number during PGI and billing in Account CO-PA PSG. Is KEDR derivation good enough for this requirement in Account COPA or should COPA0001 to be explored? I read SAP note # 638097 and looks like, unless this is implemented, KEDR is not effective. Any suggestions or past experience?
    Thanks for your time.

    Hi
    In Acct Based COPA, the PSG is determined at the sale order itself and the same is carried on till PGI and Billing
    Note 1351257 explains how PSG is and can be determined at various stages..
    I think you will have to use some exit in the process either COPA001 or 005
    Also, the note mentioned by you seems relevant to open up the CUSTOMER field for modification
    Regards
    Ajay M

  • Changing Material Number ON BAPI_REQUISITION_CHANGE!!!

    Dear Gurus,
    On BAPI_REQUISITION_CHANGE there is parameter name REQUISITION_ITEMS_OLD, on this parameter there was no item MATERIAL. I want to change this material when doing update (change). How could this BAPI doesn't support MATERIAL when doing update (change) ? Do you have any information about this?  Thx for you help before.

    Hi John,
    I took this part from  BAPI documentation .
    <i>The table contains the purchase requisition item with the changed values.
    For more information on the individual parameter fields, see the data element documentation in the ABAP Dictionary.
    Proceed as follows:
    First enter all values from RequisitionsItemsOld in RequisitionItemsNew.
    Then change the desired field values.
    Ensure that all field that are not to be changed contain the values from the database.
    Note
    You cannot add any new items. The method only supports the changing of already existing items</i>
    Please look for the documentation in BAPI for the other fields.
    Hope this helps
    Regards,
    Caglar

  • BAPI FM to set the  "Material Number used by Vendor" and the "Order Unit"

    Hi,
    is there any bapi or fm to set these two fields in the purchase view of the material?
    to create the material i've used the "BAPI_MATERIAL_SAVEDATA" but i don't have a clue where those field's can be set.
    thkzs to all in advanced
    Regards
    Jaime

    Solved using Batch input

  • To create a Material using BAPI with out passing the material number

    Hello Experts,
    I am using BAPI_MATERIAL_SAVEDATA to create a material of some Ztype. I am successfully creating a material if I am passing Material Number as input. I want the material number to generated internally.
    When I am doing material creation with same input data with out material number using BDC, it is working fine. It is generating the material number.
    But, not with the BAPI.
    Do, I need to specify this some where in the BAPI to generate the Material number internally? Please let me know.
    Please help me in this regard.
    Thanks & Regards,
    Naresh.

    Hi,
    Read the BAPI documentation regarding Internal Number range for materials.
    When you create material master data, the following fields must always
    contain a value in the structure:
    o   MATERIAL
        Only external number assignment is supported for the material number
        (MATERIAL). If you want the material number to be assigned
        internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
        called. This method determines an internal number for the material
        to be created. You must enter this internal number in field
        HEADDATA-MATERIAL.
    Regards
    Vinod

  • How change plant, net price, OPu, and Material Number from ME32K

    Hi GURUs,
    May let me know how I should configure ME32K in order to allow users to change:
    - Material Number
    - Net Price
    - Order Purchasing Unit
    - Plant
    I have tried setting up field selections layout properly, even debug PBO, it is still greyed out for those fields.
    Please help.
    Thanks,
    Tony Yuwono

    there is no way to change the price in item overview in the contract.
    The reason is explained in OSS note 685117.
    ........The problem is that Scales and/or validity periods may exist for the conditions, because contracts have time dependant conditions, just like info records do.
    This is in contrast to e.g. Purchase orders which have Time independant conditions and so, NO scales nor validity periods.
    A Purchase order has A price! The price maybe determined based on a source; a contract or an info record. Depending on the order quantity and the date, the PO price is determined.
    The contract does not have A date, it might have several; indicated by the validity periods. Furthermore the price is dependant on eventual scales. Therefore it does not have A price either..........

Maybe you are looking for

  • Read the manual; still can't get it right

    i've followed instructions on setting path and classpath, but still can't get the HelloWorldApp to work right. it makes the .class file fine but the java HelloWorldApp command gives this to stdout Exception in thread "main" java.lang.NoClassDefFoundE

  • Problems Installing Adobe Flash 11.4

    Every time I try to install Adobe Flash 11.4 I receive an error saying Adobe Flash Player Install Manager quit unexpectedly after it was relaunched. From there I try to relaunch but it still does not work. I am running Mac OS X Version 10.5.8. Any he

  • Delete Broken Links

    I would like to know how to delete everything in the broken links folder. I have a project that has migrated from a Word import thru a few editors, structure reorganizations, and other nefarious activities and it is time to clean up the resulting mes

  • How ro export small (compressed) files (.mpg) with sound from FCP or compr.

    I have some dv pal footage that I need to store in in very small files. Then I need to convert it back to dv, for editing. The quality (regarding artefacts and all that) is not important. The stuff was ripped from DVDs originally and are only to be u

  • Urgent: BAD audio distortion on youtube upload.

    Hi, I finished an edit a few days ago and uploaded it to youtube. Image quality was all fine but the audio was awful. All distorted and seemingly over compressed, there was whirling  and other odd noises. The audio is high quality, why is it sufferin