'RV_CONDITION_COPY'

Hi,
I want to maintain, not add, a condition (PREF) with a programm. I take the function module 'RV_CONDITION_COPY' . If I take in this function modul the parameter maintain_mode 'A', it runs, if I take in this function modul the parameter maintain_mode 'B', only the field "valid to" isn't updated, the other fields are updated.
I call the function module:
CALL FUNCTION 'RV_CONDITION_COPY'
EXPORTING
application = con_v
condition_table = con_t074 "Konditionstabelle
condition_type = con_pref "Konditionsart
date_from = sy-datlo "Von jetzt an
date_to = h2_datum
enqueue = 'X' "Sperren ist besser
i_komk = komk
i_komp = komp
key_fields = komg "Schlüssel
maintain_mode = 'B' "Lieber A als B
no_authority_check = 'X' "X wie nix
keep_old_records = ' '
overlap_confirmed = 'X'
IMPORTING
e_komk = komk
e_komp = komp
new_record = i_new_record
TABLES
copy_records = w_komv
EXCEPTIONS
enqueue_on_record = 01
invalid_application = 02
invalid_condition_number = 03
invalid_condition_type = 04
no_authority_ekorg = 05
no_authority_kschl = 06
no_authority_vkorg = 07
no_selection = 08
table_not_valid = 09.
The field h2_datum is set to a date, but there is always the date '31.12.9999' in the condition.
Can someone help me ?
Kind regards
Wolfgang

You might try doing a where-used on the function module and check out the programs that use it.  It could help you along.
Here is the list I got from my system.
FM06IFPS_MARKTPREIS          
LMLSPF5V                     
LMLSPF5X                     
LPREF_KMATF01                
LPREF_KMATU04                
LVKOIF01                     
LWVK1FAN                     
LWVKCF0R                     
MF82TF00                     
MM06EFSK_CALL_CONDITION_COPY 
MM06EFSK_CALL_CONDITION_COPY_N
MM06IFKO_CALL_CONDITION_COPY 
RMLEF000                     
RMPREF30                     
RMPREF30WG                   
WV01CF00                     
Regards,
Rich Heilman

