cancel
Showing results for 
Search instead for 
Did you mean: 

'RV_CONDITION_COPY'

Former Member
0 Kudos

Hi,

I want to maintain, not add, a condition (PREF) with a programm. I take the function module 'RV_CONDITION_COPY' . If I take in this function modul the parameter maintain_mode 'A', it runs, if I take in this function modul the parameter maintain_mode 'B', only the field "valid to" isn't updated, the other fields are updated.

I call the function module:

CALL FUNCTION 'RV_CONDITION_COPY'

EXPORTING

application = con_v

condition_table = con_t074 "Konditionstabelle

condition_type = con_pref "Konditionsart

date_from = sy-datlo "Von jetzt an

date_to = h2_datum

enqueue = 'X' "Sperren ist besser

i_komk = komk

i_komp = komp

key_fields = komg "Schlüssel

maintain_mode = 'B' "Lieber A als B

no_authority_check = 'X' "X wie nix

keep_old_records = ' '

overlap_confirmed = 'X'

IMPORTING

e_komk = komk

e_komp = komp

new_record = i_new_record

TABLES

copy_records = w_komv

EXCEPTIONS

enqueue_on_record = 01

invalid_application = 02

invalid_condition_number = 03

invalid_condition_type = 04

no_authority_ekorg = 05

no_authority_kschl = 06

no_authority_vkorg = 07

no_selection = 08

table_not_valid = 09.

The field h2_datum is set to a date, but there is always the date '31.12.9999' in the condition.

Can someone help me ?

Kind regards

Wolfgang

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Wolfgang

This is might be because of the Condition type config.

Using V/06 check how the condition type PREF is setup in the window 'Master Data' and field 'valid to'. May be it is set up with blank (31.12.9999) there, change it to 5 (No proposal) and try.

Hope this helps.

Lakshmipathi
Active Contributor
0 Kudos

I wonder if this thread is still unanswered or the person who had posted this has not updated the forum !!!!!!!!!

thanks

G. Lakshmipathi

former_member677139
Discoverer
0 Kudos

Hello,

FM RV_CONDITION_COPY can not change date.

Please use FM RV_CONDITION_MAINTENANCE for changing date.

Edited by: Wei Miao on Sep 14, 2010 5:30 PM

Former Member
0 Kudos

You are right, I have posted the message in the abap forum !

Thanks !

Regards

Wolfgang