Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8338

Using RV_CONDITION_COPY Change "Validity to" date in MEK2

$
0
0

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.



Viewing all articles
Browse latest Browse all 8338

Trending Articles



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