Similar Messages

  • RV_CONDITION_COPY FUNCTION MODULE

    Hi,
    My requirement is to update the price for the condition record no in konp table by using rv_condition_copy function module.
    In this program i am trying to change the price of this condition record number but it is not affecting to the database.
    program is successfully executing but it doesnt affect the database.
    DATA:i_komv TYPE TABLE OF komv.                                        " Pricing Communications-Condition Record
    DATA:wa_key_fields TYPE komg,                                          "
            wa_konp TYPE konp,                                              " Konp table - Conditions (Item)
            w_komv  LIKE LINE OF i_komv,
            w_mara  LIKE mt06e,                                               " Material Master Fields: Purchasing
            komk    TYPE komk,                                                 " Communication Header for Pricing
            komp    TYPE komp,                                                 " Communication Item for Pricing
           wa_pispr TYPE pispr,
            l_new_record.
    START-OF-SELECTION.
       SELECT SINGLE *
         FROM konp
         INTO wa_konp
        WHERE knumh = '0000032426'
          AND loevm_ko <> 'X'.
       CLEAR : wa_key_fields, w_komv.
       REFRESH : i_komv.
       wa_pispr-matnr = 'T-EC0101'.
       wa_pispr-vkorg = '0005'.
       wa_pispr-vtweg = '12'.
       CALL FUNCTION 'SPR_KOMK_KOMP_FILL'
         EXPORTING
           pi_i_spr  = wa_pispr
         IMPORTING
           pe_i_komk = komk
           pe_i_komp = komp.
       wa_key_fields-matnr = 'T-EC0101'.
       w_komv-knumh     = wa_konp-knumh.                                    " Condition record number
       w_komv-kposn     = wa_konp-kopos.                                    " Sequential number of the condition
       w_komv-kappl     = wa_konp-kappl.                                    " Application
       w_komv-kschl     = wa_konp-kschl.                                    " Condition type
       w_komv-kbetr     = '49.99'.                                          " Rate (condition amount or percentage) where no scale exists
       w_komv-waers     = wa_konp-konwa.                                    " Rate unit (currency or percentage)
       w_komv-krech     = wa_konp-krech.                                    " Calculation type for condition
       w_komv-stfkz     = wa_konp-stfkz.                                    " Scale Type
       w_komv-kpein     = wa_konp-kpein.                                    " Condition pricing unit
       w_komv-kmein     = wa_konp-kmein.                                    " Unit of measurement
       w_komv-zaehk_ind = wa_konp-zaehk_ind.                                " Condition item index
       w_komv-loevm_ko  = 'X'.                                              " Deletion indicator for condition item
       APPEND w_komv TO i_komv.
       w_mara-matkl = '009'.                                                " Material group
       w_mara-meins = 'ST'.                                                 " Basic Unit of measure
       w_mara-mtart = 'HAWA'.                                               " Material type
       w_mara-maktx = 'Saddle bag'.                                         " Material Description
       CALL FUNCTION 'RV_CONDITION_COPY'
         EXPORTING
           application                 = 'V'                                " Application V = Sales
           condition_table             = '304'                              " Condition table
           condition_type              = 'PR00'                             " Condition type
           date_from                   = '20060327'                         " Validity start date of the condition record
           date_to                     = '99991231'                         " Validity End date of the condition record
           enqueue                     = 'X'
           i_komk                      = komk                               " Communication block for header(pricing)
           i_komp                      = komp                               " Communication block for item(pricing)
           selection_date              = '20060327'
           key_fields                  = wa_key_fields
           maintain_mode               = 'B'                                " Mode: Create(A), Change(B), Display(C).
    *      no_authority_check          = 'X'
    *      no_field_check              = ' '
          keep_old_records            = 'X'
           material_m                  = w_mara
          overlap_confirmed           = 'X'
          no_db_update                = ' '
         IMPORTING
           e_komk                      = komk
           e_komp                      = komp
           new_record                  = l_new_record
         TABLES
           copy_records                = i_komv
         EXCEPTIONS
           enqueue_on_record           = 1
           invalid_application         = 2
           invalid_condition_number    = 3
           invalid_condition_type      = 4
           no_authority_ekorg          = 5
           no_authority_kschl          = 6
           no_authority_vkorg          = 7
           no_selection                = 8
           table_not_valid             = 9
           no_material_for_settlement  = 10
           no_unit_for_period_cond     = 11
           no_unit_reference_magnitude = 12
           invalid_condition_table     = 13
           OTHERS                      = 14.
       IF sy-subrc ne 0.
         WRITE:/10 'not executed successfully'.
       ELSE.
         CALL FUNCTION 'RV_CONDITION_SAVE'.
         COMMIT WORK.
         CALL FUNCTION 'RV_CONDITION_RESET'.
         COMMIT WORK.
        WRITE:/10 ' executed successfully'.
       ENDIF.
    Regards,
    Avinash.

    Hi Avinash,
    I was used in my project and its work with below code, please try to  change your program  just like below and check  I think it will be helpfull for you.
    Regards,
    Prasenjit
    PARAMETERS: p_KBETR type KBETR DEFAULT '99'.
    PARAMETERS: p_KNUMA type KNUMA_AG DEFAULT 'X000009996'.
    PARAMETERS: p_datef type sy-datum DEFAULT '20130401'.
    PARAMETERS: p_datet type sy-datum DEFAULT '20130731'.
    PARAMETERS: p_kunnr TYPE kunnr DEFAULT '28523272'.
    PARAMETERS: p_matnr type matnr DEFAULT 'P7734527'.
    START-OF-SELECTION.
    DATA:
    cr LIKE TABLE OF komv WITH HEADER LINE, " copy_records
    nr, "New_Record
    key_fields LIKE TABLE OF komg WITH HEADER LINE,
    komk LIKE TABLE OF komk WITH HEADER LINE,
    komp LIKE TABLE OF komp WITH HEADER LINE,
    COPY_RECS_IDOC LIKE TABLE OF KOMV_IDOC WITH HEADER LINE,
      i_kona TYPE kona.
    * KOMK/KOMP Fuellen
    *Fill KOMK
    komk-mandt = '210'.
    komk-vkorg = '1310'.
    komk-vtweg = '01'.
    komk-spart = '01'.
    komk-kunnr = p_kunnr.
    komk-kappl = 'V'.
    komk-ERDAT = sy-datum.
    komp-kposn = '000001'.
    komp-matnr = p_matnr.
    komp-KNUMA_AG = p_KNUMA.
    komp-kposn = '000001'.
    key_fields-mandt  = '210'.
    key_fields-vkorg = '3376'.
    key_fields-kunnr = p_kunnr.
    key_fields-vtweg = '01'.
    key_fields-spart = '01'.
    key_fields-matnr =  p_matnr.
    cr-kappl = 'V'.
    cr-kschl = 'ZLPO'.
    cr-krech = 'C'.
    cr-KBETR = p_KBETR.
    cr-waers = 'GBP'.
    cr-kpein = 1.
    cr-kmein = 'CS'.
    cr-kopos = 01.
    cr-kzbzg = 'C'.
    *cr-knumh = '0005014306'.
    APPEND cr.
      i_kona-abtyp = 'C'.
      i_kona-knuma  =  p_knuma.
    *COPY_RECS_IDOC-KNUMA_AG = p_KNUMA.
    *append COPY_RECS_IDOC.
    CALL FUNCTION 'RV_CONDITION_RESET'.
    * --> KOMK/KOMP werden korrekt gefüllt. Funktion i.o.
    CALL FUNCTION 'RV_CONDITION_COPY'
      EXPORTING
        application              = 'V'
        condition_table          = '517'
        condition_type           = 'ZLPO'
        date_from                = p_datef
        date_to                  = p_datet
        enqueue                  = 'X'
        i_komk                   = komk
        i_komp                   = komp
        key_fields               = key_fields
        maintain_mode            = 'A'
          no_authority_check       = space
          no_field_check           = 'X'
          keep_old_records         = space
          overlap_confirmed        = 'X'
       i_kona                   = i_kona
       SELECTION_DATE           = sy-datum
      IMPORTING
        e_komk                   = komk
        e_komp                   = komp
        new_record               = nr
      TABLES
        copy_records             = cr
        COPY_RECS_IDOC           = COPY_RECS_IDOC
      EXCEPTIONS
        enqueue_on_record        = 01
        invalid_application      = 02
        invalid_condition_number = 03
        invalid_condition_type   = 04
        no_authority_ekorg       = 05
        no_authority_kschl       = 06
        no_authority_vkorg       = 07
        no_selection             = 08
        table_not_valid          = 09.
    CALL FUNCTION 'RV_CONDITION_SAVE'.
    CALL FUNCTION 'RV_CONDITION_RESET'.
    commit work.

  • How to handle duplicate price creation while using RV_CONDITION_COPY

    Hi,
    I using FM RV_CONDITION_COPY in my BAPI to create the price but if the same record is being passed again either with same validation date or different validation dates then system pops up a window with message "The validity period of the condition created overlaps with conditions with shorter validity periods. These conditions will be deleted when you save." and other detail. This screen is same as when we try to create price using VK11.
    Does anybody know how to handle this issue.
    Thanks and Regards,
    Seema

    this may helps you.
    Look at the below thread ....
    Check if the below code can help you:
    U can try like this
    CONSTANTS:
    CON_A(1) TYPE C VALUE 'A',
    CON_B(1) TYPE C VALUE 'B',
    CON_C TYPE C VALUE 'C',
    CON_D TYPE C VALUE 'D',
    CON_E TYPE C VALUE 'E',
    CON_F TYPE C VALUE 'F',
    CON_G TYPE C VALUE 'G',
    CON_K TYPE C VALUE 'K',
    CON_T TYPE C VALUE 'T',
    CON_S(1) TYPE C VALUE 'S',
    CON_V LIKE T681A-KAPPL VALUE 'V',
    CON_X TYPE C VALUE 'x',
    CON_XX TYPE C VALUE 'X',
    CON_T074 LIKE T681-KOTABNR VALUE '074',
    CON_PREF LIKE T685A-KSCHL VALUE 'PREF',
    CON_ULTIMO LIKE RV13A-DATAB VALUE '99991231',
    CON_DATA_LOG_NAME(8) TYPE C VALUE 'PREF',
    CON_ERROR_LOG_NAME(8) TYPE C VALUE 'ERROR',
    CON_CUSTOM_LOG_NAME(8) TYPE C VALUE 'P_CUSTOM'.
    Verkaufsmengeneinheit
    PERFORM f3_vkme_ermitteln.
    Hauswährung
    IF t001w-werks NE cstmat-werks.
    PERFORM f3_waehrung_ermitteln USING cstmat-werks.
    ENDIF.
    pro Zollgebiet Konditionssatz anlegen
    LOOP AT t_matwerte.
    CHECK t_matwerte-noupd_cond IS INITIAL.
    CLEAR: komk,
    komp,
    komg,
    w_komv.
    REFRESH w_komv.
    Schlüssel füllen
    komg-werks = w_marc-werks.
    komg-matnr = w_marc-matnr.
    komg-gzolx = t_matwerte-gzolx.
    komg-land1 = t001w-land1. "101298
    Preisinfo füllen
    w_komv-kappl = 'V '.
    w_komv-kschl = con_pref.
    IF t_matwerte-kp = kp_max.
    w_komv-kpein = 1.
    MOVE kp_max TO w_komv-kbetr.
    ELSE.
    w_komv-kpein = pm_peinh.
    COMPUTE w_komv-kbetr = t_matwerte-kp * pm_peinh / hlp_ameng.
    ENDIF.
    IF w_komv-kbetr = 0.
    COMPUTE w_komv-kbetr = 1 / 100 * -1.
    ENDIF.
    w_komv-waers = t001-waers.
    w_komv-kmein = hlp_ame.
    APPEND w_komv.
    CHECK f3_kz_update_cond IS INITIAL OR
    NOT pm_simu IS INITIAL.
    IF NOT pm_mdmps IS INITIAL.
    MOVE komg-werks TO bg_kond-werks.
    MOVE komg-matnr TO bg_kond-matnr.
    MOVE komg-gzolx TO bg_kond-gzolx.
    MOVE w_komv-kpein TO bg_kond-kpein.
    MOVE w_komv-kbetr TO bg_kond-kbetr.
    MOVE w_komv-kmein TO bg_kond-kmein.
    MOVE w_komv-waers TO bg_kond-waers.
    *{ REPLACE D20K904946 1
    APPEND bg_kond.
    Siemens: Fehlerkorektur SAP-Standard
    READ TABLE BG_KOND TRANSPORTING NO FIELDS
    WITH KEY WERKS = BG_KOND-WERKS
    MATNR = BG_KOND-MATNR
    GZOLX = BG_KOND-GZOLX
    BINARY SEARCH.
    INSERT BG_KOND INDEX SY-TABIX.
    *} REPLACE
    ENDIF.
    CHECK f3_kz_update_cond IS INITIAL.
    CALL FUNCTION 'RV_CONDITION_COPY'
    EXPORTING
    application = con_v
    condition_table = con_t074 "Konditionstabelle
    condition_type = con_pref "Konditionsart
    date_from = sy-datlo "Von jetzt an
    date_to = con_ultimo "Bis Ultimo
    enqueue = 'X' "Sperren ist besser
    i_komk = komk
    i_komp = komp
    key_fields = komg "Schlüssel
    maintain_mode = 'A' "Lieber A als B
    no_authority_check = 'X' "X wie nix
    keep_old_records = ' '
    OVERLAP_CONFIRMED = 'X'
    IMPORTING
    e_komk = komk
    e_komp = komp
    new_record = i_new_record
    TABLES
    copy_records = w_komv
    EXCEPTIONS
    enqueue_on_record = 01
    invalid_application = 02
    invalid_condition_number = 03
    invalid_condition_type = 04
    no_authority_ekorg = 05
    no_authority_kschl = 06
    no_authority_vkorg = 07
    no_selection = 08
    table_not_valid = 09.
    CASE sy-subrc.
    WHEN 0.
    WHEN OTHERS.
    MESSAGE A???
    ENDCASE.
    CALL FUNCTION 'RV_CONDITION_SAVE'.
    CALL FUNCTION 'RV_CONDITION_RESET'.
    ENDLOOP.

  • How to copy the Pricing conditions from one Distribution Channel to another

    Generally we use VK11 transaction to create conditional records .
    but I Need to Know whether is it Possible to copy the Pricing conditions from one Distribution Channel to another with same name and same internal Characteristics .
    Since we have around 70+ of Condition type with different parameter Sequence.So Instead of Going for BDC whether is there any standard Funct Modules/programs/BAPIs to do this?
    How to make a copy Condition types from One Distribution Channel to another.
    since SAP has already provided to copy conditions from Customer to customer.
    Likewise i need to know whether SAP is facilitating for these feature also.
    Iam Dubious in this issue.
    Hope Fully looking for the answers.
    Harish.N

    - IDOC_INPUT_COND_A (you can create IDOC, but also call directly)
    - call transaction / batch input (use transaction XK15, as used by LSMW)
    - use group of function modules RV_CONDITION_COPY, RV_CONDITION_SAVE, RV_CONDITION_RESET + commit.
    if you search SDN on 'RV_CONDITION_COPY' you'll find more info I believe.
    Someone mentioned BAPI_PRICE_CONDITIONS as well.

  • Issue while uploading data from flatfile to Transaction(VK13).

    Hi All,
    I am facing an issue while uploading the data from flatfile to the transaction(vk13). My flat file is as shown below.
    SalesOrganization    DistributionChannel    Customer    Material    Releasestatus    Amount    Currency    Quantity    UOM    ValidFrom    ValidTo
    2000    01    0010029614    AT309739    A    20.00    USD    1    PC    09/11/2014    12/31/9999
    If I upload these data using the RV_CONDITION_COPY  FM it is succesfully uploading to the relevant tables(konh,konp) but in the tcode VK13  I am getting all values fine, except UOM. Instead of PC it is showning as ***. I did not understand why it is happening please give an idea to solve my issue.
    Regards,
    Chakradhar.

    Hi Raymond,
    Thanks for your reply.Yes,If I use CONVERSION_EXIT_CUNIT_INPUT in my program the issue is, Assume If the user is giving PC as value for UOM field in flat file and upload the flat file.It is successfully uploading the value PC to the UOM field in transaction VK13 but the in the database table(konp) it is showing the value as ST.
    Regards,
    Chakradhar.

  • Hi.Background Job

    Hi Guru's,
    I having problem while uploading pricing conditions data.i want to upload more than 10000 thousand records.
    in selection screen,we are provinding file path (Presentation server) and using  fm "gui_upload" updating the content into internal table and updating pricing document using fm "RV_CONDITION_COPY".
    My question is.
    while upadting more than 10000 round records im getting time out dump error so im trying to execute this program using background job but im getting error like "Cannot perform frontend function in batch input mode".
    Anybody help me on this issue.
    Regards
    P.Senthil Kumar

    Hi,
    Its not possible to use GUI_UPLOAD in background mode as the SAP system is completely independent and wont allow any GUI based operations. You can try transfering the file to application server and then try running the report as a background job.
    Regards,
    Vik

  • Mass Upload of condition records in APO system.

    Hi All,
    I wanted to mass upload condition records in to the APO system for the transaction /N/SAPCND/AO11 from an external file.
    Is there any FM available?
    If FM is not available...which one is the best way to do this?
    LSMW?? or BDC???
    Please guide me..
    Thanks,
    Babu Kilari

    At least the key fields of the conditiontable
    (here 800) must be filled in structure ls_komg.
    ls_komg-vbeln = '1234567890'.  " document number
    ls_komg-posnr = '000010'.      " item number
    clear wt_komv.
    ls_komv-kappl = 'V '.        " Application V = Sales
    ls_komv-kschl = lc_kschl.    " Condition type
    ls_komv-waers = 'EUR'.       " Currency
    ls_komv-kmein = 'ST'.        " Unit of measurement
    ls_komv-kpein = '1'. 
    ls_komv-krech = 'M'.         " calculation type;
                                  "M = Quantity - monthy price
    ls_komv-kbetr = '1234.56'.   " new condition value
    append ls_komv to lt_komv.
    call function 'RV_CONDITION_COPY'
      exporting
        application              = 'V'
        condition_table          = '800'      " cond. table
        condition_type           = lc_kschl   " cond. type
        date_from                = '20061101' " valid on
        date_to                  = '20061130' " valid to
        enqueue                  = 'X'        " lock entry
        i_komk                   = ls_komk
        i_komp                   = ls_komp
        key_fields               = ls_komg    " key fields
        maintain_mode            = 'A'        " A= create
                                              " B= change,
                                              " C= display
                                              " D= create
      with reference
        no_authority_check       = 'X'
        keep_old_records         = 'X'
        overlap_confirmed        = 'X'
        no_db_update             = space
      importing
        e_komk                   = ls_komk
        e_komp                   = ls_komp
        new_record               = lv_new_record
      tables
        copy_records             = lt_komv
      exceptions

  • FM to create & update Shipment Cost Condition Records (TK11/12)

    Hi All,
       I am looking for a FM which can update Price and Validity dates in existing Shipment Cost condition records and also able to create a new shipment cost condition record.
    I have tried using BAPI_PRICES_CONDITIONS. It returns a success message but no change in shipment cost condtion record
    I have tried giving OPERATION = 009 to create new record and OPERATION = 004 to update existing one. But of no use.
    Can i use any of the RV_CONDITION_* function modules
    RV_CONDITION_MAINTENANCE
    RV_CONDITION_COPY
    If yes then what are the mandatory parameters I have to pass in.
    Or else creating a BDC program for TK11/12 is the option.
    Appreciate a quick and positive response.
    Regards,
    Leona.

    Hi,
       I have used the BAPI 'BAPI_PRICES_CONDITIONS' . In my requirement there was no need to update the scale.
    Hope the below links will help you in solving your issue.
    BAPI for VK11,VK12,MEK1,MEK2
    http://www.sapnet.ru/viewtopic.php?p=765&sid=88b6f60f85501678fc93cd16e187ad61
    Regards,
    Leona

  • Price Condition Update Function Module

    I'm trying to identify the function module that updates the price conditions in a sales document. I know one exists as I used it years ago but can't seem to locate it. It replicates the manual process of clicking the update button on the screen.
    this will be used in visual composer to update pricing prior to further processing of bapi's
    Any help appreciated

    Hi simon,
    Please check the following
    RV_CONDITION_SAVE
    RV_CONDITION_COPY
    SD_SALES_CONDITION_MAINTAIN
    Do you want to add one more pricing condition type to the existing sales order??
    Use BAPI_SALESORDER_CHANGE.
    Hope this help

  • Update Price Condition Function Module

    I'm trying to identify the function or bapi that is used to update the pricing conditions for a line item in a purchase order. This is done manually by clicking the UPDATE button on the screen when in the PO item conditions view.
    Specifically this FM will be used in visual composer to update pricing prior to goods receipt.
    any help in identifing the code would be great.
    Thanks

    Hi simon,
    Please check the following
    RV_CONDITION_SAVE
    RV_CONDITION_COPY
    SD_SALES_CONDITION_MAINTAIN
    Do you want to add one more pricing condition type to the existing sales order??
    Use BAPI_SALESORDER_CHANGE.
    Hope this help

  • FM for Internal Condition record MEK1/MEK2 and VK11/VK12

    Hi,
    Is there any function module to update the internal condition record for both Purchasing(MEK2) as well as SD condition records(VK12).
    My requirement is to update the price and price unit in the gross price condition(PB00) and sales price condition (VKP0).
    if so Please let me know.
    Thanks in advance
    Vinoth R

    Hi,
    yes you can use he sam module for both conditions:
    Function module RV_CONDITION_COPY
    paramertes MAINTANI_MODE   - 'A' Create; 'B' change
    there is no possibility to delete a condition
    COMMIT WORK and
    Afterwards call RV_CONDITION_RESET to initiailize all global data of condition maintenace.
    Regards,
    Remek

  • FM/Bapi for ME12 transaction

    Hi All,
    Is there any FM/Bapi for creating new validity periods for the existing Info record.
    By using the FM RV_CONDITION_COPY, i'm able to add new validity periods in the info record. But i'm unable to add price if the condition type contains scaling.
    If anybody has used this FM, kindly let me know how to add the pricing conditions for scales.
    Regards,
    Sridhar G

    wrong FM.
    Unfortunately, the 'module' MM-PUR does not have such nice things as BAPIs (to make things even worse, it's 'graced' with enjoy-transactions), so you will not be lucky there.
    If you want  to migrate/update info-records you still have to use good old RM06IBI0. Attach it to an LSMW and that will make things much easier for you, especially when you have to map condition scales.

  • FM or BAPI to create new condition type / record for material - VK11

    Hi All,
        I need to copy condition records from one material to another material, to do that using the below FM. For the below values even its not raising any exception or creating pricing record. Could any one tell me am i missing any other parameters ?
    Please let me know.
    *& Report  Z_TEST292011
    REPORT  Z_TEST292011.
    data: ls_komg type KOMG,
          ls_komv type komv,
          lt_komv TYPE TABLE OF komv,
          lv_new_record.
    *ls_komg-kunnr = '0001000008'. " Cust number
    ls_komg-matnr = 'A0168L1600100006'. " Mat number
    ls_komg-VKORG = '3101'.
    ls_komg-vtweg = '10'.
    clear: Lt_komv,LS_KOMV.
    ls_komv-kappl = 'V '. " Application V = Sales
    ls_komv-kschl = 'ZR00'. " Condition type
    ls_komv-krech = 'B'. " calculation type; B -Fixed amount
    ls_komv-waers = 'USD'. " Currency
    ls_komv-kpein = '100'.
    ls_komv-kmein = 'EA'. " Unit of measurement
    ls_komv-kbetr = '121.50'. " new condition value
    append ls_komv to lt_komv.
    CALL FUNCTION 'RV_CONDITION_COPY'
      EXPORTING
        application                       = 'V'
        condition_table                   = '005'
        condition_type                    = 'ZR00'
    *    DATE_FROM                         = '20110629'
    *    DATE_TO                           = '99991231'
        ENQUEUE                           = 'X'
    *   I_KOMK                            = ' '
    *   I_KOMP                            = ' '
        key_fields                        = ls_komg
        MAINTAIN_MODE                     = 'A'
        NO_AUTHORITY_CHECK                = 'X'
        NO_FIELD_CHECK                    = 'X'
    *   SELECTION_DATE                    = '00000000'
        KEEP_OLD_RECORDS                  = 'X'
    *   MATERIAL_M                        =
    *   USED_BY_IDOC                      = ' '
    *   I_KONA                            =
        OVERLAP_CONFIRMED                 = 'X'
        NO_DB_UPDATE                      = ' '
    *   USED_BY_RETAIL                    = ' '
    IMPORTING
    *   E_KOMK                            =
    *   E_KOMP                            =
        NEW_RECORD                        = lv_new_record
    *   E_DATAB                           =
    *   E_DATBI                           =
    *   E_PRDAT                           =
      tables
        copy_records                      = lt_komv
    *   COPY_STAFFEL                      =
    *   COPY_RECS_IDOC                    =
    EXCEPTIONS
       ENQUEUE_ON_RECORD                 = 1
       INVALID_APPLICATION               = 2
       INVALID_CONDITION_NUMBER          = 3
       INVALID_CONDITION_TYPE            = 4
       NO_AUTHORITY_EKORG                = 5
       NO_AUTHORITY_KSCHL                = 6
       NO_AUTHORITY_VKORG                = 7
       NO_SELECTION                      = 8
       TABLE_NOT_VALID                   = 9
       NO_MATERIAL_FOR_SETTLEMENT        = 10
       NO_UNIT_FOR_PERIOD_COND           = 11
       NO_UNIT_REFERENCE_MAGNITUDE       = 12
       INVALID_CONDITION_TABLE           = 13
       OTHERS                            = 14
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    break jdonepud.
    call function 'RV_CONDITION_SAVE'.
    call function 'RV_CONDITION_RESET'.

    Hello ,
    why dont you try LSMW -RV14BTCI ?
    regards
    Prabhu

  • Problem in updating VK12

    Hi,
    I am trying to change the AMOUNT field in VK12 against a material.
    FM i am using is : RV_CONDITION_COPY
    I am passing the new value of amount to COPY_RECORDS-KBETR but after execution it is not reflecting in VK12/VK13.
    Can anyone tell me the correct amount field in RV_CONDITION_COPY for VK12.
    Regards

    I am not using any user exit.
    I am using FM RV_CONDITION_COPY followed by RV_CONDITION_SAVE & RV_CONDITION_RESET.
    In the FM RV_CONDITION_COPY I am passing all the necessary parameters like the condition table, condition type, application etc.
    Here there are a number of amount fields out of which i am passing the new data to COPY_RECORDS-KBETR.
    My query is whether this is the required amount field? If not what is the correct field?
    Transaction to see the changes is VK13.
    Regards.

  • FM for Price Family price update at child level

    Hi All,
    Currently we are using RV_Condition_Copy for updating the price of the family. The problem with this is its not updating the child articles as per the Relationship maintained in the Price Family. It is explicitly updating the price which is maintained in the upload file. Let me know if there is any other FM which will take care of this...
    Thanks in Advance.

    Hi Sriram,
            Can you please check the Price Change Allowed Field in the price family in Control Data.
    If it's either "Blank" or "1" change that to "2" - Price Changed Allowed for Family Group and articles and then try updating the price of the family.
    Hope it helps
    Thanks,
    Aram.

Maybe you are looking for

  • OS Command batch script issue (FTP)

    All, I am running into a problem (i think it's simple) which I just can't seem to figure out. I have a FTP command which is in a batch script and I can run it manually (Its run in an old enviroment with Informatica) and the ftp script works just fine

  • How can I make the main JFrame centered?

    I'm using netbeans to create my program. I'm currently using a JFrame to do all my GUI. My problem is that when I create other JFrames within the Main JFrame, I can center that window by using, nameFrame.setLocationRelativeTo(null); but I don't know

  • CC update fails

    "A new version of Creative Cloud is available. Update now?" ... update fails every time. How to fix?

  • New Islamic applications for Nokia 6300

    Hi everyone, I recently bought my Nokia 6300 (little more than a month). Recently Nokia is releasing 6300 with preloaded Islamic applications. I tried to nokia.com/ramadan, however there I could not download Islamic applications for my Nokia 6300. Th

  • On-line Rejection

    Dear PP Gurus, Can anyone guide me what is the SAP Best practice in the scenario - 'on-line rejection after payment is made to vendor'. Thanks in advance Kailash T.