Need to add new condition type using   BAPI_SALESORDER_CHANGE

Hi all,
I am using BAPI_SALESORDER_CHANGE to add new condition type for an order item.
I am able to add it, but problem here is, that i want that condition type to be manually changable. Here, in BAPI, after execution, condition type field becomes disable.
My code is as follows:
                MOVE 'B' TO wa_logic-pricing.
                  MOVE 'X' TO wa_logic-cond_handl.
                  wa_cond-itm_number = wa_vbap-posnr.
*                  wa_cond-cond_st_no = it_konv1-stunr.
*                  wa_cond-cond_count = it_konv1-zaehk.
                  wa_cond-cond_type =  it_discount-kschl.
                  wa_cond-CONDORIGIN = 'C'.
                  APPEND wa_cond TO i_cond.
                  CLEAR: wa_cond.
                  wa_condx-itm_number = wa_vbap-posnr.
*                  wa_condx-cond_st_no = it_konv1-stunr.
*                  wa_condx-cond_count = it_konv1-zaehk.
                  wa_condx-cond_type =  it_discount-kschl.
                  wa_condx-updateflag = 'I'.
                  wa_condx-COND_VALUE = 'X'.
                  APPEND wa_condx TO i_condx.
                  CLEAR: wa_condx.
FORM f_update_order .
  CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
      salesdocument    = salesdocument
      order_header_in  = wa_headerdata
      order_header_inx = wa_headerdatax
      logic_switch     = wa_logic
    TABLES
      return           = it_return
      order_item_in    = i_itemdata
      order_item_inx   = i_itemdatax
      conditions_in    = i_cond
      conditions_inx   = i_condx.
  IF NOT it_return[] IS INITIAL.
    PERFORM f_commit_or_rollback.
  ENDIF.
ENDFORM.
Please let me know, if it could be achievable.
Best regards,
Meena
Moderator Message: Corrected the code tags. You need to use flower brackets.
Edited by: kishan P on Aug 25, 2010 6:04 PM

Hi,
This is the demo code i am writing:
Even Change manual entry field in BAPI did not helped me.
[code]REPORT  ZTESTM1.
data: l_knumv type knumv.
DATA: it_return        TYPE STANDARD TABLE OF bapiret2,         "Internal table for t_txt_ret
       wa_return        type  bapiret2.
data: begin of it_konv occurs 0.
       include structure konv.
       data: end of it_konv.
data: logic_switch type standard table of    BAPISDLS,
      wa_logic type BAPISDLS.
data:itemdata type STANDARD TABLE OF BAPISDITM,
      wa_item type   BAPISDITM.
data : salesorder type BAPIVBELN-VBELN.
data:itemdatax type STANDARD TABLE OF BAPISDITMx,
      wa_itemx type   BAPISDITMx.
data: wa_header type BAPISDH1,
      wa_headerx type BAPISDH1X.
data: i_cond type STANDARD TABLE OF BAPICOND,
      wa_cond type BAPICOND.
data: i_condx type STANDARD TABLE OF BAPICONDX,
      wa_condx type BAPICONDX.
move '0060008601' to salesorder.
move '000010'  TO wa_item-itm_number.
append wa_item to itemdata.
move ' '  to wa_header-BILL_BLOCK.
move   'U'  to wa_headerx-UPDATEFLAG.
move  'X' to wa_headerx-BILL_BLOCK.
MOVE: 'U'  to wa_itemx-UPDATEFLAG,
     '000010'  TO wa_itemx-itm_number.
     append wa_itemx to itemdatax.
move 'B' to wa_logic-PRICING.
move 'X' to wa_logic-COND_HANDL.
select single knumv from vbak into l_knumv where vbeln = '0060008601'  .
select * from konv into table it_konv where knumv = l_knumv  and kposn = '000010'.
      wa_cond-ITM_NUMBER = it_konv-kposn.
      wa_cond-cond_type = 'Z550'.
      wa_cond-CONDCHAMAN = 'X'.
       append wa_cond to i_cond.
       clear: wa_cond.
