BAPI_PRICES_CONDITIONS

BAPI_PRICES_CONDITIONS. Coming back sy-sub = 0. But price table not updating.
    Any ideas?  Thanks.

Hi
Call This BAPI.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
<REMOVED BY MODERATOR>
Regards
Sandeep
Edited by: Alvaro Tejada Galindo on Apr 11, 2008 3:10 PM

Similar Messages

  • Problem with Multiple record creation using BAPI BAPI_PRICES_CONDITION

    Hi,
    I am working on IS Media Sales And Distribution wherein i am using BAPI BAPI_PRICES_CONDITION for condition record creation in TCODE JC9B. I am able to create one record using this BAPI for one sales promotion but having problem while creation of multiple records for the same sales promotion wherein my internal table have multiple records. It gives me error that data in BAPICONDIT is missing.
    I am aatching followig code for reference
    BAPI have field of varkey which i am filling as combination of sales org. + distn channel + sales promotion + delivery type
    In this varkey  delivery type is changing for sales promotion Can be said that one sales promotion can have multiple delivery type .
    Am i giving the correct varkey for each itration of internal table ?
    I am attaching code for reference.
    Here loop it_cond contain one promotion and multiple delivery type.
    sales org   distn ch  promotion     delivery
    0100             01        zsalesprom   03
    0100             01        zsalesprom   z3
      LOOP AT it_cond INTO wa_cond.
    Get next condition number
          CALL FUNCTION 'NUMBER_GET_NEXT'
            EXPORTING
              nr_range_nr                   = '01'
              object                        = 'KONH'
      QUANTITY                      = '1'
      SUBOBJECT                     = ' '
      TOYEAR                        = '0000'
      IGNORE_BUFFER                 = ' '
           IMPORTING
              number                        = number
      QUANTITY                      =
      RETURNCODE                    =
    EXCEPTIONS
      INTERVAL_NOT_FOUND            = 1
      NUMBER_RANGE_NOT_INTERN       = 2
      OBJECT_NOT_FOUND              = 3
      QUANTITY_IS_0                 = 4
      QUANTITY_IS_NOT_1             = 5
      INTERVAL_OVERFLOW             = 6
      BUFFER_OVERFLOW               = 7
      OTHERS                        = 8
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    Here i am concacating varkey for each new delivery
    CLEAR : l_min,l_length,l_var.
    CONCATENATE wa_cond-vkorg wa_cond-vtweg wa_cond-wrbakt INTO l_var.
    l_length = STRLEN( l_var ).
    IF l_var+14(2) IS INITIAL.
    WRITE wa_cond-lifart TO L_VAR+14.
    l_length = STRLEN( l_var ).
    ENDIF.
    W_LINE = W_LINE + 1.
    *First table in BAPI
            wa_bapicondct-operation = '009'.
            wa_bapicondct-cond_usage = 'A'.
            wa_bapicondct-table_no = '506'.
            wa_bapicondct-applicatio = 'J0'.
            wa_bapicondct-cond_type = 'RATE'.
            wa_bapicondct-varkey = l_var.
            wa_bapicondct-valid_to = wa_cond-datbi.
            wa_bapicondct-valid_from = wa_cond-datab.
            wa_bapicondct-cond_no = number. "
            APPEND wa_bapicondct TO it_bapicondct.
    *Second table in BAPI
            wa_bapicondhd-operation = '009'.
            wa_bapicondhd-cond_no = number.
            wa_bapicondhd-cond_usage = 'A'.
            wa_bapicondhd-table_no = '506'.
           wa_bapicondhd-created_by = sy-uname.
           wa_bapicondhd-creat_date = sy-datum.
            wa_bapicondhd-applicatio = 'J0'.
            wa_bapicondhd-cond_type = 'RATE'.
            wa_bapicondhd-varkey = l_var.
            wa_bapicondhd-valid_from = wa_cond-datab.
            wa_bapicondhd-valid_to = wa_cond-datbi.
            APPEND wa_bapicondhd TO it_bapicondhd.
    *Third table in BAPI
            wa_bapicondit-operation = '009'.
            wa_bapicondit-cond_no = number.
            wa_bapicondit-cond_count = wa_cond-cond_count.
            wa_bapicondit-applicatio = 'J0'.
            wa_bapicondit-cond_type = 'RATE'.
            wa_bapicondit-calctypcon = 'C'.
           wa_bapicondit-scaletype  = 'A'.
            wa_bapicondit-cond_value = wa_cond-kbetr.
            wa_bapicondit-condcurr = wa_cond-konwa.
            wa_bapicondit-promotion = wa_cond-wrbakt.
            APPEND wa_bapicondit TO it_bapicondit.
    *Fourth table in BAPI
            wa_bapicondqs-operation = '009'.
            wa_bapicondqs-cond_no = number.
            wa_bapicondqs-cond_count = wa_cond-cond_count.
            wa_bapicondqs-currency = wa_cond-kbetr.
            wa_bapicondqs-condcurr = wa_cond-konwa.
           wa_bapicondqs-cond_unit = 'EA'.
            wa_bapicondqs-LINE_NO = W_LINE."'0001'.
            APPEND wa_bapicondqs TO it_bapicondqs.
    *Fifth table in BAPI
            wa_bapicondvs-operation = '009'.
            wa_bapicondvs-cond_no = number.
            wa_bapicondvs-cond_count = wa_cond-cond_count.
            wa_bapicondvs-currenckey = wa_cond-konwa.
            wa_bapicondvs-currenciso = wa_cond-konwa.
           wa_bapicondvs-currency = wa_cond-kbetr.
           wa_bapicondvs-condcurr = wa_cond-konwa.
           wa_bapicondvs-curren_iso = wa_cond-konwa.
           wa_bapicondvs-LINE_NO = W_LINE."'0001'.
            APPEND wa_bapicondvs TO it_bapicondvs.
            CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
    EXPORTING
      PI_INITIALMODE       = ' '
      PI_BLOCKNUMBER       =
              TABLES
                ti_bapicondct        = it_bapicondct
                ti_bapicondhd        = it_bapicondhd
                ti_bapicondit        = it_bapicondit
                ti_bapicondqs        = it_bapicondqs
                ti_bapicondvs        = it_bapicondvs
                to_bapiret2          = it_bapiret2
                to_bapiknumhs        = it_bapiknumhs
                to_mem_initial       = it_cnd_mem_initial
             EXCEPTIONS
               update_error         = 1
               OTHERS               = 2
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ENDIF.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
               wait          = 'X'
    IMPORTING
      RETURN        =
            CLEAR : wa_bapicondct,wa_bapicondhd,wa_bapicondvs,wa_bapicondqs.
            CLEAR : wa_bapicondit.
          ENDLOOP.
        ENDIF.
      ENDIF.
    Kindly Suggest.
    Thanks
    Parag

    Solved By myself
    There is problem while passing data to internal table for item level

  • How to Use Bapi - " BAPI_PRICES_CONDITIONS "

    Hi Gurus,
          Can any one please let us know how we can use <b>BAPI_PRICES_CONDITIONS</b> for either creating or changing Price Conditions.
    Please see my code below for creating Price condition :-
    Please correct it and send me the code for both <b>changing</b> and <b>creating</b> price condition.
    *& Report  ZAVI_BAPI_TEST
    REPORT  zavi_bapi_test.
    DATA: table1 TYPE STANDARD TABLE OF bapicondct,
          table2 TYPE STANDARD TABLE OF bapicondhd,
          table3 TYPE STANDARD TABLE OF bapicondit,
          table4 TYPE STANDARD TABLE OF bapicondqs,
          table5 TYPE STANDARD TABLE OF bapicondvs,
          table6 TYPE STANDARD TABLE OF bapiret2,
          table7 TYPE STANDARD TABLE OF bapiknumhs,
          table8 TYPE STANDARD TABLE OF cnd_mem_initial,
          ret    TYPE STANDARD TABLE OF bapiret2  WITH HEADER LINE.
    DATA: wtable1 TYPE bapicondct,
              wtable2 TYPE bapicondhd,
              wtable3 TYPE bapicondit,
              wtable4 TYPE bapicondqs,
              wtable5 TYPE bapicondvs,
              wtable6 TYPE bapiret2,
              wtable7 TYPE bapiknumhs,
              wtable8 TYPE cnd_mem_initial.
    wtable1-table_no    = '305'.
    wtable1-applicatio   = 'V'.
    wtable1-cond_type  = 'ZFOR'.
    wtable1-operation   = '004'.
    wtable1-varkey       = '13001001EUR 000000000050068946'.
    *wtable1-varkey      = '0001010000000017000000000000000096'.
    wtable1-valid_to      = '99991231'.
    wtable1-valid_from  = '20071017'.
    wtable1-cond_no    = '0000007269'.
    APPEND wtable1 TO table1.
    wtable2-operation     = '004'.
    wtable2-cond_no      = '0000007269'.
    wtable2-created_by  = sy-uname.
    wtable2-creat_date   = '20071017'.
    wtable2-cond_usage = 'A'.
    wtable2-table_no      = '305'.
    wtable2-applicatio     = 'V'.
    wtable2-cond_type    = 'ZFOR'.
    wtable2-varkey         = '13001001EUR 000000000050068946'.
    *wtable1-varkey        = '0001010000000017000000000000000096'.
    wtable2-valid_from    = '20071017'.
    wtable2-valid_to        = '99981231'.
    APPEND wtable2 TO table2.
    wtable3-operation      = '004'.
    wtable3-cond_no       = '0000007269'.
    wtable3-cond_count   = '01'.
    wtable3-applicatio      = 'V'.
    wtable3-cond_type     = 'ZFOR'.
    wtable3-scaletype      = 'A'.
    wtable3-scalebasin     = 'C'.
    wtable3-scale_qty      = '1'.
    wtable3-cond_p_unt   = '1'.
    wtable3-cond_unit      = 'EA'.
    wtable3-calctypcon    = 'C'.
    wtable3-cond_value    = '444'.
    wtable3-condcurr        = 'EUR'.
    APPEND wtable3 TO table3.
    CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
    EXPORTING
    PI_initialmode = 'X'
    PI_BLOCKNUMBER =
    TABLES
       ti_bapicondct  = table1
       ti_bapicondhd  = table2
       ti_bapicondit  = table3
       ti_bapicondqs  = table4
       ti_bapicondvs  = table5
       to_bapiret2    = table6
       to_bapiknumhs  = table7
       to_mem_initial = table8
    EXCEPTIONS
       update_error   = 1
       OTHERS         = 2
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    READ TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.
    IF sy-subrc = 0.
      LOOP AT table6 INTO ret.
        WRITE: / ret-type, ret-message, ret-id, ret-log_no, ret-log_msg_no,
                      ret-message_v1, ret-message_v2, ret-message_v3, ret-message_v4,
                      ret-parameter,ret-row,ret-field.
      ENDLOOP.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *EXPORTING
    WAIT =
      IMPORTING
      return = ret
    ENDIF.

    Please refer to this code.....
    wtable1-table_no = '306'.
    wtable1-applicatio = 'V'.
    wtable1-cond_type = 'ZPR0'.
    wtable1-operation = '009'.
    wtable1-varkey = '13001001USD 000000000050068946'.
    wtable1-valid_to = '99991231'.
    wtable1-valid_from = '20051101'.
    wtable1-cond_no = '$000000001'.
    APPEND wtable1 TO table1.
    wtable2-operation = '009'.
    wtable2-cond_no = '$000000001'.
    wtable2-created_by = sy-uname.
    wtable2-creat_date = '20051022'.
    wtable2-cond_usage = 'A'.
    wtable2-table_no = '110'.
    wtable2-applicatio = 'V'.
    wtable2-cond_type = 'ZPR0'.
    wtable2-varkey = '13001001USD 000000000050068946'.
    wtable2-valid_from = '20051101'.
    wtable2-valid_to = '99991231'.
    APPEND wtable2 TO table2.
    wtable3-operation = '009'.
    wtable3-cond_no = '$000000001'.
    wtable3-cond_count = '01'.
    wtable3-applicatio = 'V'.
    wtable3-cond_type = 'ZPR0'.
    wtable3-scaletype = 'A'.
    wtable3-scalebasin = 'C'.
    wtable3-scale_qty = '1'.
    wtable3-cond_p_unt = '1'.
    wtable3-cond_unit = 'EA'.
    wtable3-calctypcon = 'C'.
    wtable3-cond_value = '454'.
    wtable3-condcurr = 'USD'.
    APPEND wtable3 TO table3.
    CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
    EXPORTING
    PI_initialmode = 'X'
    PI_BLOCKNUMBER =
    TABLES
    ti_bapicondct = table1
    ti_bapicondhd = table2
    ti_bapicondit = table3
    ti_bapicondqs = table4
    ti_bapicondvs = table5
    to_bapiret2 = table6
    to_bapiknumhs = table7
    to_mem_initial = table8
    EXCEPTIONS
    update_error = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    READ TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.
    IF sy-subrc = 0.
    loop at table6 into ret.
    write: / ret-type, ret-message, ret-id, RET-LOG_NO, RET-LOG_MSG_NO,
    RET-MESSAGE_V1, RET-MESSAGE_V2, RET-MESSAGE_V3, RET-MESSAGE_V4,
    RET-PARAMETER,RET-ROW,RET-FIELD.
    endloop.
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *EXPORTING
    WAIT =
    IMPORTING
    return = ret
    ENDIF.
    Re: Problem with BAPI_PRICES_CONDITIONS
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    Re: Problem with BAPI_PRICES_CONDITIONS
    Re: Sample code for  BAPI_PRICES_CONDITIONS

  • How to pass scale basis in bapi 'BAPI_PRICES_CONDITIONS'

    Hello,
    how can i pass the scale basis quantity and amount in multiple level (ex - scale basis quantity1, amount1 ... quantity2,amount2.....)through bapi 'BAPI_PRICES_CONDITIONS'
    Thanks
    satya

    Hello,
    I got the solutions. Below are the codes for enetring scale quantity and amounts in multiple level. Here i have used for three level, giving IS_BAPICONDQS-line_no = '0001' , IS_BAPICONDQS-line_no = '0004' , IS_BAPICONDQS-line_no = '0007'.  you can use as per yours requirements.
    is_BAPICONDIT-scaletype = 'A'.  "A-from and B-to
    is_BAPICONDIT-scalebasin = 'C'. "C-Quantity and B- Value scale
    (use these two line in is_BAPICONDIT )
    IS_BAPICONDQS-operation = '009'.
    is_BAPICONDQS-cond_no = '$000000001'.
    IS_BAPICONDQS-cond_count = '01'.
    IS_BAPICONDQS-line_no = '0001'.
    IS_BAPICONDQS-scale_qty = '15'.
    *IS_BAPICONDQS-t_unit_iso = 'VIA'.
    IS_BAPICONDQS-currency   = '71'.
    IS_BAPICONDQS-CONDCURR = 'USD'.
    APPEND IS_BAPICONDQS to IT_BAPICONDQS.
    CLEAR IS_BAPICONDQS.
    IS_BAPICONDQS-operation = '009'.
    is_BAPICONDQS-cond_no = '$000000001'.
    IS_BAPICONDQS-cond_count = '01'.
    IS_BAPICONDQS-line_no = '0004'.
    IS_BAPICONDQS-scale_qty = '25'.
    *IS_BAPICONDQS-t_unit_iso = 'VIA'.
    IS_BAPICONDQS-currency   = '96'.
    IS_BAPICONDQS-CONDCURR = 'USD'.
    APPEND IS_BAPICONDQS to IT_BAPICONDQS.
    CLEAR IS_BAPICONDQS.
    IS_BAPICONDQS-operation = '009'.
    is_BAPICONDQS-cond_no = '$000000001'.
    IS_BAPICONDQS-cond_count = '01'.
    IS_BAPICONDQS-line_no = '0007'.
    IS_BAPICONDQS-scale_qty = '30'.
    *IS_BAPICONDQS-t_unit_iso = 'VIA'.
    IS_BAPICONDQS-currency   = '106'.
    IS_BAPICONDQS-CONDCURR = 'USD'.
    APPEND IS_BAPICONDQS to IT_BAPICONDQS.
    CLEAR IS_BAPICONDQS.
    Then pass the internal table IT_BAPICONDQS to the BAPI 'BAPI_PRICES_CONDITIONS'.

  • USE of BAPI_PRICES_CONDITIONS

    Hi All,
    Can i use BAPI_PRICES_CONDITIONS to create, change, delete, copy and display condition records. when i had gone through the parameters of this BAPI i found a field called operation and it has the following things:
    003     Delete: Message contains objects to be deleted
    004     Change: Message contains changes
    005     Replace: This message replaces previous messages
    009     Original: First message for process
    023     Wait/Adjust: Data should not be imported
    018     Resend
    for create i can use 009
    for delete i can use 003
    for change i can use 004
    but for copy and display can i use this BAPI or do i need to use some other FM's. if any has used any FM's for the above requirements, can you please share it with me.
    Thanks in Advance
    Srinivas

    Hi All,
    Can i use BAPI_PRICES_CONDITIONS to create, change, delete, copy and display condition records. when i had gone through the parameters of this BAPI i found a field called operation and it has the following things:
    003     Delete: Message contains objects to be deleted
    004     Change: Message contains changes
    005     Replace: This message replaces previous messages
    009     Original: First message for process
    023     Wait/Adjust: Data should not be imported
    018     Resend
    for create i can use 009
    for delete i can use 003
    for change i can use 004
    but for copy and display can i use this BAPI or do i need to use some other FM's. if any has used any FM's for the above requirements, can you please share it with me.
    Thanks in Advance
    Srinivas

  • Rebate Agreement Create/Change by BAPI_AGREEMENTS, BAPI_PRICES_CONDITIONS

    I have to create/change Rebate agreement by the transaction code VBO1 and VBO2. I found two function modules(not RFC) BAPI_AGREEMENTS and BAPI_PRICES_CONDITIONS. However I found these function modules are not SAP Released yet (in ECC 6.0). Is it okay to use thesebfunction modules. if not, is there any other FM/Bapi for this.

    HI,
    You can create the Rebate Agreement using this BAPI BAPI_AGREEMENT
    You have to pass the following fields :
    Operation      :  005
    Agree_Cond : $
    Sales-Org :
    Distr_Chan :
    Division :
    Agr_Type :
    Category : A
    Application : V
    Recipient :
    Ex_Descr :
    Valid_From :
    Valid_To :
    Cond_Group : This value you can find from SPRO. Search for Rebate in Search Tab; there you will get the link in Billing.
    This will solve your purpose.

  • How to use bapi_prices_conditions

    Hi all,
    My requirement is as follows
    The condition records should be  created using the transaction code VK11. The records are created for the condition type ZP00 at following levels :-
    If the Sales Org value in the quote or order is “1300” then the key combination 
    Sales Organization / Division / List Price Group / Material is to be used
    The input at header level is Sales Organization , Division  and List Price Group .
    At the item level  material number under the Material column and the  Price under the Amount column and then save the condition record
    If the Sales Org value in the quote or order is “1100” then the key combination
    Sales Organisation / List Price Group / Material is used,
    The input at header level is Sales Organisation , and List Price Group         
    At the item level  material number under the Material column and the Scale Price and  Save the condition record.
    So now my doubt is,iam able to do the above procedure and also add scale prices and quantity using BDC..
    But now i have to replace the recording with BAPI,i searched in sdn and found bapi_prices_conditions could serve my purpose...the thing is i  don't understand where to pass the key combinations,Sales  organisation,List price group and the last but not least prices and quantity as i enter those in vk11 by selecting the record and entering the prices and scle quantity in scales(F2)..SO pls guide me the way  approach to achieve my objective
    Thanks in advance
    balaji

    wtable1-table_no = '306'.
    wtable1-applicatio = 'V'.
    wtable1-cond_type = 'ZPR0'.
    wtable1-operation = '009'.
    wtable1-varkey = '13001001USD 000000000050068946'.
    wtable1-valid_to = '99991231'.
    wtable1-valid_from = '20051101'.
    wtable1-cond_no = '$000000001'.
    APPEND wtable1 TO table1.
    wtable2-operation = '009'.
    wtable2-cond_no = '$000000001'.
    wtable2-created_by = sy-uname.
    wtable2-creat_date = '20051022'.
    wtable2-cond_usage = 'A'.
    wtable2-table_no = '110'.
    wtable2-applicatio = 'V'.
    wtable2-cond_type = 'ZPR0'.
    wtable2-varkey = '13001001USD 000000000050068946'.
    wtable2-valid_from = '20051101'.
    wtable2-valid_to = '99991231'.
    APPEND wtable2 TO table2.
    wtable3-operation = '009'.
    wtable3-cond_no = '$000000001'.
    wtable3-cond_count = '01'.
    wtable3-applicatio = 'V'.
    wtable3-cond_type = 'ZPR0'.
    wtable3-scaletype = 'A'.
    wtable3-scalebasin = 'C'.
    wtable3-scale_qty = '1'.
    wtable3-cond_p_unt = '1'.
    wtable3-cond_unit = 'EA'.
    wtable3-calctypcon = 'C'.
    wtable3-cond_value = '454'.
    wtable3-condcurr = 'USD'.
    APPEND wtable3 TO table3.
    CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
    EXPORTING
    PI_initialmode = 'X'
    PI_BLOCKNUMBER =
    TABLES
    ti_bapicondct = table1
    ti_bapicondhd = table2
    ti_bapicondit = table3
    ti_bapicondqs = table4
    ti_bapicondvs = table5
    to_bapiret2 = table6
    to_bapiknumhs = table7
    to_mem_initial = table8
    EXCEPTIONS
    update_error = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    READ TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.
    IF sy-subrc = 0.
    loop at table6 into ret.
    write: / ret-type, ret-message, ret-id, RET-LOG_NO, RET-LOG_MSG_NO,
    RET-MESSAGE_V1, RET-MESSAGE_V2, RET-MESSAGE_V3, RET-MESSAGE_V4,
    RET-PARAMETER,RET-ROW,RET-FIELD.
    endloop.
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *EXPORTING
    WAIT =
    IMPORTING
    return = ret
    ENDIF.
    Also there are other options:
    - from LSMW the report RV14BTCI
    - batch input to transaction XK15
    - using FM modules RV_CONDITION* (e.g. _copy and _save)

  • Test Run with BAPI_PRICES_CONDITIONS

    Hi,
    I am using BAPI_PRICES_CONDITIONS in my program to create pricing conditions.
    BAPI is working fine and it creates pricing conditions.  I can see them in VK13 and in table A9**.
    The surprising thing is - this BAPI creates pricing conditions in database, even if I am not calling BAPI_TRANSACTION_COMMIT or  COMMIT WORK in my program.
    In fact, I need to have two options as below in my program:
    1) Test Run --> Just to display the return messages from BAPI (no DB update)
    2) Create conditions --> Actual creation in Database
    Now the problem is that condition records are created in both of these cases.
    So, I am not able to achieve functionality of option-1.
    Has anyone faced this problem before or can anyone help me in this?
    Awaiting for your valuable input/suggestions.
    Thanks & Regards,
    Devendra

    Devendra Yadav,
    where yoiu able to resolve your issue number 1?
    I have the same problem.
    Thank you.

  • Create pricing condition with BAPI_PRICES_CONDITIONS

    Hello,
    I am trying to create a new pricing condition for a material using BAPI_PRICES_CONDITIONS, but unsucsessfuly.
    Has anyone tried to do that?
    Looks like BAPI is not generating a condition number.
    Regards,
    Eglese

    Hi Eglese
    Check these threads,
    BAPI_PRICES_CONDITIONS
    Problem with BAPI_PRICES_CONDITIONS
    cheers
    Sameer

  • Which are the fields to be populated for UOM in BAPI_PRICES_CONDITIONS ?

    Hi Gurus,
    I have done with populating all the fields in VK13 and only unit of measurement and condition pricing unit is not populating in tcode but in KONP it is populated any ideas
    i have populate UOM and condition pricing unit in both structures
    gs_bapicondit-base_uom   = gs_datatab-meins.
          gs_bapicondit-unitmeasur = gs_datatab-meins.
          gs_bapicondit-cond_unit  = gs_datatab-meins." unit value PC
          gs_bapicondit-cond_p_unt = gs_datatab-kpein." condition pricing unit value 1
          gs_bapicondqs-scale_qty  = gs_datatab-kpein.
          gs_bapicondqs-cond_unit  = gs_datatab-meins.
          gs_bapicondqs-t_unit_iso = gs_datatab-meins.
    i have populated in above fields but the values in VK13 is not updated.
    can any body tell me what is the reason.?
    Regards
    S.Janagar

    bapicondqs is structure used to create scalds... if you do not need scalds to be created then do not populate this. populate only bapicondit. also population of unit of measure depends on calculation type of condition being created use below code:
    IF krech     =  'A'.  "calculation type
          ls_bapicondit-curren_iso     = 'P1'.
          ls_bapicondit-cond_iso       = 'P1'.
          ls_bapicondit-condcurr       = '%'.
        ELSE.
          ls_bapicondit-cond_p_unt     = 1.
          ls_bapicondit-cond_unit      = gs_datatab--meins.
          ls_bapicondit-condcurr       = gs_datatab--konwa. "Rate unit (currency or percentage)
        ENDIF.
    On another note i would suggest you to use IDOC FM for creating condition records than using BAPI, This BAPI is not released and creates lots of data inconsistency while delimiting records  and deletion.

  • How to create the condition record by ABAP program

    Hi Friends,
    I want to create/change the condition record of PR00 by ABAP program. It seems that there have no such BAPI/standard function can help on this. Can any one of you point out a way to me?? Thanks in addvance.
    Joe GR.

    Joe,
      Check with below FM..
    BAPI_PRICES_CONDITIONS.
    Check this link:
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    examples....
    http://www.4ap.de/abap/bapi_prices_conditions.php
    Two useful threads on Same topic
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    Re: Problem with BAPI_PRICES_CONDITIONS
    BAPI_PRICES_CONDITIONS
    Please check this sample code from other thread.
    wtable1-table_no = '306'.
    wtable1-applicatio = 'V'.
    wtable1-cond_type = 'ZPR0'.
    wtable1-operation = '009'.
    wtable1-varkey = '13001001USD 000000000050068946'.
    wtable1-valid_to = '99991231'.
    wtable1-valid_from = '20051101'.
    wtable1-cond_no = '$000000001'.
    APPEND wtable1 TO table1.
    wtable2-operation = '009'.
    wtable2-cond_no = '$000000001'.
    wtable2-created_by = sy-uname.
    wtable2-creat_date = '20051022'.
    wtable2-cond_usage = 'A'.
    wtable2-table_no = '110'.
    wtable2-applicatio = 'V'.
    wtable2-cond_type = 'ZPR0'.
    wtable2-varkey = '13001001USD 000000000050068946'.
    wtable2-valid_from = '20051101'.
    wtable2-valid_to = '99991231'.
    APPEND wtable2 TO table2.
    wtable3-operation = '009'.
    wtable3-cond_no = '$000000001'.
    wtable3-cond_count = '01'.
    wtable3-applicatio = 'V'.
    wtable3-cond_type = 'ZPR0'.
    wtable3-scaletype = 'A'.
    wtable3-scalebasin = 'C'.
    wtable3-scale_qty = '1'.
    wtable3-cond_p_unt = '1'.
    wtable3-cond_unit = 'EA'.
    wtable3-calctypcon = 'C'.
    wtable3-cond_value = '454'.
    wtable3-condcurr = 'USD'.
    APPEND wtable3 TO table3.
    CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
    EXPORTING
    PI_initialmode = 'X'
    PI_BLOCKNUMBER =
    TABLES
    ti_bapicondct = table1
    ti_bapicondhd = table2
    ti_bapicondit = table3
    ti_bapicondqs = table4
    ti_bapicondvs = table5
    to_bapiret2 = table6
    to_bapiknumhs = table7
    to_mem_initial = table8
    EXCEPTIONS
    update_error = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    READ TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.
    IF sy-subrc = 0.
    loop at table6 into ret.
    write: / ret-type, ret-message, ret-id, RET-LOG_NO, RET-LOG_MSG_NO,
    RET-MESSAGE_V1, RET-MESSAGE_V2, RET-MESSAGE_V3, RET-MESSAGE_V4,
    RET-PARAMETER,RET-ROW,RET-FIELD.
    endloop.
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *EXPORTING
    WAIT =
    IMPORTING
    return = ret
    ENDIF.
    Don't forget to reward if useful....

  • Purchase Info Records ( ME11)

    Hi all,
    I am trying post Data for Purchase Info Records with Conditions data.
    I am using a standard Batch Input Method ( LSMW).
    Object               0060  
    Method               0000
    Program Name         RM06IBI0
    Program Type         B   Batch Input
    I am able to post data only for the condition type PB00. for other condition types FRC1 & FRA1 not able to post the data ( also session is not giving any error).
    Therefore I am trying out witH BAPI option  ( BAPI_PRICES_CONDITIONS),
    when i try to test the BAPI i am getting an error "Record KNUMH = 0000668598,
    VARNUMH = 000000000000000000000000000000: det. data missing  ( Structue BAPICONDIT) .
    i am passing below mentioned values to the structue BAPICONDIT
    OPERATION                      009
    SD_DOC
    ITM_NUMBER                     000000
    COND_NO                        0000668598
    COND_COUNT                     02
    APPLICATIO                     M
    COND_TYPE                      FRC1
    SCALETYPE                      F
    SCALE_QTY                                   0.000
    SCALE_VAL                                             1.000000000
    CURRENCKEY                     USD
    CURREN_ISO                     USD
    CALCTYPCON                     C
    COND_VALUE                                            2.000000000
    CONDCURR                       USD
    COND_ISO                       USD
    COND_P_UNT                         1
    COND_UNIT                      KG
    CONUNITISO                     KG
    NUMCONVERT                         1
    DENOMINATO                         1
    BASE_UOM                       KG
    BASEQTYISO                     KG
    CONDITIDX                      01
    Please Suggest what else needs to be passed to get the BAPI working.
    Regards,
    Sriram

    first cretae the info records only.
    cretae one more program with strctures like below
    and pass the info record conditions.
    if you use one program its cretae the only PB00,  here the loop is one time.
    you have to pass more than one its read the multiple records
    YPUR_INFO_CONDITIONS      Convert Conditions for Info Records
        LIFNR                          C(010)    Vendor
        MATNR                          C(018)    Material
        EKORG                          C(004)    Purch. Organization
        WERKS                          C(004)    Plant
        YPUR_INFO_CONDITION_ITEM  Convert Conditions  Item records
            MATNR                          C(018)    Material
            LIFNR                          C(010)    Vendor
            EKORG                          C(004)    Purch. Organization
            WERKS                          C(004)    Plant
            INFNR                          C(010)    Purchasing Info Rec.
            ESOKZ                          C(001)    Info record category
            KDATB                          C(008)    Validity Per. Start
            KDATE                          C(008)    Validity Period End
            KSCHL                          C(004)    Condition Type
            KBETR                          C(011)    Condition rate
            KONWA                          C(005)    Condition currency
            KPEIN                          C(005)    Pricing unit
            KMEIN                          C(003)    Unit of measure

  • How to Retrieve Purchase order TAX value price

    Hi,
    I want to retrieve Purchase order TAX value price from the purchase order is there any function module to retrieve this value.  Or from which table we can retrieve this value using purchase order no.
    Thanks in advance

    Hi Pradeep,
    Have you looked BAPI <b>BAPI_PRICES_CONDITIONS</b>?
    Hope this will help.
    Regards,
    Ferry Lianto

  • LSMW or ABAP Program:- I need BAPI function module or Direct input program

    hi experts,
    I have to develop the program which uploads the transportation pricing data for freight cost management.
    the transcation code is XK15 for the application A.
    There is a program called RV14BTCI which will uploads for the application V or M not for A.
    So i can use lsmw or direct input program in both lsmw and abap program so plz help me if there is any BAPI function module or Direct input program for Application A.
    thank you,
    waiting for u r reply.
    Edited by: SANTOSH MARUPALLY on Jan 22, 2008 6:27 AM

    Hi Santosh
    Am not really sure if RV14BTCI can not be used for other applications apart from V and M.
    You can try using BAPI: BAPI_PRICES_CONDITIONS. Over the forum you can find few example coding.
    Regards
    Eswar

  • BAPI or FM for AKE1

    Hi all,
    1) Do we have any BAPI or FM to create/update/delete records from AKE1/AKE2 tcode? I searched SDN, but in vain.
    2) One post was left unanswered in which the question was whether BAPI_PRICES_CONDITIONS can be used for AKE1 tcode?
    3) Can BAP_PRICES_CONDITIONS be used for create/update/delete conditions from VK11/VK12, or is it only for creation of conditions?
    My original requirement is only point (1). Others are just for my info.
    Please post your solutions or suggestions.
    Thanks
    Vish.

    Hi Balaji,
    Please refer the link,
    require function module for transaction MI09
    Regards,
    Hema.
    Reward points if it is useful.

Maybe you are looking for

  • Replaced G5 iMac - Now PS9 doesn't work.

    Adobe may have some great products but they could learn some lessons from Apple when it come to running User Forums. After 80 minutes of going round in circles in their forum and trying to find a support contact email address, I've fallen back on the

  • How to find multiple transport requests for one object

    Hi all, Is there any function module which will fetches multiple transport requests ( if created ) for one object.I tried almost all the function modules , but i didn't got the solution. I need to develop a report ,   which will takes a single Task n

  • How do i set up my magic trackpad to my new mac mini

    how do i set up my magic trackpad to my new mac mini

  • Get an error at calling dialog of reservation creation in SAP R/3

    Hi experts, Through SE35,I made a dialog module "ZMM_DIALOG_RE_CREATION". Its program is SAPMM07R and screen number is 500. I called this dialog module in my program "SAPMZMB21",the transaction code is ZMB21. When I executed ZMB21,an error arised. Th

  • How to find the costliest course from the below table.

    dear experts, please help me to find the costliest course from the below data COURSE         CCOST pgdca           4500 dca             7200 mca            22000 dcp             5000 pgdca           4500 dap             6200 dcap            5200 hdcp