ABAP: How to add a Price Condition Item to an order item

Hi experts,
   Is it possible to add a Price Condition Item to an order item by BAPI or Function in sap crm? (like: 0k04 10 USD 1 EA)

Hi,
You need to use CRM_ORDER_MAINTAIN and have to use structure IT_PRIDOC to update or add new pricing data.
But do remember, you have to call FM 'BAPI_TRANSACTION_COMMIT' once you are done with call to FM CRM_ORDER_MAINTAIN, else all your updation will remain in buffer and will have no effect in Database, which will let u feel as if things are not working they should be.
Best Regards,
Pratik Patel
<b>Reward with Points!</b>

Similar Messages

  • How to limit the number of price conditions in a sales order

    Dear experts,
    We've created discounts in our pricing procedure, and they are added manually. They have a maximum.
    But the problem is that the user can add several discount price conditions in the sales order!
    Is there any customizing to limit the number of occurrences to 1 in the pricing procedure?
    Thank you for your help
    Marjolaine

    HI,
    You can make use of feature to maintain maximum and minimum limits per condition type.
    SPRO > SAP Implementation Guide > Customer Relationship Management > Basic Functions > Pricing > Define Settings for Pricing > Create Minimum/Maximum Limits
    In this activity you can restrict manual processing of pricing conditions in transactions using minimum and maximum limits per condition type.
    Kindly reward with points in case helpful
    Sharif

  • How to add multiple test conditions in 'test' attribute expression of xsl:if tag

    Hi all,
    How to add multiple test conditions in 'test' attribute expression of <xsl:if> tag ?
    I have 2 parameters and I want To skip the massage if this 2 conditions happened I tried to write it :
            <xsl:when test="($TransferToCompany = 0 and $ObjectInclide=1 )">
            <b1im_skip xmlns="" info=" Obect Will Not Transfer To company">
            </b1im_skip>
          </xsl:when>
    But I get an error while I am trying to transfer The object (Account) true B1if
    I am working with SBO 9 PL 13
    thank you
    shachar

    Hi saado
    Check this link:
    http://stackoverflow.com/questions/318875/can-you-put-two-conditions-in-an-xslt-test-attribute
    Kind regards,
    Radek

  • How to block post price conditions in purchase order

    I need to block post price conditions in the purchase order, after doing MIGO.
    The problem is that somtimes buyers people go to the purachse order with ME22N, even if MIGO has already been made for this purachse order. They change The amount of certain price conditions in some or all the posts of the purchase. when people of accounting receive the invoice, there are problems of price differences.
    i need help to do it
    Thank you in advance for your help

    The system will not allow to change the price once goods receipt takes place on that particular order.  It happens only when we reverse the reciepts and make the po open.  In such case the persons can change with ME22N.  Its simple that only authorised user to have this transaction code and other users should not have this transaction code authorization.

  • How to block post price conditions  in purchase order after doing MIGO

    I need to block post price conditions in the purchase order, after doing MIGO.
    The problem is that somtimes buyers people go to the purachse order with ME22N, even if MIGO has already been made for this purachse order. They change The amount of certain price conditions in some or all the posts of the purchase. when people of accounting receive the invoice, there are problems of price differences.
    i need help to do it
    Thank you in advance for your help

    The system will not allow to change the price once goods receipt takes place on that particular order.  It happens only when we reverse the reciepts and make the po open.  In such case the persons can change with ME22N.  Its simple that only authorised user to have this transaction code and other users should not have this transaction code authorization.

  • How to add line item to sales order item table?

    Kindly help me the with the below requirement .
    Add line item to sales order(va01) dynamically on click of button. The button is also custom created push button.
    In the above requirement I have added the pushbutton to va01 tcode. But when I click on that button I need to add line item to sales order item table.
    I tried a lot but I am not successful. If possible can u please help on this.
    Regards,
    Rachel

    Hi!
    It's quite easy even in the standard SAP to add a line item for a customer order, I don't think it worth to develop a new button for this.
    However if you wanted to add a line automatically, the you can do the following in the program MV45AFZZ, FORM USEREXIT_SAVE_DOCUMENT.
    You can use similar code, but with some modifications.
    DATA: lv_posnr.
    LOOP AT xvbap.
    MOVE xvbap-posnr TO lv_posnr.   "get the last posnr
    ENDLOOP.
    ADD 10 TO lv_posnr.
    MOVE 'XYZ' TO xvbap-matnr.   "enter your material number here
    MOVE lv_posnr TO xvbap-posnr.
    * fill additinal field data in XVBAP if necessary
    MOVE 'I' TO xvbap-updkz.                  "Insert line
    APPEND xvbap.
    Regards
    Tamá

  • How to add a table layout in CRM Sales order?

    dear all ,
    anyone know how to add a table layout in CRM sales order customer tab that using the EEWB added?
    can EEWB do this?   i didn't find the appropriate business object......

    Hi , Swapna
    is you mail address right? can not send out.
    first , you should have added one field using EEWB ,  then to EEWB , find the extension , double click on the task, there  you will find a  "object list"  on the right, the list will give you many many very important  information , you should look through .
    then double click on the "screen:  ..........EEW......." ,  layout , there you will find the field you have added in .  and you can draw anything you want there , then back to the screen flow , write you flow logic in PBO and PAI .
    about the global  data definition,  again to the "object list", you will find a "Report source code:  ......................TOP". in there ,you can define all you data .
    another thing  if you want to save your input field to database tables that you draw (not by EEWB added)
    two ways:
    1. write update table directly  in  PAI module .
    2.  you can use this BADI :  ORDER_SAVE , this is when you save the order to trigger the save action.

  • How can prevent duplication of condition types in sales order??

    How can prevent duplication of condition types in sales order.
    While we want Amount field Changeable by user.
    Please give me solution.

    Dear Rohit,
    Can you explain your scenario in detail with an example or any screen shot so that we will help you in easy way ...
    Regards,
    C.B Reddy

  • How to add new condition record to sales order items

    Hello All,
    I have requirement to add to new condition record to get more discount on the item during sales order processing based on some conditions. In user exit SAVE_DOCUMENT_PREPARE , I am populating an internal with items for which additional discounts are required. So want to add condition record to those items to get additional discount.
    I know that in VOFM routines we can modify the existing condition record value but not sure what is the best place to append new condtion record to conditions table.
    Thanks,
    Suman

    Hi suman,
                   As which conditions you want or whatever logic you want for to write for applying the conditions you need to make changes at two includes and one FM by using Implicit Enhancement
    1) MV45AFZZ
    2)RV61AFZB
    3) FM name i am not remembering you can debug and find out.
    Regards,
    Shahezad

  • How to update multiple Price conditions in FM CRM_ORDER_MAINTAIN

    Hi All,
          need to update multiple price conditions in a contract Thru FM CRM_ORDER_MAINTAIN.
    please see the piece of code that am using...
      am able to update single price condition...but not able to populate 2 or more .......i,e..ADD A Condition
    i,e...DATA : ls_cond TYPE prct_cond_external_input,
           lt_cond TYPE prct_cond_external_input_t.
    DATA : ls_con TYPE PRCT_COND_DU,
           lt_con TYPE PRCT_COND_DU_TAB.
    Create Condition Type
    *ls_con-KNUMV = lv_header_guid.
    *ls_con-KPOSN = lv_item_guid.
    ls_con-stunr  = '134'.
    IF Y EQ 1.
      ls_con-ZAEHK = '001'.
    ELSE.
       ls_con-ZAEHK = '002'.
    *ENDIF.
    *ls_con-kschl = 'ZFP1'.
    **ls_cond-waers = 'CNY'.
    *ls_con-kbetr = '0.00'.
    *ls_con-kpein = '1'.
    ls_cond-kschl = 'ZFP1'.
    ls_cond-waers = 'CNY'.
    ls_cond-kbetr = '0'.
    ls_cond-kpein = '1'.
    ls_cond-knumh = lv_item_guid .
    CLEAR ls_Price_doc.
    ls_Price_doc-ref_guid = lv_item_guid.
    ls_Price_doc-ref_kind = 'A'.
    IF Y EQ 1.
    ls_Price_doc-ref_handle = '000000001'.
    ELSE.
      ls_Price_doc-ref_handle = '000000002'.
    ENDIF.
    *ls_price_doc-PRIC_COND[] = lt_cond[].
    *INSERT ls_con into table ls_price_doc-PRIC_COND.
    INSERT ls_cond into table ls_price_doc-COND_ADD.
    INSERT ls_price_doc INTO TABLE lt_price_doc.
    ls_input_fields-ref_guid    = lv_item_guid.
    ls_input_field_names-fieldname = 'KNUMH'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'KPOSN'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'KSCHL'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'KPEIN'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'STUNR'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'ZAEHK'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'WAERS'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'KBETR'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    CLEAR ls_input_fields.
    Ls_input_fields-ref_guid    = lv_item_guid.
    ls_input_fields-ref_kind    = 'B'.
    ls_input_fields-objectname  = 'PRIDOC'.
    *ls_input_fields-logical_key = '0001'.
    ls_input_fields-field_names = lt_input_field_names.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    CLEAR ls_input_fields.
    CLEAR ls_Price_agreement.
    Clear ls_cond.
    I kept this under code. loop, for item records.....
    Though the internal table lt_price_doc. is holding all the records, it is updating only one record. can you any one pls guide me ,

    This example works fine for me. Modify it according to your needs...
    Price
                  IF it_item-value IS NOT INITIAL.
                    ls_cond-kschl = 'PR00'. " add price
                    ls_cond-kbetr = it_item-value.
                    ls_cond-waers = st_head-currency.
                    INSERT ls_cond INTO TABLE ls_pridoc_com-cond_add.   
                    index_2 = 1.
                    CLEAR: ls_cond.
                  ENDIF.
    Discount
                  IF it_item-discount IS NOT INITIAL.
                    ls_cond-kschl = 'ZPPP'. " add discount
                    wa_procent_calc = it_item-discount * 10.
                    ls_cond-kbetr = wa_procent_calc."it_item-discount.
                    ls_cond-waers = '%'."st_head-currency.
                    INSERT ls_cond INTO TABLE ls_pridoc_com-cond_add.   
                    index_2 = 1.
                    CLEAR: ls_cond, wa_procent_calc.
                  ENDIF.
                  IF index_2 = 1.
                    ls_pridoc_com-ref_handle = counter.
                    ls_pridoc_com-ref_kind = 'B'.
                    INSERT ls_pridoc_com INTO TABLE gt_pridoc_com.
                    CLEAR: index_2,ls_pridoc_com.
                  ENDIF.

  • How to update PO Price only for a single line item and not other Line Item

    Hi
    My requirement is not to update Price of PO from PIR if the Final Invoice Indiactor is not set and it is not a return PO. I am trying to do this using
    BAPI_PO_CHANGE to update price automatically from Pricing record using
    POITEM-PO_ITEM = '00001'
    POITEM-CALCTYPE = 'B'.
    POITEMX-PO_ITEM = '00001'
    POITEMX-CALCTYPE = 'X'.
    The price gets updated for the line item 1 as well as other line item which I do not want. Please can you tell how to restrict that.
    Is it possible to restrict through configuration if this indicator is set there should be no price update. I tried to check in ME22n and if I update the condition item by pressing the update button the other item price also gets updated.
    Thanks
    Arghadip

    Timestamp is date and time together in one field..
    Search for data element TIMESTAMP.
    If you are getting this in your table.
    If you are getting time and date in different fields then you can use the function module
    given below....
    CALL FUNCTION 'DELTA_TIME_DAY_HOUR'
      EXPORTING
        t1            =
        t2            =
        d1            =
        d2            =
    IMPORTING
       MINUTES       =
    Then you can convert minutes into seconds..
    Function module credit to BrightSide it works....but only it will give difference in minutes
    Regards,
    Lalit Mohan Gupta.

  • How to add Terms and Conditions in Standard PO XSL-FO template

    Hi all,
    I want to add terms and conditions in PO_STANDARD_XSLFO template....
    anyone has idea how to do it...
    In the template one place is given to add Terms and Conditions, but i am not able to use it.....
    Regards
    Ravi

    You are not getting my question Vicha... I am explaining you.....
    For POrelated work....
    Like SQL,PL/SQL file we keep it in PO_TOP/SQL directory
    Shell Scripts file in PO_TOP/bin directory
    RDF in PO_TOP/report...directory
    Now i am confused here that we have to keep this Terms and Condition file in specific directory under PO_TOP
    OR
    we can keep it anywhere on Server in any directory.
    Regards
    Ravi

  • Add new price condition in an order

    Hi
    In a sale order, we want to add a new condition price when we do a new detemination of a price. This new condition is manual.. this due to we receive
    edi1 (cucstomer expected )prices by idoc and that in some cases this condition
    is not populated.
    using spro i got the list of price user exits and i saw that one could be interesting
    usexit_xkomv_bewerten_init .. in prog rv61afzb ..?
    does anyone has yet done this ?
    thanks for the answers

    CALL FUNCTION 'MEASUREM_DOCUM_DIALOG_LIST_1'
           EXPORTING
             ACTIVITY_TYPE                = '1'
             F11_ACTIVE                   = 'X'
             INDICATOR_INITIALIZE         = ' '
             DEFAULT_DATE                 = SY-DATUM
             DEFAULT_TIME                 = SY-UZEIT
             DEFAULT_READER               = SY-UNAME
             WORK_ORDER_OBJECTNR          = V_OBJNR
             WORK_ORDER_KEY_EXTERN        = ' '
             WORK_ORDER_OBJECTNR1         = ' '
             NO_DIALOG                    = 'X'
             PREPARE_UPDATE_IF_API        = 'X'
           IMPORTING
             INDICATOR_UPDATE             = ZINDICATOR_UPDATE
             LEFT_WITH_F15                = ZLEFT_WITH_F15
           TABLES
             DOCUMENTS_DEFAULT            = T_DOCUMENTS_DEFAULT
      DOCUMENTS_DEF_INS           =
             DOCUMENTS_INSERT             = T_DOCUMENTS_INSERT.
      DOCUMENTS_UPDATE             =
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              WAIT = 'X'.

  • How to add net price in BAPI BAPI_PO_CREATE1

    hi all:
    when i use bapi BAPI_PO_CREATE1, i cannot add net price in PO. code is as follow.
    *POPULATE ITEM DATA.
            clear t_po_items.
            t_po_items-po_item      = v_poitem * 10.
            t_po_items-material     = SEQ_FILEH-matnr.
            t_po_items-SHORT_TEXT   = SEQ_FILEH-MAKTX.
            t_po_items-plant        = p_RESWK.
            t_po_items-quantity     = SEQ_FILEH-MENGE.
            t_po_items-PO_UNIT      = SEQ_FILEH-MEINS.
            t_po_items-TRACKINGNO   = SEQ_FILEH-BEDNR.
            t_po_items-ACCTASSCAT   = SEQ_FILEH-KNTTP.
            t_po_items-ADMOI        = SEQ_FILEH-ADMOI.
            t_po_items-NET_PRICE    = SEQ_FILEH-netpr.
            t_po_items-PRICE_UNIT   = SEQ_FILEH-peinh.
            t_po_items-FREE_ITEM    = ' '.
           t_po_items-IR_IND       = c_x.
            APPEND t_po_items.
    *POPULATE ITEM FLAG TABLE
            clear t_po_itemsx.
            t_po_itemsx-po_item     = v_poitem * 10.
            t_po_itemsx-po_itemx    = c_x.
            t_po_itemsx-material    = c_x.
            t_po_itemsx-SHORT_TEXT  = c_x.
            t_po_itemsx-plant       = c_x.
            t_po_itemsx-quantity    = c_x.
            t_po_itemsx-PO_UNIT     = c_x.
            t_po_itemsx-TRACKINGNO  = c_x.
            t_po_itemsX-ACCTASSCAT  = c_x.
            t_po_itemsx-tax_code    = c_x.
            t_po_itemsX-item_cat    = c_x.
            t_po_itemsx-ADMOI       = c_x.
            t_po_itemsX-IR_IND      = c_x.
            t_po_itemsx-NET_PRICE   = c_x.
            t_po_itemsx-PRICE_UNIT  = c_x.
            t_po_itemsX-PO_PRICE    = c_x.
            t_po_itemsx-FREE_ITEM   = c_x.
            APPEND t_po_itemsx.
    any advice?

    Hi Gang LI,
    Try by adding this to
    t_po_items-po_price = '2'. ( 1 = Gross,  2 = Net price )

  • How to delete a Price Condition?

    Hi all,
    I need to delete a price condition. How should I proceed?
    Thanks in advance,
    Regards,

    Hi,
    Do you want to delete the condition in the PO or a condition record created for a combibnation to come into PO?
    However you can delete the condition in the PO like this.
    Open the PO in change mode.and go to the tab conditions.
    Select the condition to be deleted.and press the icon ( A square with a Minus sign in Red )at the bottom of the tab and the condition will be deleted and save the PO..Please see that the PO is in fresh open condition without any transaction posted.
    If you want to delete a condition record created , go to the T code MEK2 and out the condition type there and select the key combination for which the record exists and in the next screen , select the record and press the icon for deletion (which is one like above said).and save.
    Regards,

