on 07-20-2007 8:08 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are right, I have posted the message in the abap forum !
Thanks !
Regards
Wolfgang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.