wa_condx-ITM_NUMBER = it_konv-kposn.
wa_condx-COND_TYPE = 'Z550'.
wa_condx-UPDATEFLAG = 'L'.
append wa_condx to i_condx.
clear: wa_condx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
  EXPORTING
    salesdocument               = salesorder
   ORDER_HEADER_IN             = wa_header
    order_header_inx            = wa_headerx
   LOGIC_SWITCH                = wa_logic
  tables
    return                      = it_return
   ORDER_ITEM_IN               = itemdata
   ORDER_ITEM_INX              = itemdatax
   CONDITIONS_IN               =   i_cond
   CONDITIONS_INX              =   i_condx
  EXTENSIONIN                 =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.[code]
Thank you.
Meena

Similar Messages

  • Sales Order creation of adding new condition type to Item

    Hi Expert,
    The sales order has been created and need to add new condition type (Z601) to the first item(10). While adding the condition I am getting warning message like
    "Item 000030 exists already; the entry will be ignored".
    Where item 030 will be the last item.
    I have cheked but it's a standard report SAPFV45P, we can't modify. Please let me know can we set any field in the sales order so that we wont be getting this message.
    Regards,
    Mahesh

    Hello,
             If you would like to add the Condition Type automatically for a specific Item based on some condition (Lets say, Item Category), then you can code a Pricing Routine in VOFM Transaction and it will be automatically assigned.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • Need to create New pricing type - VA05

    Hi,
    I need to create a new pricing type like C (When u do update the pricing from VA05). i am doing trail and error method to the STEU table. can anybody through some light on this, to create the new pricing.
    I need to delete one condition and need to update new conditions type.i went through the note 24832.
    Thanks in advance.
    Sri

    Hi Madhu,
    I need to create new pricing type like C, going to use Customer reserve - Y(VA05->Edit->New pricing). and it should be able to delete the one condition and add new condition when user used it.
    I hope it is clear.
    Thanks,
    Srikanth

  • User exit / BADI to add the condition type in PO

    Hi Friends,
    The scenario is like user will be creating the Sales order & after that user will create the PR & immidiately after that PO will be created from PR no.
    I will be checking for some Z* condition type in sales order & if its present in sales order I have to add that condition type in PO.
    So for this I am searching for user exit or BADI.
    Please help me out with this.
    I have already tried following user exits & bADIs
    1. RV61AFZA - cant use because i dont get the PR no or SO no in this exit.
    2. RV61AFZB - cant use because i dont get the PR no or SO no in this exit.
    3. also tried the enhancement MM06E004 - if I add new condition type in XKOMV table condition type is not getting updated in PO.
    4. MM06E005 - if I add new condition type in XKOMV table condition type is not getting updated in PO.
    5. ME_PURCHDOC_POSTED - this BADI dont allow us to add the new condition type to std internal table.
    If you know anything apart from this then please do let me know.
    Full points will be awarded for the correct answer!!
    Best Regards,
    Aditya
    Edited by: aditya aghor on May 26, 2008 8:59 AM
    Edited by: aditya aghor on May 26, 2008 10:33 AM

    Transaction Code - MIRO                     Enter Invoice                                                                               
    Exit Name           Description                                                                               
    LMR1M001            User exits in Logistics Invoice Verification                   
    LMR1M002            Account grouping for GR/IR account maintenance                 
    LMR1M003            Number assignment in Logistics Invoice Verification            
    LMR1M004            Logistics Invoice Verification: item text for follow-on docs   
    LMR1M005            Logistics Inv. Verification: Release Parked Doc. for Posting   
    LMR1M006            Logistics Invoice Verification: Process XML Invoice            
    MRMH0001            Logistics Invoice Verification: ERS procedure                  
    MRMH0002            Logistics Invoice Verification: EDI inbound                    
    MRMH0003            Logistics Invoice Verification: Revaluation/RAP                
    MRMN0001            Message output and creation: Logistics Invoice Verification    
    kevin

  • Issue with new Condition type..

    Hi,
    I want to create a Condition Type for VAT %, where we can insert value like...
    5% on 60% of Basic Price OR
    3% on 70% of Basic Price OR
    1% on 80% of Basic Price
    Note: - We have try with New Tax code and it's working... But through it, we require mew Tax code as per change condition..
    That's why we require a Condition Type for variable %...
    Please guide...

    Hi,
    You can do this through two ways.
    Option 1
    Add new condition type in tax procedure and  Make access sequence say with doc type and tax code.
    So for old PO's make the variable condition as 100% and for the new ones you need to create that many tax codes.
    Option 2:
    Write a routine for alternate base that is to be attached in tax procedure. Make a condition type in MM pricing procedure that is statistical and calculates value on base price.  Read this base price in the routine. So with this you will not make that many tax codes.
    Regards
    Sangeeta

  • How to add new data type

    I need to add new data type like SDO_GEOMETRY in spatial Oracle.
    I don't mean the User-Defined Datatype but new datatype imbed in the database.
    It might be written in C++ or Java but I do not know how.
    Any hints and help will be appreciated. Thanks,

    > It is not simply defining new VARCHAR3.
    I will compare embedded new built-in data type and UDT as part of my research.
    What I really meant was what do you want from your new type that a user-defined object can't give you? (Apart from the obvious shortcomings of Oracle object types being addressed, but that could take a while.) You specifically said "I don't mean the User-Defined Datatype but new datatype imbedded in the database" and I wondered what you meant by that.

  • To add a new condition type in Sales order programatically

    Hello,
    I want to add a condition type (ZXXX) with an amount in sales order programatically.
    I want to add the condition type in the item.
    I am able to add the price (amount) and condition type (ZXXX) manually in the sales order through t code crmd_order.
    I know it can be done though FM crm_order_maintain.
    If you can give the code for the same it be very helpful.
    is there any other FM do this operation?

    Abilash,
    Please check the following FM - CRM_ISAI_BASKET_SETITEMS_MPRIC. This FM does add pricing condition manually. Use this function module only as a template for your requirement.
    Later use CRM_ORDER_MAINTAIN to update the business transaction.

  • No accounting document generated while new condition type is added

    Hi
    I added a new condition type to the pricing procedure. While creating the invoice if i try giving a value to the new condition type then i get the message "No accounting document generated", but when i leave it as blank then there is no problem with the a/c docs.
    I assume I haven't done the complete settings correctly. Pls help.
    I am using  RVAA01 as the pricing procedure for standard order.
    Regards,
    Sujai

    Hi,
    As I do not have access to your system, can not comment in details.
    But if I have to add a tax codition in pricing, what I would do is :
    Create a tax condition, assign it in tax procedure.
    Copy it as sales pricing condition.
    Assign it in pricing procedure.
    Create condition record for tax condition in VK19.
    Check tax code in FTXP & its assignment in OB40.
    Create condition record for MWST.
    I think you need to check the above configuration.
    Savita

  • Create a new condition type for tax... and assign in the Tax determniation

    Hi,
    I need to add custom condition tax type, i tried creating the condition in OBQ1 and add that condtion in FI pricing OBQ3, now I want to confirm what is basic conept means whenever we create on condtion in OQB1 and add in OBQ3.
    i need to add that in Sales order and need to maunally populate that in the sales order.
    could anybody suggest to create a new condition type for tax.(full process).
    Thanks
    shankar

    Hi,
    Goto the T.Code "V/06".Create one new "Z" condition type.
    Maintain the Condition Class as "D(Taxes)".
    Calculation type as "A(percentage)".
    Cond. Category as "D(Tax)".
    Select the tick mark for "Group Condition" if it is applicable for you.
    In the next step assign this condition type to your pricing procedure by using the T.Code "V/08".
    Also maintain access sequence by using the T.Code "V/07" and assign it to your Condition type.
    Now this condition type will appeared in your sales order after maintain teh condition records.
    Regards,
    Krishna.

  • Add new condition to SIS

    hello All
    we have created new CONDITION TYPE for pricing
    it is ZSKO and it is additional customers discount
    But our CO department need it in SIS
    they want to see it as a separate field/data
    in MCSI
    how to do that ?

    I will try to point you in the right direction.  There is a column in the pricing procedure called SubTo(Condition Subtotal).  Using this column, you can assign the value of a condition type to some subtotal field.  You have to be careful how this might affect your pricing procedure.  You will need to select a subtotal that isn't being used.
    Now the hard part is getting it into LIS.  Some of these "Subtotals" are available in the field catalog of the LIS.  If the "Subtotal" you want to use isn't available, then there is a way to add fields to the field catalog for the LIS.  You will need to figure that out if you don't know how.  You can then create a formula to update the new field.  I believe the "Subtotal" fields will be avaliable in the formula.  Of course, all of this means that you have to have created your own LIS structures.  You can't change the structures that comes with SAP.
    I know this is kind of vague, but I just wanted to try to point you in the right direction.
    Hope it helps,
    Brian

  • New condition type

    I created a new condition type 01ZF for freight % and assigned it in the calulation schema 0100. It also appears in the drop down while creating an order but does not get saved when selected.

    Hi
    Which SRM version are you using ?
    <b>When this Condition type is not getting saved ? What are the steps you are doing ?</b>
    <u>Meanwhile, Please go through the following SAP OSS Notes and Business Add-Ins(BADIs) which will help -></u>
    Note 640369 - Incorrect values in dropdown in account assignment details
    Note 1027656 - Simplified pricing:wrong price calculation in SC using prod.
    Note 1038241 - Simplified pricing: Follow-on note to note 1027656
    Note 1034949 - Wrong price in SC when a product has multiple conditions
    Note 539720 - Simplified pricing (classic scenario)
    Note 637562 - Simplified pricing
    <u>BADIs -> </u>
    1) BBP_PRICEDATA_READ
    2) PRODUCT_UPDATE2
    3) PRC_PRICING_INIT
    Note 622282 - EBP 3.5 - price is lost in the Shopping Cart
    <b>Related links -></b>
    <u>Pricing</u>
    http://help.sap.com/saphelp_srm50/helpdata/en/72/f40f3c98ddaa4ce10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/ee/d9df3bbcce4b37e10000000a114084/frameset.htm
    Do let me know.
    Regards
    - Atul

  • New condition type, new tax codes

    Hi,
    I have created new condition type for tax procedure TAXIN. I have defined the account key for it. The condition type is basically for exempted input tax transaction. Then I created new tax codes by using the new condition type. The percentage of the tax codes is 0 as it is exempted.
    When I am trying to post invoice by using above taxcodes, it gives me error that the tax code is not defined in taxprocedure TAXIN.
    What could be the reason?

    Did you create the tax code in the development or prouction system?
    If in development you need to export the tax code by going to FTXP and selecting Tax Code -> Transport -> Export. Then when you release the transport you should go to the Production system and select Tax Code -> Transport -> Import.

  • Can we add new condition in old PO with new pricing schema

    We have created new pricing schema for addition of new condition type at header level on
    25/11/2010 in client server but the problem is for old purchase order client want new condition
    on header condition tab.It is obvious that in old po on analysis tab it shows old pricing schema.
    Is there any solution to get new condition in old Purchase order????
    It means we can add new condition in old po???
    Regards
    Jyoti Thakur

    Jyoti,
    Let me know the basic Price Condition if its PB00 or PBXX.
    Let me know how you have called the pricing schema. if you had attached it with document type and you have changed the document type, you will be required to create new PO with new doc type.
    If you have taken Vendor Schema group as a criteria, then you will be required to end the validity of old pricing conditions in condition table and need to activate new conditions on this date.
    Check for other basic keys like Purchasing Organization as well.
    Let me know if you have any existing Source List or QA for the vendor too.
    Thanks and Regards
    Raghavan

  • Condition type used for invoice list

    Hello Gurus,
            following condition type used for invoice list, why do they exit in invoice list:
             RL00    MW15.  LR00    RD01

    Hi,
    Please go through the below document
    When you work with invoice lists, you need to be familiar with the following concepts:
    Prerequisites for invoice lists
    Relationship to Pricing
    Structure of an Invoice List
    Changing header and item data
    Integration with financial accounting (FI)
    Prerequisites
    You can only process invoice lists if the following prerequisite data is defined by your system administrator in Customizing for Sales:
    Condition type RL00 (factoring discount) must be maintained and, if required, also the condition type MW15.
    An invoice list type must be assigned to each billing type that you want to process in invoice lists. The standard version of the SAP R/3 System includes two types of invoice lists: LR for invoices and debit memos, LG for credit memos.
    Copying requirements must be defined (for example, the payer, terms of payment and other fields that must be identical in the documents to be included in the invoice list)
    In addition, before you process an invoice list, you must maintain the following master data:
    A customer calendar must be defined, specifying the time intervals or dates on which invoice lists are to be processed.
    The customer calendar must be entered in the Billing Sales Area view of the customer master record.
    Pricing condition records for the condition type RL00 and, if necessary, (e.g. in Germany) the condition type MW15 must be maintained.
    Output condition records for condition types LR00 and RD01 must be created.
    Relationship to Pricing
    The system processes factoring discounts in invoice lists in exactly the same way as other kinds of pricing elements. The data for the factoring discount is stored in condition records. Controlling during document processing is carried out via condition types, pricing procedures and access sequences. This control data is defined in Customizing for Sales by your system administrator.
    For further information, see  Conditions and Pricing.
    Structure of an Invoice List
    An invoice list represents an individual billing document. It consists of a document header and document items. Each item represents a billing document that you have included in the invoice list. The header contains an overview of summary information, such as the net value of all documents in the invoice list, the value of the factoring discount, details of taxes, and so on. It also contains information on partners and output.
    Changing Header and Item Data
    You can change some of the header data - for example, the billing date - when you process the invoice list. You can change an item - either an individual or collective invoice - and display document details. However, you cannot change any data in individual billing documents once they are part of an invoice list.
    It is possible, however, to make certain global changes to output in all items in an invoice list.
    For further information on output, see  Communication in Sales and Distribution Processing.
    Integration With Financial Accounting (FI)
    The documents that you want to combine within an invoice list must already have been billed and forwarded to Financial Accounting. Here the billing documents intended for an invoice list are blocked for normal dunning transactions.
    The dunning block on FI documents is lifted as soon as you create an invoice list and transfer it to FI . The system then calculates the new dunning date for the invoice on the basis of the invoice list date.
    In addition, the system enters invoice list numbers in the FI documents as reference numbers. Invoice list numbers can then be entered for incoming payments.
    When you save the invoice list, the system automatically creates an accounting document for the factoring discount and possible taxes and posts it to the corresponding G/L account in FI.
    Regards,
    Murthy

  • Sales order - new condition type - account assignment

    Hello all,
    we need to create a new condition type for sales order. I know that this is the path to go in SPRO:
    IMG - Sales and Distribution - Basic Functions - Pricing -Pricing Control - Define Condition type.
    Also I have to assign it to a pricing procedure.
    Now my question is, how can I determine an account (like a GL account) where the money goes when using this condition type? Background is, we want to create a sales order on a WBS element and there is no condition type available, so we want to create a new one. So where or how can we determine the account?
    Thanks
    Anne

    The effect I would say is that you have to understand the business requirement in terms of how complex your account determination needs to be. For example, in current company I am with we only use two tables - C003 and C005. System looks at C003 first, if no entry it moves to C005. So, for applicable cases in C003 where we want to trump account determination in C005, we have entry that does reference account key from the line item of the condition type in the pricing procedure.
    Last client I was at, we had 8 tables referenced in account determination. Very complex and specific in certain circumstances. Lots of well thought out logic in diagrams first and then the account determination in the system was completed. Revert back if you need more.
    Thanks,
    Jay

Maybe you are looking for

  • Spark List Itemrenderer items outside of List

    I have a spark list and i want some of the items in it to appear out side of the list depending on the users interaction. Is there a way to make items of an item renderer appear outsid of the LIst container? When i use basic layout on the lsit and ex

  • IPhoto 6 and iTunes 7 on a hard drive that is failing! Please help

    On my iBook G4 I have a hard drive that no longer mounts after an unsuccessful attempt to update to Leopard. What I need to know is if I am able to extract any data from the drive, what files do I need to save my iPhotos an iTunes data. Everything el

  • Please help with message

    Plugged in Itouch to same computer I have been using. Error pops up saying "This ipod cannot be used because the mobile device isn't started." First time seeing message.

  • Acrobat open a file

    In acrobat (standard version I assume where I can combine files to pdf and convert etc) I am having difficulty to open a file and then give a password to that file. It seems to open in reader. In Adobe acrobat.com and downloading and opening a conver

  • ASP Not Compatible with IE11

    Hi, We have client that develop system using asp and cold fusion. The server using windows 2008 32bit. How to fix this issue? Is there any library to update? How to migrate to windows 2012? Please advice. Thanks.