Change material using BAPI_CUSTOMERQUOTATION_CHANGE

hi i want to change meterial from exsisting quotation. i.e. i am replacing lineitems 10 material A to B.
when i am using manuly ,i mean direct run it is working fine. but when i am using to another bapi it is giving error.. that meterial is not defined for plant 2500"
but directly it is updating.
my code is
     I_HEADER1X-UPDATEFLAG = 'U'.
      I_HEADER1-QT_VALID_F = V_ANGDT.
      I_HEADER1-QT_VALID_T = SY-DATUM + 90.
      I_HEADER1X-QT_VALID_F = 'X'.
      I_HEADER1X-QT_VALID_T = 'X'.
      WA_ITEM-ITM_NUMBER = WA_VBAP1-POSNR.
      WA_ITEM-MATERIAL   =  MATERIAL_T.
      APPEND WA_ITEM TO I_ITEM.
      CLEAR WA_ITEM.
      WA_ITEMX-ITM_NUMBER = WA_VBAP1-POSNR.
      WA_ITEMX-UPDATEFLAG = 'U'.
      WA_ITEMX-MATERIAL  = 'X'.
      APPEND WA_ITEMX TO I_ITEMX.
      CLEAR WA_ITEMX.
  I_SWITCH-SCHEDULING = 'X'.
CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
  EXPORTING
    SALESDOCUMENT                = V_VBELN
    QUOTATION_HEADER_IN          = I_HEADER1
    QUOTATION_HEADER_INX         = I_HEADER1X
   LOGIC_SWITCH                 =   I_SWITCH
  TABLES
    RETURN                       = RETURN
    QUOTATION_ITEM_IN            = I_ITEM
    QUOTATION_ITEM_INX           = I_ITEMX

Directly i have try many times it is updating.  i have alrready use without i_switch..Please reply ASAP