Maybe you are looking for

  • Malformed XML payload on RFC sender scenario

    Hi all, I'm trying to send data from RFC to XI but I got follow error in SXMB_MONI: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!--  Request Message Mapping  --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://

  • Query taking time in Oracle 10g

    Hi, Recently we had a database upgrade from 9.2.0.8 to 10.2.0.4. We use HP-UX B11.23 as OS.The problem is we have a query which used to take 3 mins in 9i database but it is not returning any output in 10g database after running for 8 hours after whic

  • Hide poplist element depending on another form column

    Hello everyone, In a nutshell: I’d like to know how to hide (or show) elements in a poplist, depending on the value of another column on the FORM. I have a FORM where I have the following columns: 1)     ISNONSYN…can have values ‘Y’ or ‘N’ 2)     ISI

  • LDAP AUTHENTICATION- PLEASE HELP

    My client wants me use LDAP for authentication. I new to this: I have written a Authentication bean. As follows. //Used to authenticate user from LDAP directry. import javax.naming.*; import javax.naming.directory.*; import java.util.*; import java.l

  • SQL Developer Tool Throws error on "/"

    I am executing a script which is creating a view using sql developer. The script at the end has a "/" but before the / there is a blank line on top. and another view does not have a blank line but has a few spaces before "/" both the cases the sql de