2009 Jun 08 7:07 AM
Hi Experts ,
I am developing the report for the device replacement automated process..Can any one say is there any userexits,bapi or badi to perofrom device replacement process automatically.
Thanks in advance.
Regards,
Santhosh.
2009 Jun 08 7:42 AM
Enhancements (Transaction SMOD):
EDMDI001 (Customer-specific default values for installation, removal and replacement)
EDMDI002 (Customer-specific checks for installation, removal and replacement)
EDMDI003 (Customer-specific data for goods movement during installation and removal)
Customer Exits:
EXIT_SAPLE30B_001 (Permissibility checks for device replacement)
EXIT_SAPLE30D_001(Default values for installation, removal and replacement)
EXIT_SAPLE30D_002(Checks for installation, removal and replacement)
EXIT_SAPLE30D_001(Entries for goods movement during installation, removal and replacement)
EXIT_SAPLEG42_001 (Device modification, device and register data after modification)
EXIT_SAPLEG42_002 (Check device info record, device modification, device and register data)
EXIT_SAPLEG60_001 (Default allocation of logical registers)
Regards,
Siva
2009 Jun 08 7:42 AM
Enhancements (Transaction SMOD):
EDMDI001 (Customer-specific default values for installation, removal and replacement)
EDMDI002 (Customer-specific checks for installation, removal and replacement)
EDMDI003 (Customer-specific data for goods movement during installation and removal)
Customer Exits:
EXIT_SAPLE30B_001 (Permissibility checks for device replacement)
EXIT_SAPLE30D_001(Default values for installation, removal and replacement)
EXIT_SAPLE30D_002(Checks for installation, removal and replacement)
EXIT_SAPLE30D_001(Entries for goods movement during installation, removal and replacement)
EXIT_SAPLEG42_001 (Device modification, device and register data after modification)
EXIT_SAPLEG42_002 (Check device info record, device modification, device and register data)
EXIT_SAPLEG60_001 (Default allocation of logical registers)
Regards,
Siva
2009 Jun 08 9:32 AM
Hi Kumar,
If you are talking about Devices Info Record, the logic is the following:
Code extract:
...
*** Create DIR
*** Fill Device table
i_auto_dev-bis = c_end_of_time.
i_auto_dev-ab = p_instal_date.
* i_auto_dev-sermatnr = p_dev_cat.
i_auto_dev-matnr = p_dev_cat.
i_auto_dev-zwgruppe = p_register_group.
append i_auto_dev.
l_auto_create-dev[] = i_auto_dev[].
*** Fill Device Modification
i_auto_devflag-bis = c_end_of_time.
i_auto_devflag-ab = p_instal_date.
i_auto_devflag-matnr = p_dev_cat.
i_auto_devflag-eagruppe = c_true.
i_auto_devflag-komgrp = c_true.
i_auto_devflag-messdrck = c_true.
i_auto_devflag-ueberver = c_true.
i_auto_devflag-plombdat = c_true.
i_auto_devflag-herst = c_true.
i_auto_devflag-bglnum = c_true.
i_auto_devflag-umbaugr = c_true.
i_auto_devflag-parametr = c_true.
i_auto_devflag-plombe = c_true.
i_auto_devflag-typbz = c_true.
i_auto_devflag-zspanns = c_true.
i_auto_devflag-zstroms = c_true.
i_auto_devflag-zspannp = c_true.
i_auto_devflag-zstromp = c_true.
i_auto_devflag-zwgruppe = c_true.
i_auto_devflag-wgruppe = c_true.
i_auto_devflag-primwnr1 = c_true.
i_auto_devflag-sekwnr1 = c_true.
i_auto_devflag-primwnr2 = c_true.
i_auto_devflag-sekwnr2 = c_true.
i_auto_devflag-service_prov = c_true.
i_auto_devflag-egerr_info = c_true.
i_auto_devflag-ppm_zaehler = c_true.
i_auto_devflag-begru = c_true.
append i_auto_devflag.
*** Options
move c_save to l_contr-okcode.
l_auto_create-contr = l_contr.
l_auto_create-dev_flag[] = i_auto_devflag[].
*** Call FM for DIR creation.
call function 'ISU_S_SMALL_DEVICE_CREATE'
exporting
x_matnr = p_dev_cat
x_devision = p_div
x_keydate = p_instal_date
x_upd_online = c_true
x_no_dialog = c_true
x_auto = l_auto_create
x_int_num = c_true
importing
y_equnr = w_equnr
y_device = w_device
exceptions
not_found = 1
invalid = 2
foreign_lock = 3
input_error = 4
system_error = 5
internal_error = 6
not_qualified = 7
not_customized = 8
cancelled = 9
others = 10.
*** IF creation KO
if sy-subrc ne 0 .
****
endif.
clear i_auto_inst[].
*** Provide Data for further usage.
call function 'ISU_S_WORKLIST_INSTALL_PROVIDE'
exporting
x_anlage = p_anlage
x_eadat = p_instal_date
x_geraetneu = w_device
x_equnrneu = w_equnr
x_matnr = p_dev_cat
x_action = c_04 " INSTALL
x_upd_online = c_true
x_called_by_idoc = c_true
importing
y_auto = i_auto_inst
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.
if sy-subrc <> 0.
***
endif.
*** Options
i_auto_inst-okcode = c_save.
i_auto_inst-zwstand = c_true.
i_auto_inst-consumption = c_true.
*** CIC: table of swcont
l_ext_cont-element = c_noautomovein.
l_ext_cont-elemlength = c_001.
l_ext_cont-type = c_c.
append l_ext_cont to i_ext_cont.
*** Install new DIR.
call function 'ISU_S_WORKLIST_INSTALL'
exporting
x_anlage = p_anlage
x_eadat = p_instal_date
x_geraetneu = w_device
x_matnr = p_dev_cat
x_action = c_04 "INSTALL
x_upd_online = c_true
x_no_dialog = c_true
x_no_event = c_true
x_no_statistic = c_true
x_no_change_doc = c_true
changing
xy_auto = i_auto_inst
xy_ext_cont = i_ext_cont "gt_cont[]
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.
if sy-subrc ne 0.
***
endif.
...
Kr,
André
Edited by: Andre Almeida on Jun 8, 2009 10:33 AM