Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

RV_CONDITION_COPY in update mode

Former Member
0 Kudos

Hi

I use RV_CONDITION_COPY to created conditions and it works but when

I want to update created condition in change mode (maintain_mode = 'B' ) then

this FM create a new condition in table but don't update exist record.

Is exist some method to update some exists yet key fields in a* tables?

Or maybe exists FM or method to delete this records from tables konh,konp... (not loevm_ko field)?

and next add a new data.

Edited by: Kosmo on Oct 24, 2008 12:15 PM

2 REPLIES 2

Former Member
0 Kudos

OK

I set loevm_ko to 'X' , then don't be visible this record

0 Kudos

You have to update KNUMH field in the copy_records table and also populate the SELECTION_DATE with the value in the date_from, and pass maintain_mode as 'B'. Sample is as below

CALL FUNCTION 'RV_CONDITION_COPY'

EXPORTING

application = 'V'

condition_table = lv_kotabnr

condition_type = lv_kschl

date_from = w_kona-datab

date_to = w_kona-datbi

enqueue = 'X'

i_komk = komk

i_komp = komp

key_fields = s_komg

maintain_mode = lv_maintain

no_authority_check = 'X'

no_field_check = 'X'

SELECTION_DATE = w_kona-datab

keep_old_records = ' '

overlap_confirmed = 'X'

i_kona = w_kona

IMPORTING

e_komk = komk

e_komp = komp

NEW_RECORD = NEW_RECORD

TABLES

copy_records = t_komv

EXCEPTIONS

enqueue_on_record = 1

invalid_application = 2

invalid_condition_number = 3

invalid_condition_type = 4

no_selection = 5

table_not_valid = 6

no_authority_ekorg = 7

no_authority_kschl = 8

no_authority_vkorg = 9

error_message = 10

no_material_for_settlement = 20

no_unit_for_period_cond = 21

no_unit_reference_magnitude = 22

OTHERS = 11

.