on 06-20-2014 11:36 AM
Hi,
I have various meters linked to rental spaces and pool spaces with SAP RE-FX. Now I want to write a program to import meter readings from a csv file, which is generated by a different system.
Does anyone know what functions / BAdI / class I could use in order to get the import started?
Thank you in advance
Norbert
Dear Norbert Preis.
Your questions is for the "How can you migrate various measurements of each rental/pooled space".
It that right? In this cases, you can use the "LSMW with BAPI".
A) Function (BAPI) :
1) Function module : BAPI_RE_RO_CREATE
2) Table Parameter : MEASUREMENT
B) LSMW >>
1) Import Method : Business Object Method (BAPI)
2) Business Object : BUS1504
3) Method : Create
4) Message Type : BUS1504_CREATE
Regards,
Jeong, Yeong-Chul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Norbert,
I am not sure, how you are using the functionality, If you are not using measurements to update your meter reading and have created measuring points instead, then you may try using the tcode FO8V and use collective entry.
Regds,
Hardik Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Robert,
first I would use either OPEN and READ DATASET (when file from server) or function 'GUI_UPLOAD' to get your csv data in the correct internal table.
After that use function 'API_RE_RO_CHANGE' to change your rental objects with the imported measurements.
Regards
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Norbert,
There is an RFC call "MEASUREM_DOCUM_RFC_SINGLE_001" which you could use within a loop to import the meter readings (measurement documents).
CALL FUNCTION 'MEASUREM_DOCUM_RFC_SINGLE_001'
EXPORTING
measurement_point = p_point
reading_date = p_meas_date
reading_time = sy-uzeit
reader = sy-uname
origin_indicator = 'A'
recorded_value = p_cntr_rdg
prepare_update = 'X'
commit_work = ''
wait_after_commit = ''
notification_type = 'M2'
IMPORTING
measurement_document = lv_docno
EXCEPTIONS
no_authority = 1
point_not_found = 2
index_not_unique = 3
type_not_found = 4
point_locked = 5
point_inactive = 6
timestamp_in_future = 7
timestamp_duprec = 8
unit_unfit = 9
value_not_fltp = 10
value_overflow = 11
value_unfit = 12
value_missing = 13
code_not_found = 14
notif_type_not_found = 15
notif_prio_not_found = 16
notif_gener_problem = 17
update_failed = 18
invalid_time = 19
invalid_date = 20
* OTHERS = 21.
Thanks and Regards,
Amitava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
16 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.