2016 Oct 26 10:55 AM
HI
I am looking for function modules for device Replace.
Can anyone help.
I tried using function modules
ISU_S_WORKLIST_INSTALL_PROVIDE
ISU_S_WORKLIST_INSTALL
But its not working .
Can any one suggest other possibilities.
Thanks & Regards,
Anjana Rao
2016 Oct 26 12:38 PM
The gist of it is this :
CALL FUNCTION 'ISU_S_WORKLIST_INSTALL_PROVIDE'
EXPORTING
x_devloc = ' '
x_anlage = i_anlage
x_eadat = i_eadat
x_geraetneu = lv_geraet_neu
x_geraetalt = lv_geraet_alt
x_matnr = lv_matnr_neu
x_matnralt = lv_matnr_alt
x_action = i_action "'03' for Replacement
x_upd_online = 'X'
x_no_dialog = i_no_dialog
IMPORTING
y_obj = ls_obj
y_auto = ls_auto
EXCEPTIONS
not_found = 1
foreign_lock = 2
invalid = 3
internal_error = 4
not_qualified = 5
input_error = 6
system_error = 7
not_customized = 8
others = 9.
ls_auto-zwstand = 'X'.
ls_obj-auto-okcode = 'SAVE'.
ls_auto-okcode = 'SAVE'.
*---> OLD DEVICE
"Add Replacement Reason if necessary
read table ls_auto-auto_ger index 1 assigning <auto_ger>.
<auto_ger>-gerwechs = <YOUR_REPLACEMENT_REASON>.
read table ls_auto-auto_zw index 1 assigning <auto_zw>.
<auto_zw>-kondigre = lv_kondigre.
<auto_zw>-tarifart = lv_tarifart.
<auto_zw>-zwstandce = lv_mtrread_neu.
<auto_zw>-anzerg = lv_anzerg.
<auto_zw>-perverbr = lv_perverbr.
<auto_zw>-zwstandca = lv_mtrread_alt.
read table ls_obj-auto-auto_zw index 1 assigning <auto_zw>.
<auto_zw>-kondigre = lv_kondigre.
<auto_zw>-tarifart = lv_tarifart.
<auto_zw>-zwstandce = lv_mtrread_neu.
<auto_zw>-anzerg = lv_anzerg.
<auto_zw>-perverbr = lv_perverbr.
<auto_zw>-zwstandca = lv_mtrread_alt.
*---> NEW DEVICE
"Add Relevant data of the NEW DEVICE TO LS_AUTO-AUTO_ZW_MOD table ...
"Therefor, get the necessary Device-data from TABLES such as EGERH, EQUI, EZWG ...
ls_mod-zwnummere = ls_ezwg-zwnummer.
ls_mod-spartype = ls_ezwg-spartyp.
ls_mod-zwarte = ls_ezwg-zwart.
ls_mod-bliwirke = ls_ezwg-bliwirk.
ls_mod-zwtype = ls_ezwg-zwtyp.
ls_mod-stanzvore = ls_ezwg-stanzvor.
ls_mod-stanznace = ls_ezwg-stanznac.
ls_mod-zwfakte = ls_ezwg-zwfakt.
ls_mod-massreade = ls_ezwg-massread.
ls_mod-thgbere = ls_ezwg-thgber.
ls_mod-zwkenne = ls_ezwg-zwkenn.
ls_mod-uebervere = ls_ezwg-ueberver.
ls_mod-zspannpe = ls_ezwg-zspannp.
ls_mod-zspannse = ls_ezwg-zspanns.
ls_mod-zstrompe = ls_ezwg-zstromp.
ls_mod-zstromse = ls_ezwg-zstroms.
ls_mod-anzerg = ls_ezwg-anzerg.
ls_mod-zwnabr = ls_ezwg-zwnabr.
ls_mod-kennziffe = ls_ezwg-kennziff.
ls_mod-kzmesswe = ls_ezwg-kzmessw.
ls_mod-steuergrpe = ls_ezwg-steuergrp.
ls_mod-pruefkle = ls_ezwg-pruefkl.
ls_mod-nablesene = ls_ezwg-nablesen.
ls_mod-massbille = ls_ezwg-massbill.
ls_mod-gewkeye = ls_ezwg-gewkey.
ls_mod-intsizeide = ls_ezwg-intsizeid.
ls_mod-equnre = lv_equnr2_neu.
ls_mod-kondigre = lv_kondigre.
ls_mod-tarifart = lv_tarifart.
ls_mod-zwstandce = i_meterstand2_neu.
ls_mod-anzerg = lv_anzerg.
ls_mod-perverbr = lv_perverbr2.
"Add line
append ls_mod to ls_auto-auto_zw_mod.
CALL FUNCTION 'ISU_S_WORKLIST_INSTALL'
EXPORTING
x_devloc = ' '
x_action = i_action
x_no_dialog = i_no_dialog
x_upd_online = ' '
IMPORTING
y_db_update = e_updated
y_exit_type = lv_exit_type
CHANGING
xy_obj = ls_obj
xy_auto = ls_auto
EXCEPTIONS
not_found = 1
foreign_lock = 2
invalid = 3
internal_error = 4
not_qualified = 5
input_error = 6
system_error = 7
not_customized = 8
OTHERS = 9.
That should be it. If you nead to add MeterReadings, be sure to make use of FM's "ISU_S_METERREAD_CREATE" / "ISU_S_METERREAD_CHANGE" in conjunction with BAPI "BAPI_MTRREADDOC_UPLOAD" ...
Hope this helps ... If not, please check the SAP Community, as there are numerous examples on this.
2016 Oct 26 12:38 PM
The gist of it is this :
CALL FUNCTION 'ISU_S_WORKLIST_INSTALL_PROVIDE'
EXPORTING
x_devloc = ' '
x_anlage = i_anlage
x_eadat = i_eadat
x_geraetneu = lv_geraet_neu
x_geraetalt = lv_geraet_alt
x_matnr = lv_matnr_neu
x_matnralt = lv_matnr_alt
x_action = i_action "'03' for Replacement
x_upd_online = 'X'
x_no_dialog = i_no_dialog
IMPORTING
y_obj = ls_obj
y_auto = ls_auto
EXCEPTIONS
not_found = 1
foreign_lock = 2
invalid = 3
internal_error = 4
not_qualified = 5
input_error = 6
system_error = 7
not_customized = 8
others = 9.
ls_auto-zwstand = 'X'.
ls_obj-auto-okcode = 'SAVE'.
ls_auto-okcode = 'SAVE'.
*---> OLD DEVICE
"Add Replacement Reason if necessary
read table ls_auto-auto_ger index 1 assigning <auto_ger>.
<auto_ger>-gerwechs = <YOUR_REPLACEMENT_REASON>.
read table ls_auto-auto_zw index 1 assigning <auto_zw>.
<auto_zw>-kondigre = lv_kondigre.
<auto_zw>-tarifart = lv_tarifart.
<auto_zw>-zwstandce = lv_mtrread_neu.
<auto_zw>-anzerg = lv_anzerg.
<auto_zw>-perverbr = lv_perverbr.
<auto_zw>-zwstandca = lv_mtrread_alt.
read table ls_obj-auto-auto_zw index 1 assigning <auto_zw>.
<auto_zw>-kondigre = lv_kondigre.
<auto_zw>-tarifart = lv_tarifart.
<auto_zw>-zwstandce = lv_mtrread_neu.
<auto_zw>-anzerg = lv_anzerg.
<auto_zw>-perverbr = lv_perverbr.
<auto_zw>-zwstandca = lv_mtrread_alt.
*---> NEW DEVICE
"Add Relevant data of the NEW DEVICE TO LS_AUTO-AUTO_ZW_MOD table ...
"Therefor, get the necessary Device-data from TABLES such as EGERH, EQUI, EZWG ...
ls_mod-zwnummere = ls_ezwg-zwnummer.
ls_mod-spartype = ls_ezwg-spartyp.
ls_mod-zwarte = ls_ezwg-zwart.
ls_mod-bliwirke = ls_ezwg-bliwirk.
ls_mod-zwtype = ls_ezwg-zwtyp.
ls_mod-stanzvore = ls_ezwg-stanzvor.
ls_mod-stanznace = ls_ezwg-stanznac.
ls_mod-zwfakte = ls_ezwg-zwfakt.
ls_mod-massreade = ls_ezwg-massread.
ls_mod-thgbere = ls_ezwg-thgber.
ls_mod-zwkenne = ls_ezwg-zwkenn.
ls_mod-uebervere = ls_ezwg-ueberver.
ls_mod-zspannpe = ls_ezwg-zspannp.
ls_mod-zspannse = ls_ezwg-zspanns.
ls_mod-zstrompe = ls_ezwg-zstromp.
ls_mod-zstromse = ls_ezwg-zstroms.
ls_mod-anzerg = ls_ezwg-anzerg.
ls_mod-zwnabr = ls_ezwg-zwnabr.
ls_mod-kennziffe = ls_ezwg-kennziff.
ls_mod-kzmesswe = ls_ezwg-kzmessw.
ls_mod-steuergrpe = ls_ezwg-steuergrp.
ls_mod-pruefkle = ls_ezwg-pruefkl.
ls_mod-nablesene = ls_ezwg-nablesen.
ls_mod-massbille = ls_ezwg-massbill.
ls_mod-gewkeye = ls_ezwg-gewkey.
ls_mod-intsizeide = ls_ezwg-intsizeid.
ls_mod-equnre = lv_equnr2_neu.
ls_mod-kondigre = lv_kondigre.
ls_mod-tarifart = lv_tarifart.
ls_mod-zwstandce = i_meterstand2_neu.
ls_mod-anzerg = lv_anzerg.
ls_mod-perverbr = lv_perverbr2.
"Add line
append ls_mod to ls_auto-auto_zw_mod.
CALL FUNCTION 'ISU_S_WORKLIST_INSTALL'
EXPORTING
x_devloc = ' '
x_action = i_action
x_no_dialog = i_no_dialog
x_upd_online = ' '
IMPORTING
y_db_update = e_updated
y_exit_type = lv_exit_type
CHANGING
xy_obj = ls_obj
xy_auto = ls_auto
EXCEPTIONS
not_found = 1
foreign_lock = 2
invalid = 3
internal_error = 4
not_qualified = 5
input_error = 6
system_error = 7
not_customized = 8
OTHERS = 9.
That should be it. If you nead to add MeterReadings, be sure to make use of FM's "ISU_S_METERREAD_CREATE" / "ISU_S_METERREAD_CHANGE" in conjunction with BAPI "BAPI_MTRREADDOC_UPLOAD" ...
Hope this helps ... If not, please check the SAP Community, as there are numerous examples on this.
2016 Oct 26 2:07 PM
Hi Nic,
Thanks for your response.
But i am still getting a return code of 6 (Input Error from ) ISU_S_WORKLIST_INSTALL.
😞
Thanks,
Anjana
,Hi Nic Teunckens,
Thanks for your response.
I have done exactly as you have mentioned but i still get a SY_SUBRC 6(Input Error ) ISU_S_WORKLIST_INSTALL:-(
Thanks,
Anjana
2016 Oct 26 2:15 PM
Oh yeah ... i am sorry for my earlier comment... It worked for me... it had a meter read...which i had to delete...
Thank you soo very much
2016 Oct 26 2:18 PM
2016 Oct 26 3:18 PM