2021 Jan 22 7:37 AM
I am creating/updating condition record in condition table using FM: RV_CONDITION_COPY. I can able to update price etc. but not able to change 'validity end date'. What are the parameters need to pass to change the validity end date.
Here is my sample code. Please help me to solve my issue.
CALL FUNCTION 'RV_CONDITION_COPY'
EXPORTING
application = gc_application_v
condition_table = gwa_t681-kotabnr
condition_type = p_kschl
date_from = lv_datab
date_to = lv_datbi "'99991231'
i_komk = gwa_komk
i_komp = gwa_komp
key_fields = lwa_key_fields
maintain_mode = 'A'
no_authority_check = abap_true
no_field_check = abap_true
keep_old_records = abap_true
overlap_confirmed = abap_true
IMPORTING
e_komk = gwa_komk
e_komp = gwa_komp
new_record = lv_new_record
e_datab = lv_datab
e_datbi = lv_datbi
e_prdat = lv_prdat
TABLES
copy_records = gt_copy_records
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.
In given FM I use the Maintain_Mode 'B' for this it does not change the validity date for eg.
Validity From Validity To
29.01.2020 31.12.9999
Now I want to change validity to date......
Validity From Validity To
29.01.2020 31.01.2025
but it not works for maintain_mode 'B'
and now when I use Maintain mode 'A' it works but it create one more record eg
Validity From Validity To
29.01.2014 31.12.9999
for this I use Maintain mode 'A' and it gets
Validity From Validity To
29.01.2020 31.01.2025
01.02.2025 to 31.12.9999
2021 Feb 05 5:21 PM
I've answered in your other question on the same subject: https://answers.sap.com/questions/13237112/change-the-validity-end-date-of-condition-record-v.html?c...
Kindly refrain from creating duplicate questions. You can simply update an existing question to "bump" it.
Thanks.