2009 Jul 14 7:28 AM
Hi All,
I wanted to mass upload condition records in to the APO system for the transaction /N/SAPCND/AO11 from an external file.
Is there any FM available?
If FM is not available...which one is the best way to do this?
LSMW?? or BDC???
Please guide me..
Thanks,
Babu Kilari
2009 Jul 14 7:38 AM
Hi,
I think BDC is the best way to do this. Bcz, in BDC u can chage the code as u r requirement.
Hope, it will help you.
Thanks & Regards,
Poonam.
2009 Jul 14 7:38 AM
Hi,
I think BDC is the best way to do this. Bcz, in BDC u can chage the code as u r requirement.
Hope, it will help you.
Thanks & Regards,
Poonam.
2009 Jul 14 7:46 AM
2009 Jul 14 7:51 AM
Hi Chenna Kesava?
In the FM that you have provided, where do give the source file or external file?
Do you have an example for this. That would be of great help for me.
Thanks,
Babu Kilari
2009 Jul 14 8:00 AM
At least the key fields of the conditiontable
(here 800) must be filled in structure ls_komg.
ls_komg-vbeln = '1234567890'. " document number
ls_komg-posnr = '000010'. " item number
clear wt_komv.
ls_komv-kappl = 'V '. " Application V = Sales
ls_komv-kschl = lc_kschl. " Condition type
ls_komv-waers = 'EUR'. " Currency
ls_komv-kmein = 'ST'. " Unit of measurement
ls_komv-kpein = '1'.
ls_komv-krech = 'M'. " calculation type;
"M = Quantity - monthy price
ls_komv-kbetr = '1234.56'. " new condition value
append ls_komv to lt_komv.
call function 'RV_CONDITION_COPY'
exporting
application = 'V'
condition_table = '800' " cond. table
condition_type = lc_kschl " cond. type
date_from = '20061101' " valid on
date_to = '20061130' " valid to
enqueue = 'X' " lock entry
i_komk = ls_komk
i_komp = ls_komp
key_fields = ls_komg " key fields
maintain_mode = 'A' " A= create
" B= change,
" C= display
" D= create
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 = lt_komv
exceptions