01-30-2014 4:32 AM
Hii Experts,
I am updating the condition record using RV_CONDITION_COPY in MEK2 . I want to change validity to date but it not works.
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.2014 31.12.9999
Now I want to change validity to date......
Validity From Validity To
29.01.2014 31.01.2014
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.2014 31.01.2014
01.01.2014 31.12.9999
In above I want just first record that change the Validity to Date
Could anyone please suggest what needs to be done?
CALL FUNCTION 'RV_CONDITION_COPY'
EXPORTING
application = application
condition_table = condition_table
condition_type = condition_type
date_from = date_from
date_to = date_to
enqueue = 'X'
i_komp = i_komp
key_fields = key_fields
maintain_mode = 'A' " A= Create " B= Change, " C= Display " D= Create With Reference
IMPORTING
e_komk = e_komk
e_komp = e_komp
e_datab = e_datab
e_datbi = e_datbi
e_prdat = e_prdat
TABLES
copy_records = 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.
IF sy-subrc IS INITIAL.
CALL FUNCTION 'RV_CONDITION_SAVE'.
CALL FUNCTION 'RV_CONDITION_RESET'.
COMMIT WORK AND WAIT .
endif.
Please help me to solve my issue.
01-30-2014 4:55 AM
Hi,
Can you check the below parameters of the FM
no_authority_check = 'X'
no_field_check = 'X'
keep_old_records = 'X'
overlap_confirmed = 'X'
after that
Save condition records
call function 'RV_CONDITION_SAVE'.
* Commit
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
01-30-2014 4:53 AM
01-30-2014 5:14 AM
hii Nabhit,
Thanks for reply,
When I use Maintain Mode B it does not change the record that means the records same as it is no change happen in record....
But when I use maintain mode A then Change to seen but one more record created i.e.
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.2014 31.01.2014
01.01.2014 31.12.9999
01-30-2014 4:55 AM
Hi,
Can you check the below parameters of the FM
no_authority_check = 'X'
no_field_check = 'X'
keep_old_records = 'X'
overlap_confirmed = 'X'
after that
Save condition records
call function 'RV_CONDITION_SAVE'.
* Commit
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
01-30-2014 5:15 AM
01-30-2014 5:40 AM
Hi,
It is working through the standard transaction
Can you share your part code, how you are getting the condition record and using the FM?
01-30-2014 5:44 AM
Do one thing put a break point in this FM and then change via standard and see what parameters are passed to iot and after this FM call what other calls are made check those
Nabheet
01-30-2014 5:47 AM
Hi Nabheet,
I am sure the FM is not working for changing the dates. Inside the FM there is one more function is calling RV_CONDITION_MAINTENANCE.
I think he should have to use the function RV_CONDITION_MAINTENANCE to change the dates
what do you think?
01-30-2014 5:48 AM
hiii,
It works at standard fine!!!!!!!!!!!
the code is ,
CALL FUNCTION 'RV_CONDITION_COPY'
EXPORTING
application = application
condition_table = condition_table
condition_type = condition_type
date_from = date_from
date_to = date_to
enqueue = 'X'
i_komp = i_komp
key_fields = key_fields
maintain_mode = 'A' " A= Create " B= Change, " C= Display " D= Create With Reference
* SELECTION_DATE = date_from
* OVERLAP_CONFIRMED = 'X'
* keep_old_records = 'X'
IMPORTING
e_komk = e_komk
e_komp = e_komp
* new_record = new_record
e_datab = e_datab
e_datbi = e_datbi
e_prdat = e_prdat
TABLES
copy_records = 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.
CALL FUNCTION 'RV_CONDITION_SAVE'.
CALL FUNCTION 'RV_CONDITION_RESET'.
COMMIT WORK AND WAIT .
01-30-2014 5:50 AM
Actually Kiran you are right he can use this FM directly rather than that
Nabheet
01-30-2014 5:54 AM
hiii Kiran,
Lets try with RV_CONDITION_MAINTENANCE
But at VK12 previously I develop the report the FM "RV_CONDITION_COPY" its working but at MEK2 its not working.....why????
01-30-2014 5:56 AM
Hi,
Ideally it should work! for me is also not working and some where the parameters are missing!
Investigating little bit more on copy ! you try with another FM?
01-30-2014 6:02 AM
04-03-2016 9:06 AM
Hello mahadeo,
i am facing the same problem in "RV_CONDITION_COPY" for vk12.
You mentioned that it was working for you.
Pl help with the code.
Thnx
06-22-2016 10:58 PM
01-22-2021 8:10 AM
Hello I am Also facing same issue is this Issue is resolved ?
How to change condition records with RV_CONDITION_COPY?
01-22-2021 7:32 AM
Hello I am Also facing same issue is this Issue is resolved ?
How to change condition records with RV_CONDITION_COPY?
05-24-2021 12:12 PM
Hello sir, i am working on similar requirement but i am facing same issues. can you provide me solution how you overcome this issues.
Thanks,
Ajit Singh