2009 May 13 3:05 PM
Hi,
Please guide me how can we upload meter readings using BAPI without any manual intervention.
Thanks and Regards
2009 May 20 9:58 PM
2009 May 13 4:16 PM
Not sure about BAPI
there is one FM "ISU_S_CS_METERREAD_SM_CHANGE" which can be used
You may refer to MOVEINDOC object type method "MeterReadingServiceInitiate"
Thanks,
Prajakta
2009 May 14 5:13 AM
Please try with this function module : BAPI_MTRREADDOC_UPLOAD
Regards,
Siva
2009 May 20 5:24 AM
siva is correct in mentioning the BAPI: BAPI_MTRREADDOC_UPLOAD to upload the meter readings, you need to provide the details like meter read document number, reads, read dates , read reasons etc.
A snipet of the code is below :
Part 1 : Filling the internal table to pass to BAPI
Move
WA_MRUDATA-GERNR to WA_BAPI_UPD-SERIALNO,
WA_MRUDATA-ZWNUMMER to WA_BAPI_UPD-REGISTER,
WA_MRUDATA-ABLESGR to WA_BAPI_UPD-MRREASON,
WA_MRUDATA-ABLBELNR to WA_BAPI_UPD-MRIDNUMBER,
WA_MRUDATA-U_READING to WA_BAPI_UPD-READINGRESULT,
LV_NOTES to WA_BAPI_UPD-METERREADINGNOTE,
WA_MRUDATA-U_M_READER to WA_BAPI_UPD-METERREADER,
WA_MRUDATA-U_ACT_DATE to WA_BAPI_UPD-ACTUALMRDATE,
WA_MRUDATA-U_READ_TIME to WA_BAPI_UPD-ACTUALMRTIME.
append WA_BAPI_UPD to IT_BAPI_UPD.
Part 2 : Call the BAPI
call function 'BAPI_MTRREADDOC_UPLOAD'
tables
METERREADINGRESUPDATE = IT_BAPI_UPD
RETURN = IT_BAPI_RETURN.
if not IT_BAPI_RETURN is initial.
loop at IT_BAPI_RETURN into WA_BAPI_RETURN .
if ( WA_BAPI_RETURN-TYPE eq 'E' or
WA_BAPI_RETURN-TYPE eq 'A' ).
LV_ERR_FLAG = 1. " Errornous record
endif.
endloop.
Edited by: M Amin F on May 20, 2009 6:24 AM
2009 May 20 9:58 PM
2013 May 15 9:39 AM
Hi MP Vashishth,
There are two upload scenarios:
...
1. Meter reading orders were already created and downloaded in IS-U.
Meter readings are assigned to IS-U orders via the document number when they are uploaded. In this case you do not have to maintain the following fields:
○ Article Number
○ Device serial number
○ Register Number
○ Meter Reading Reason
2. There are no meter reading orders in IS-U/CCS
In this case you have to specify the serial number and the register number to identify the device for which readings are to be entered in IS-U/CCS.
If the serial number is not unique, you also have to provide the material number and device category. You also have to supply the meter reading reason, a meter reading date and a meter reading.
Hope this will help you...!!
Regards
Vipin KV