2007 Jul 20 8:34 AM
Hi,
I want to maintain, not add, a condition (PREF) with a program. 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
Hi,
I want to maintain, not add, a condition (PREF) with a program. 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
2007 Jul 25 3:39 PM
Hi,
i have exact the same problem..
in the help of the FM is noted that the fields date_to and date_from are only for new created records.
so where is the date field for edited records?
2007 Jul 26 6:24 AM
Now, I have taken a call transaction for the update the "valid to" field in the condition ! That's life, that's SAP...
Regards
Wolfgang
2007 Aug 29 6:33 AM
I have the same problem. Can someone share their knowledge here?
Thanks
2007 Oct 26 2:39 AM
I am not able to update Kbter? any solution to this?
here is my code-
ls_komg-kunnr = '0001000008'. " Cust number
ls_komg-matnr = 'PP500P3'. " Mat number
ls_komg-VKORG = 'PPC1'.
ls_komg-vtweg = 'BB'.
clear: Lt_komv,LS_KOMV.
ls_komv-kappl = 'V '. " Application V = Sales
ls_komv-kschl = 'PR00'. " Condition type
ls_komv-waers = 'USD'. " Currency
ls_komv-kmein = 'EA'. " Unit of measurement
ls_komv-kpein = '100'.
ls_komv-krech = 'C'. " calculation type;
"M = Quantity - monthy price
LS_KOMV-KAWRT = '251.00'.
ls_komv-kbetr = '121.50'. " new condition value
*LS_KOMV-KWERT_K = '251.10'.
*LS_KOMV-KNUMV ='0000008911'
append ls_komv to lt_komv.
CLEAR LT_KOMV.
call function 'RV_CONDITION_COPY'
exporting
application = 'V'
condition_table = '005' " cond. table
condition_type = 'PR00' " cond. type
date_from = '20070108' " valid on
date_to = '99991231' " valid to
enqueue = 'X' " lock entry
i_komk = ls_komk
i_komp = ls_komp
key_fields = ls_komg " key fields
maintain_mode = 'D' " A= create
" B= change,
" C= display
" D= create with reference
with reference
no_authority_check = 'X'
keep_old_records = 'X'
overlap_confirmed = 'X'
no_db_update = space
importing
e_komk = ls_komk
e_komp = ls_komp
new_record = lv_new_record
tables
copy_records = lS_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.
....
call function 'RV_CONDITION_SAVE'.
call function 'RV_CONDITION_RESET'.
necessary to write data
commit work.
2007 Dec 17 3:23 PM
Hi. And I have problem with update dates in conditions.
Share please the decision of this problem.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |