Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 950

RV_CONDITION_COPY in update mode

$
0
0

My requirement is to update the valid to date of the condition records.

when i am using the  RV_CONDITION_COPY in update mode , it is updating the record with mark of deletion and creating a new record from the following date, but not updating the valid to date.

 

following is the code.

 

LOOP AT t_final INTO wa_final.

   
       lv_tab  = '990'.
       key_fields-aland = wa_final-aland.
       key_fields-wkreg = wa_final-wkreg.
       key_fields-regio = wa_final-regio.
       key_fields-taxk1 = wa_final-taxk1.
       key_fields-taxm1 = wa_final-taxm1.
       key_fields-werks = wa_final-werks.
       key_fields-matkl = wa_final-matkl.

    
       Lv_mode = 'B'.
       it_chg_komv-knumh = wa_final-knumh.
       append it_chg_komv.




     CALL FUNCTION 'RV_CONDITION_RESET'.

     CALL FUNCTION 'RV_CONDITION_COPY'
     EXPORTING
       application              = 'V'
       condition_table          = lv_tab
       condition_type           = wa_final-kschl
       date_from                = wa_final-datab
       date_to                  = wa_final-datbi
       enqueue                  = 'X'
   "    i_komk                   = komk
   "    i_komp                   = komp
       key_fields               = key_fields
       maintain_mode            = Lv_mode
       no_authority_check       = space
       no_field_check           = space
       keep_old_records         = space
       overlap_confirmed        = 'X'
*   i_kona                   = i_kona
      SELECTION_DATE           = sy-datum
     IMPORTING
       e_komk                   = komk
       e_komp                   = komp
"      new_record               = it_nr_komv
     TABLES
       copy_records             = it_chg_komv
       "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.

     if sy-subrc = 0.
       CALL FUNCTION 'RV_CONDITION_SAVE'.
       commit work.
     endif.

     clear : wa_final, key_fields,it_chg_komv.
     refresh: it_chg_komv.
   endloop.


Pl guide and help.


Viewing all articles
Browse latest Browse all 950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>