Similar Messages

  • To change material using BAPI

    Hi All,
    We are using BAPI_MATERIAL_SAVEDATA to change a material. But end user is not having the authorization to modify using this bapi. because this BAPI is used for both creation and for changing so it is checking creation object Authorization and  it is failing.
    Kindly suggest me some other BAPI to Change the material to avoid the above problem.

    try these..
    /SAPMP/BAPI_MATERIAL_SAVEDATA  Mill Products: Create and Change Material Master
    BAPI_MATERIAL_MAINTAINDATA_RT  Create and change material master data (retail)
    BAPI_MATERIAL_EDIT             Change Material

  • Change Material using IDOC_INPUT_MATMAS01

    Hi all,
    we have some custom tables and these tables contains material related data. by reading data from these tables
    i am creating material using function moudule INBOUND_IDOC_PROCESS .once after material creation i am updating all custom tables with newly created material.
    its working fine.
    later,if i change data in custom tables i must also change the material master using idoc functions
    for this i am using function IDOC_INPUT_MATMAS01.
    but its not working...
    is anyone worked with this kind of requirement..?
    if so, plz respond to this asap.
    Thanks in advance.

    Thanks to quick reply.
    here is small exaple.
    i created material using FM INBOUND_IDOC_PROCESS
    this material has sales text which i am reading from my custom table and populating to E1MTXHM and E1MTXLM segments.
    And now, once after material creation if someone change sales text data in my custom table. i have to update this based on some checks.
    i am reading the changed data into the same segments and
    this time i am changing MSGFN = '004'. and calling IDOC_INPUT_MATMAS01 FM to update.
    But its not.
    [i can't use BAPI as i am using extended Idoc]

  • Changing VA22 using 'BAPI_CUSTOMERQUOTATION_CHANGE'

    Hi all,
    I have to change the VA22 transaction using afore said BAPI,
    a quotation is created with a line item using VA21 transaction,so now i have to reject this line item.this line item can be rejected by adding the reason code as 23,thats all the line item will be rejected...This works fine with BDC recording when i try to use BAPI with the below inputs..I get success message in the return table but it is not updated in the quotation...
    Pls suggest me how to reject the line item using BAPI.are the below mentioned inputs sufficient or any inputs need to be added...
    ST_QUOT_HEADER_IN-SALES_ORG  = '1100'.
    ST_QUOT_HEADER_IN-DISTR_CHAN = '10'.
    ST_QUOT_HEADER_IN-DIVISION   = '50'.
    ST_QUOT_HEADER_INX-UPDATEFLAG = 'U'.
    IT_QUOTATION_ITEM_IN-ITM_NUMBER = '10'.
    IT_QUOTATION_ITEM_IN-MATERIAL   = 'Y80885'.
    IT_QUOTATION_ITEM_IN-REASON_REJ = '23'.
    APPEND IT_QUOTATION_ITEM_IN.
    IT_QUOTATION_ITEM_INX-ITM_NUMBER = '10'.
    IT_QUOTATION_ITEM_INX-UPDATEFLAG = 'U'.
    APPEND IT_QUOTATION_ITEM_INX.
    CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
      EXPORTING
        SALESDOCUMENT                = '0020434795'
        QUOTATION_HEADER_IN          = ST_QUOT_HEADER_IN
        QUOTATION_HEADER_INX         = ST_QUOT_HEADER_INX
      TABLES
        RETURN                       = IT_RETURN
       QUOTATION_ITEM_IN             = IT_QUOTATION_ITEM_IN
       QUOTATION_ITEM_INX            = IT_QUOTATION_ITEM_INX
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
    Thanks in advance
    regards
    balaji

    Directly i have try many times it is updating.  i have alrready use without i_switch..Please reply ASAP

  • To create/change material determination records using VB11/VB12 transaction

    To create/change material determination records using VB11/VB12 transactions, do you know any relevant FM's or BAPI's for these transactions instead BDC?
    Thanks in advance.
    regards,
    vamshi

    Thanks for the response. I wrote the BDC.
    Have some problems in BDC for VB12.Uploading ten thousand records at a time.
    Following problems exist.
    Before updating i am reading existing data.
    In   selection condition, if i give ten thousand records
    i am getting dump.
    (ii) In the change material determination third screen
         to delimit the date ( Valid on and Valid to) it does for header not at item level. No option to do at item level.
    thanks,
    vamshi

  • Change material master i.e MM02 using BAPI's

    Hi ,
    I need a BAPI which will change material master for changing MRP 2,Accounting 1 and Costing 1  View .
    Please provide me with code if possible .
    Thank you .
    Regards,
    Kumar.

    hi ,
    Use the fm SELECTION_VIEWS_FIND to get the list of active view for a particular materisl.
    The index of each record in the returned table will correspond to the position of that view in the list of views that is displayed in the bdc recording.
    The number of views maintained for a material is listed in field MARA-VPSTA.
    Each Letter in above fields indicate the views maintained. Following is the list.
    A Work scheduling
    B Accounting
    C Classification
    D MRP
    E Purchasing
    F Production resources/tools
    G Costing
    K Basic data
    L Storage
    P Forecasting
    Q Quality management
    S Warehouse management
    V Sales
    X Plant stocks
    for bdc check this,
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bdc%2btutorial
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/new%2bpage
    BDC:
    Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.
    Features :
    BDC is an automatic procedure.
    This method is used to transfer large amount of data that is available in electronic medium.
    BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
    BDC uses normal transaction codes to transfer data.
    Types of BDC :
    CLASSICAL BATCH INPUT (Session Method)
    CALL TRANSACTION
    BATCH INPUT METHOD:
    This method is also called as ‘CLASSICAL METHOD’.
    Features:
    Asynchronous processing.
    Synchronous Processing in database update.
    Transfer data for more than one transaction.
    Batch input processing log will be generated.
    During processing, no transaction is started until the previous transaction has been written to the database.
    CALL TRANSACTION METHOD :
    This is another method to transfer data from the legacy system.
    Features:
    Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
    Updating the database can be either synchronous or asynchronous. The program specifies the update type.
    Transfer data for a single transaction.
    Transfers data for a sequence of dialog screens.
    No batch input processing log is generated.
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm

  • Change material type

    When i am changing the material type i am getting this msg. In Po items were deleted.
    Change Material Type
    The material type cannot be changed.
    The reasons for this are:
    Valuated stock exists (see valuation areas below).
    However, account determination for the two material types differs.
    (different account category reference or no valuation data defined)
        Valuation area
        1030
    No open purchase order are there.

    hi
    plz check mmbe for the stock
    check for the open PR and PO in ME5A and me2m
    then try Change material type
    Material Type can be changed using transaction MMAM
    Menu: - Logistics > Material Management > Material Master > Material > Change Material Type
    u can also use MMZ2 to change material type and ind sec
    Refer following link for the same;
    http://www.sap123.com/showthread.php?t=21
    regards
    kunal

  • Free goods problems changing material

    Hello,
    I am using free goods inclusive without item generation (NRAB condition).
    I introduced a material A having  free goods, ant it works fine, but if I change the material A for B in the same position (without free goods), the NRAB condition is maintained.
    Has anyone seen this bug? Is there a note with this problem? I have searched it without successful.
    (I am using SAP ECC 6.0
    Alberto.

    I suppose it disappears once you change qty (after you changed material A to B) ?

  • Impacts in COPA of changing material and customer master data

    Dear experts,
    In my company we are considering following scenario:
    Currently mySAPerp 6.0 is implemented for all modules for the mother company.
    We have developed a new global template where there are significant changes versus the existing system, especially in the SD processes. Material and customer master also change significantly in terms of content in the tables/fields and/or values in the fields.
    The idea was to build the template from scratch in a new machine and roll-out all group affiliates, but now we are considering the possibility of making an evolutionary of the current system and try to stretch it to the processes defined in the global template.
    The scenario we want to analyze is: Keeping same organizational structure in terms of Company code, CO area and Operating Concern in existing SAP client and make an evolutionary of the existing settings to the global template processes.
    The doubts we are having are the following:
    Changing material & customer master data: Impact in COPA
    Option 1: Material master data and customer master data codes are maintained but content in the tables/fields is changed substantially, both in terms of logical content of specific fields and/or the values in the specific fields. We have following examples of changes.
    Case 1: source field in material master changes logical content. E.g. Material master field MVGR1 is currently used for product series (design line) and the content changes to be the Market Segment. The product series will be moved to a classification field. At least 5 other fields are affected by this. How can data in terms of COPA line items be converted so that they are aligned at time of reporting?
    Case 2: the source field is not changed so that the logical content of the field remains but the values change, i.e. for the same concept there will be different codifications. How can data in terms of COPA line items be converted so that they are aligned at time of reporting?
    Case 3: Characteristics where currently the source material master field is a Z field and the derivation is via table look up and where the Z field changes to a classification field. How can you convert the existing COPA line items to ensure that attributes are aligned? Should new characteristics be created or just change the derivation logic of the characteristic?
    Option 2: Material master data and customer data codes are re-created (codification of records is changed), meaning that new material and customer codes will exist and content in tables/fields is changed (as in option 1)
    Case: material and customer codes are changed. How can data in terms of COPA line items be converted so that they are aligned at time of reporting?
    Iu2019ve never phased a similar scenario and I fear that maintaining operating concern while changing source master data and also SD flows (we have new billing types, item categories, sales doc. Types, order reasons) may lead to inconsistencies and problems in COPA.
    I would like to ask you experts if you have come across a similar scenario and if from your experience, it is something feasible to do or there are many risks involved. What can be the impact of this scenario in existing Operating Concern for both option 1 and 2 and what would be the key activities to perform to adapt the existing operating concern. What will be the impact of the needed conversions on P&L reporting?
    Sorry for the long story. I hope you can help me out.
    Thanks and Regards,
    Eric

    Hi,
       First i think you will need to test if it works for new COPA documents created via billing.
      If it works fine then the issue is if you wish to apply these changes to the historical data already posted.
      Normally there are transactions like KE4S where you can repost the billing document to COPA
      However this may not be viable for bulk postings
      You can perform realignment (KEND) but this only works at the PA segment level (table CE4XXXX)
    regards
    Waman

  • How to change material type and industrial sector of the exsisting material

    Hi,
    There is an issue where user wants to change material type and industrial sector of the exsisting material .Is  it posible to do so??
    IF not ,how can we delete that material from material master so that another material with same number and required material type and industrial sector  can be created.
    Points will be definitely rewarded.
    Thanks
    Rohit

    Hi Rohit,
    You can change the material type in MMAM trxn code if the material dosenot conatain any open purchase requisitions, open reservations & open purchase orders. Also material stock should be zero.
    Remember the new material type should have same attributes same as old material type.
    OLD Material New Material
    1) Standard Price 1) Standard Price
    2) Manufacture part 2) Manufacture part
    profile actvated profile actvated
    3) Quantity & Value 3) Quantity & Value
    Updation in all areas Updation in all areas
    4) should have same GL 4) Should have same GL acs
    acs
    It is not possible to change Industry sector once created.
    If you want to delete the Material, you can flag it in MM06 trxn code.
    Reg,
    Ashok
    Dont forget to Assign points if useful.

  • Change material Type - 'MMA'

    I am trying to Change Material Type using T-code - 'MMAM'.But Message is coming PO already exist.
    Problem is tat we have already created GIN for the PO & Reversed the GIN also,but still PO is not getting release to Change any data.It is giving error,that GIN already exist.
    I want to Change the MAterial Type.How can i do that.??
    Viru.

    Please note that both the new material type and the old material type must have the      
    same characteristics eg. quantity based material management is one of   
    the characteristic. The R/3 Online Help provides a very good explanation 
    on all the pre-requisites before you can change a material type.        
    (Logistics Gen>Logistics Basic Data > LO Managing Material Master Data >
    Material Master Record > Material Type > Change Material Type)          
    Please check if you have set the deletion flag for any PO's as              
    these need to be physically deleted for MMAM to work. You will also         
    need to check if there are ANY open items for this order. The purchase      
    orders need to be ARCHIVED. You should complete the invoice receipt for     
    this position BEFORE you set the deletion flag in the purchase order.       
    Also, if the material is already in stock, or if reservations or           
    purchasing documents exist for it, the following conditions must also be   
    met:                                                                       
    >The stock values of the material of the new material type must be         
    updated in the same G/L account as the stock values of the material of    
    the old material type.                                                                               
    >Quantities and values of the material of the new material type must be    
    updated in exactly the same way in all plants as quantities and values    
    of the material of the old material type.                                                                               
    >If there is a transfer requirement for the material and if quantities     
    of the material exist, the new material type must also allow the          
    material data to be maintained from the Warehouse Management view.

  • BAdI for change Material Description

    hi all experts
    can i use <u><b>BAdI</b></u>, how i do that.
    please tell me the steps..
    i would like to allow or disallow  to change material description in short text field at follow t-code ::
    ME51N – Create Purchase Requisition
    ME52N – Change Purchase Requisition
    ME21N – Create Purchase Order
    ME22N – Change Purchase Order
    IW31    – Create Maintenance Order
    IW32    – Change Maintenance Order
    CJ20N  – Project Builder
    thanks

    Step 1.
    Search the SDN Forums with keywords like "ME52N" "ME21N" "BADI" etc, and look at all the examples already posted.
    Andrew

  • Function Module to Change Material Plant Status ( MARC-MMSTA )

    Hi All,
             Can anyone let me know the FM used to change the Plant specific Material status. Please let me know the Parameters to be passed also.
    Thanks in Advance, Will award points if helpfull
    Regards,
    Simin.R

    HI
    Try with this
    BAPI_MATERIAL_MAINTAINDATA_RT Create and Change Material Master Data (Retail)
    BAPI_ORDER_CHANGE_STATUS_GET Change status for order
    Regards
    Pavan

  • Control to  create or change material master

    I want to let a group person to create or change material maters only with material group 16. I found an auth. obj. M_MATE_WGR, and set activity as *, while activity goups as 16. But the nothing happened when I change a material with material group 17. It seems this auth. obj. is not checked while change material master. Does any idea for this case? How to let the system check this auth. obj.?
    Thanks great.

    HI,
    Adding to what Sudipta has said, you can also use the workbook technique for accomplishing these type of changes. That way you can achieve all hover text changes in one shot across all MA tabs.
    The 2 main tabs in the wokbook to be changed are: 'Localized Resource' and 'UI overrides' tab.
    As an example, suppose you want to add the following text for Master Agreement External Category field:
    "This field is a classification hierarchy to describe the products or services of the event and/or agreement."
    So in the Localized resource tab, fill out the following:
    BUNDLE: custom
    RESOURCE_ID: xxx     
    RESOURCE_KIND: APP_TEXT     
    DEFAULT_VALUE: This field is a classification hierarchy to describe the products or services of the event and/or agreement.
    Then refer the same attributes in the UI Overrides tab:
    UI_ID: contracts.agreement.ui.buyside.default
    FIELD: EXT_CAT
    ATTRIBUTE: Description
    VALUE: Same as Resource ID used in localized resource (xxx above)
    Hope this helps,
    Vikram Shukla

  • Change material could not be effected - Error in BAPI_PO_CHANGE

    Dear all,
         When I tried to change the material in a PO using BAPI_PO_CHANGE, I am getting error "Change material could not be effected", even though the GR not happened for that. But manually I am able to change it in ME22N Tcode. I have passed the following parameters;
    1) PO number
    2) PO line item
    3) Material number
    and corresponding entries in POITEMX also.
    Please provide the solution. Reward points for the helpful answer.
    regards,
    Chandra.

    Hi dinesh,
       I tried to chagne material and that is not MPN material. I think there is no dependency in material number value.
    Regards,
    Chandra

Maybe you are looking for

  • Netflix not working with composite video to tv anymore.

    Netflix requires AirPlay mirroring to be turned off when connecting to TV via composite video.  However the AirPlay menu does not show up.

  • How to use custom PAM module to unlock screen ?

    Hi, I actually use a custom PAM module for authentificate my users. This is working like a charm with sudo. I wanted to add it with the login screen, the one that everyone use. I added my config in /etc/pam.d/authorization and everything is working.

  • No transactions transferred to GL

    Sample transactions has been processed in Oracle Inventory through an OPM organization with standard cost for items. After closing inventory period, running cost rollup, running cost update, and test subledger update, no transactions transferred to G

  • The Interesting Case OF The Lost WiFi

    1.    Context 2.    Description of the problem 2.1. History of the problem 2.2. Partial solution 3.    System specs 4.    Apologies 1. Context I am currently halfwaythrough a 3 months trip in Guatemala, in which I decided to bring my 13’’ mbp,a great

  • Problems with Podcasts in iTunes and Podcast App

    We're receiving a number of reports from people that our podcasts play for a minute or so and then loop back to the beginning. We're getting the report from multiple users, for different podcast episodes and occurring at different times within each e