1. How can delete using the FM?
However I set deletion field as 'X' in lt_komv, deletion mark is not set
ls_komg-vkorg = p_vkorg.
ls_komg-waerk = p_waerk.
ls_komg-matnr = p_matnr.
ls_komv-kappl = 'V '. " Application
ls_komv-kschl = p_kschl. " Condition type
ls_komv-krech = 'C'. " calculation type
ls_komv-kbetr = p_kbetr. " new condition value
ls_komv-waers = p_waerk.
ls_komv-kmein = 'PC'.
ls_komv-kpein = '1'.
ls_komv-loevm_ko = p_del. <--- Marked 'X'.
APPEND ls_komv TO lt_komv.
CALL FUNCTION 'RV_CONDITION_RESET'.
CALL FUNCTION 'RV_CONDITION_COPY'
EXPORTING
application = 'V'
condition_table = '528' "cond. table
condition_type = p_kschl "cond. type
date_from = p_datef "valid on
date_to = p_datet "valid to
enqueue = 'X' "lock entry
key_fields = ls_komg " key fields
maintain_mode = p_mode <- I tried 2 times with 'A' and 'B' per each.
no_authority_check = 'X'
keep_old_records = space
overlap_confirmed = 'X'
* no_db_update = space
selection_date = sy-datum
TABLES
copy_records = lt_komv
2. Can I change only Valid from/to date using 'B' change mode?
I do not want to change condition record no. So I used mode 'B' for change.
But in this case, I could change KBETR amount but couldn't change valid from/to date.
When I tried with mode 'A', I could change it but condition rec. no is newly created.
Is there anybody to get a solution for this?