SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use ISU_S_WORKLIST_INSTALL

Former Member
0 Kudos

Hi Experts!

I want to perform some meter operations like Meter Installation, Removal and Replacement. And to do this i am being suggested to use the Standard function module ISU_S_WORKLIST_INSTALL.

So I am trying to do this but i am not getting how to do that as i am not clear which are the mandatory parameters to be passed and what next have to be done.

I tried out some things and its again and again giving me errors.

So please help me out with this problem.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

lv_auto-zwstand = gc_value_x.

lv_auto-consumption = gc_value_x.

lv_auto-okcode = gc_okcode.

CALL FUNCTION 'ISU_S_WORKLIST_INSTALL'

EXPORTING

x_anlage = x_anlage --> installation

x_eadat = x_meterremodate

x_geraetalt = lv_geraet --> device or serial no

x_matnralt = lv_matnr --> material no

x_action = you can get values for installation, removal, etc from the domain ACTIONWL

x_no_dialog = gc_value_x "'X'

CHANGING

xy_obj = lv_obj

xy_auto = lv_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.

Hope this helps,

Thank you,

Binno Don Thomas

View solution in original post

14 REPLIES 14

Former Member
0 Kudos

Hi,

lv_auto-zwstand = gc_value_x.

lv_auto-consumption = gc_value_x.

lv_auto-okcode = gc_okcode.

CALL FUNCTION 'ISU_S_WORKLIST_INSTALL'

EXPORTING

x_anlage = x_anlage --> installation

x_eadat = x_meterremodate

x_geraetalt = lv_geraet --> device or serial no

x_matnralt = lv_matnr --> material no

x_action = you can get values for installation, removal, etc from the domain ACTIONWL

x_no_dialog = gc_value_x "'X'

CHANGING

xy_obj = lv_obj

xy_auto = lv_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.

Hope this helps,

Thank you,

Binno Don Thomas

0 Kudos

Hi Thomas,

I tried to do that, but there is an error message that is displayed at the execution of the Function module. The Error message is Automation Data is incorrect.

So can you tell me what is still wrong in the inputs that i am getting such an error?

Thanks

Rishi

0 Kudos

Hi,

I have solved the problem and now i am able to do all the tasks of Installation, Removal and Replacement of the devices.

Thanks Thomas for your support.

Rishi

0 Kudos

Hi rishi,

I am facing the same problem as you are.

Can you please help me in Overcoming Atumation Data Error.

Regards,

Mohsin

0 Kudos

Hi Mohsin,

DATA: wa_auto   TYPE isu07_install_auto                         ,
        l_return  TYPE sy-subrc                                   .

* This function module gets the data of the system for the particular installation and device number.
* The data returned will be used to remove the device from the system.
  CALL FUNCTION 'ISU_S_WORKLIST_INSTALL_PROVIDE'
    EXPORTING
      x_devloc         = is_remove-devloc                               " Device Location
      x_anlage         = is_remove-anlage                               " Installation
      x_eadat          = is_remove-eadat                                " Activity Date
      x_geraetalt      = is_remove-geraetalt                            " Serial Number
      x_equnralt       = is_remove-equnralt                             " Equipment Number
      x_matnralt       = is_remove-matnralt                             " Material Number
      x_action         = iv_action                                      " Operation to be performed
      x_upd_online     = c_marked                                       " Online update 'X'
      x_no_dialog      = c_marked                                       " No dialog required
      x_no_mr_required = c_marked                                       " No meter readings considered
    IMPORTING
      y_auto           = wa_auto                                        " System Data
    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.
*     Save the data to the system, so set the ok-code as 'SAVE'.
      wa_auto-okcode = c_value_save                               .

*     This function module performs the device removal process using the data provided.
      CALL FUNCTION 'ISU_S_WORKLIST_INSTALL'
        EXPORTING
          x_devloc         = is_remove-devloc                           " Device Location
          x_anlage         = is_remove-anlage                           " Installation
          x_eadat          = is_remove-eadat                            " Activity Date
          x_geraetalt      = is_remove-geraetalt                        " Serial Number
          x_equnralt       = is_remove-equnralt                         " Equipment Number
          x_matnralt       = is_remove-matnralt                         " Material Number
          x_action         = iv_action                                  " Operation to be performed
          x_upd_online     = c_marked                                   " Online update
          x_no_dialog      = c_marked                                   " No dialog required
          x_no_mr_required = c_marked                                   " No meter readings considered
        IMPORTING
          y_db_update      = xv_db_update                               " Success Indicator
        CHANGING
          xy_auto          = wa_auto                                    " Device Data
        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.

The field xv_db_update = 'X' indicates that the database is updated with the operation selected. The above code will work fine in case of meter removal, but in case of meter installation or meter replacement, some additional data is to be given. I have added the below code that i implemented for meter installation or meter replacement.

DATA:           lt_auto_zw    TYPE STANDARD TABLE OF  isu07_zw           ,
                  lt_auto_ger   TYPE STANDARD TABLE OF  isu07_auto_ger     ,
                  wa_auto       TYPE                    isu07_install_auto ,
                  l_return      TYPE                    sy-subrc           .

  FIELD-SYMBOLS: <fs_auto_zw>   TYPE                    isu07_zw           ,
                 <fs_auto_ger>  TYPE                    isu07_auto_ger     .

* This function module fills the data in the WA_AUTO structure, that is required to be passed for the meter
* Installation or Replacement operation.
  CALL FUNCTION 'ISU_S_WORKLIST_INSTALL_PROVIDE'
    EXPORTING
      x_devloc         = is_install-devloc                                " Device Location
      x_anlage         = is_install-anlage                                " Installation Number
      x_eadat          = is_install-eadat                                 " Activity Date
      x_geraetneu      = is_install-geraetneu                             " New Serial Number
      x_equnrneu       = is_install-equnrneu                              " New Equipment Number
      x_geraetalt      = is_remove-geraetalt                              " Old Serial Number
      x_equnralt       = is_remove-equnralt                               " Old Equipment Number
      x_matnr          = is_install-matnr                                 " New Material Number
      x_matnralt       = is_remove-matnralt                               " Old Material Number
      x_action         = iv_action                                        " Operation to be performed
      x_upd_online     = c_marked                                         " Update Online
      x_no_dialog      = c_marked                                         " No Dialog appearance
      x_no_mr_required = c_marked                                         " Meter Readings not considered
    IMPORTING
      y_auto           = wa_auto                                          " Automation data for operation
    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.
  g_return = sy-subrc                         .

* In case of errors, raise the corresponding Exceptions
  CASE g_return                               .
    WHEN 1                                    .
      RAISE not_found                         .
    WHEN 2                                    .
      RAISE foreign_lock                      .
    WHEN 3                                    .
      RAISE invalid                           .
    WHEN 4                                    .
      RAISE internal_error                    .
    WHEN 5                                    .
      RAISE not_qualified                     .
    WHEN 6                                    .
      RAISE input_error                       .
    WHEN 7                                    .
      RAISE system_error                      .
    WHEN 8                                    .
      RAISE not_customized                    .
    WHEN 9                                    .

*     For any unexpected error, if the meter replacement process fails then raise Meter_Replacement_Failed
      IF iv_action = 04                       .
        RAISE meter_replacement_failed        .

*     For any unexpected error, if the meter replacement process fails then raise Meter_Installation_Failed
      ELSE                                    .
        MESSAGE e029(zmet)
        RAISING meter_installation_failed     .
      ENDIF                                   .

*   If there are no errors in the process, then carry on with the device operation
    WHEN 0                                    .

      lt_auto_zw  = wa_auto-auto_zw           .
      lt_auto_ger = wa_auto-auto_ger          .

*     Assign the User entered information to the device
      LOOP AT lt_auto_zw ASSIGNING <fs_auto_zw>                       .

        <fs_auto_zw>-zwnummere        = is_install-zwnummere          .   " Register Number
        <fs_auto_zw>-zwstandce        = is_install-zwstandce          .   " Meter Reading
        <fs_auto_zw>-tarifart         = is_install-tarifart           .   " Rate Type
        <fs_auto_zw>-perverbr         = is_install-perverbr           .   " Periodic Consumption
        <fs_auto_zw>-kondigre         = is_install-kondigre           .   " Rate Fact Group
        <fs_auto_zw>-anzdaysofperiod  = is_install-anzdaysofperiod    .   " Days of Periodic Consumption
      ENDLOOP                                                         .
      UNASSIGN <fs_auto_zw>                                           .
      LOOP AT lt_auto_ger ASSIGNING <fs_auto_ger>                     .
        <fs_auto_ger>-zwgruppe = is_install-zwgruppe                  .   " Register Group
        <fs_auto_ger>-gerwechs = is_install-gerwechs                  .   " Activity Reason
      ENDLOOP                                                         .
      UNASSIGN <fs_auto_ger>                                          .

*     Set the ok-code to SAVE for saving the data in the system
      wa_auto-okcode    = c_value_save                                .
      wa_auto-auto_zw   = lt_auto_zw                                  .
      wa_auto-auto_ger  = lt_auto_ger                                 .

*     Call the function module to perform the operation selected
      CALL FUNCTION 'ISU_S_WORKLIST_INSTALL'
        EXPORTING
          x_devloc         = is_install-devloc                        " Device Location
          x_anlage         = is_install-anlage                        " Installation Number
          x_eadat          = is_install-eadat                         " Activity Date
          x_geraetneu      = is_install-geraetneu                     " New Serial Number
          x_equnrneu       = is_install-equnrneu                      " New Equipment Number
          x_geraetalt      = is_remove-geraetalt                      " Old Serial Number
          x_equnralt       = is_remove-equnralt                       " Old Equipment Number
          x_matnr          = is_install-matnr                         " New Material Number
          x_matnralt       = is_remove-matnralt                       " Old Material Number
          x_action         = iv_action                                " Operation to be performed
          x_upd_online     = c_marked                                 " Update Online
          x_no_dialog      = c_marked                                 " No Dialog appearance
          x_no_mr_required = c_marked                                 " Meter Readings not considered
        IMPORTING
          y_db_update      = xv_db_update                                 " Success Indicator
        CHANGING
          xy_auto          = wa_auto                                      " Device Data
        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.

*     In case of errors, raise the corresponding Exceptions
      l_return = sy-subrc                                             .
      CASE l_return                                                   .
        WHEN 1                                                        .
          RAISE not_found                                             .
        WHEN 2                                                        .
          RAISE foreign_lock                                          .
        WHEN 3                                                        .
          RAISE invalid                                               .
        WHEN 4                                                        .
          RAISE internal_error                                        .
        WHEN 5                                                        .
          RAISE not_qualified                                         .
        WHEN 6                                                        .
          RAISE input_error                                           .
        WHEN 7                                                        .
          RAISE system_error                                          .
        WHEN 8                                                        .
          RAISE not_customized                                        .
        WHEN 9                                                        .

*         For any unexpected error, if the meter replacement process fails then raise Meter_Replacement_Failed
          IF iv_action = 04                                           .
            RAISE meter_replacement_failed                            .

*         For any unexpected error, if the meter replacement process fails then raise Meter_Installation_Failed
          ELSE                                                        .
            MESSAGE e029(zmet)
            RAISING meter_installation_failed                         .
          ENDIF                                                       .
      ENDCASE                                                         .
  ENDCASE

0 Kudos

Hi Mohsin,

See ISU_S_WORKLIST_INSTALL is the function module that performs all the major tasks like Meter Removal, Meter Installation, Replacement etc. For that it needs Automation data if operation needs to be performed without any screen popup.

There is a pattern that they have followed, all the fields ending with O or ALT are the one where old device information is to be filled and E or NEU are the one where the New device information is to be filled.

For example You have to install a device then all the information has to be filled in the fields with NEU at the end. For Removal of the device information is to be filled in the fields ending with NEU in the name.

There is a supporting function module that i have used to fill the data automatically to the AUTO structure that is required to be passed to the ISU_S_WORKLIST_INSTALL function module.

Use the function module ISU_S_WORKLIST_INSTALL_PROVIDE with proper parameters to get the AUTO structure filled.

Then add the ok-code in the AUTO structure with 'SAVE'.

Then pass the AUTO structure to the function module ISU_S_WORKLIST_INSTALL with proper parameters to perform the operations.

For your support i am adding a program at the bottom that i had done and is working properly.

Revert to me if there is any problem that you are facing.

Thanks.

Rishi Mirwani

Edited by: rishi mirwani on Feb 25, 2009 1:49 PM

0 Kudos

hi all

just testing my 1st post

Edited by: F.Hashmi on Dec 11, 2010 7:40 PM

Former Member
0 Kudos

Hi rishi ,

Thanks for help.

But the the Meter Reading recorded value doesnot get transferr to the screen when i saw it making NO_DIALOG = ' ' .

LOOP AT lt_auto_zw ASSIGNING <fs_auto_zw>.

<fs_auto_zw>-zwnummere = '001'. " Register Number

<fs_auto_zw>-zwstandce = '0'. " Meter Reading

<fs_auto_zw>-tarifart = 'WT_FIREM'. " Rate Type

<fs_auto_zw>-perverbr = '0'. " Periodic Consumption

<fs_auto_zw>-kondigre = 'FACTS'. " Rate Fact Group

  • <fs_auto_zw>-anzdaysofperiod = is_install-anzdaysofperiod. " Days of Periodic Consumption

ENDLOOP.

Can you please Help

0 Kudos

Hi Mohsin,

Make some changes in the code.

Remove the statement

x_no_mr_required = c_marked                                       " No meter readings considered

from all the function modules.

After the ISU_S_WORKLIST_INSTALL_PROVIDE function module in the Removal part add this code instead of the one present.

lt_auto_zw  = wa_auto-auto_zw                               .

*     Assign the User entered information to the device
      LOOP AT lt_auto_zw ASSIGNING <fs_auto_zw>                   .
        <fs_auto_zw>-zwstandca        = is_remove-zwstandce       .   " Meter Reading
      ENDLOOP                                                     .
      UNASSIGN <fs_auto_zw>                                       .

*     Save the data to the system, so set the ok-code as 'SAVE'
      wa_auto-okcode  = c_value_save                              .
      wa_auto-auto_zw = lt_auto_zw                                .
      wa_auto-zwstand = c_marked                                  .

Then call the ISU_S_WORKLIST_INSTALL function module.

Also add this code in the Install section after the function module ISU_S_WORKLIST_INSTALL_PROVIDE and remove the one present.

WHEN 0                                    .

      lt_auto_zw  = wa_auto-auto_zw           .
      lt_auto_ger = wa_auto-auto_ger          .

*     Assign the User entered information to the device
      LOOP AT lt_auto_zw ASSIGNING <fs_auto_zw>                       .

        <fs_auto_zw>-zwnummere        = is_install-zwnummere          .   " Register Number
        <fs_auto_zw>-zwstandce        = is_install-zwstandce          .   " Meter Reading (Install)
        <fs_auto_zw>-zwstandca        = is_remove-zwstandce           .   " Meter Reading (Removal)
        <fs_auto_zw>-tarifart         = is_install-tarifart           .   " Rate Type
        <fs_auto_zw>-perverbr         = is_install-perverbr           .   " Periodic Consumption
        <fs_auto_zw>-kondigre         = is_install-kondigre           .   " Rate Fact Group
        <fs_auto_zw>-anzdaysofperiod  = is_install-anzdaysofperiod    .   " Days of Periodic Consumption
      ENDLOOP                                                         .
      UNASSIGN <fs_auto_zw>                                           .
      LOOP AT lt_auto_ger ASSIGNING <fs_auto_ger>                     .
        <fs_auto_ger>-zwgruppe = is_install-zwgruppe                  .   " Register Group
        <fs_auto_ger>-gerwechs = is_install-gerwechs                  .   " Activity Reason
      ENDLOOP                                                         .
      UNASSIGN <fs_auto_ger>                                          .

*     Set the ok-code to SAVE for saving the data in the system
      wa_auto-okcode    = c_value_save                                .
      wa_auto-auto_zw   = lt_auto_zw                                  .
      wa_auto-auto_ger  = lt_auto_ger                                 .
      wa_auto-zwstand   = c_marked                                    .

I think this should work.

Let me know if you need any help and give points if useful.

0 Kudos

I am able to do all the tasks of Installation, Removal and Replacement of the devices except Meter Reading .

Not able to update Meter Reading (REG30-ZWSTANDCE).

Help is very much appreciated. Thank you in advance !

0 Kudos

Hi,

REG30-ZWSTANDCE : meter reading for device/register to be installed

REG30-ZWSTANDCA: meter reading for device/register to be removed

In the end, you want to use the function module as it is used by the ISMW. I suggest to use the ISMW for testing until all the parameters are properly set in the auto structure.

I'd also like to remind you that the function module ISU_S_WORKLIST_INSTALL is not released for external use. The usage of this function module has caused many problems in many projects. This is one more reason, why the usage of the function module ISU_S_WORKLIST_INSTALL in custom code is not recommended by SAP.

Have you already tried to use the the BOR object DEVLOC (transaction SEO) and the implemented methods, such as, DeviceLocation.DeviceReplace and DeviceLocation.DeviceInstall?

Kind regards,

Fritz

0 Kudos

Hi Friedrich,

Greetings!

i would like to know the purpose of this FM ISU_S_WORKLIST_INSTALL as we already have SAP standard tcodes to perform these functions like in device installation,device removal and device replacement.

Thanks & Regards,

Ganesh

0 Kudos

Hi,

While I try the removal with the mentioned parameters, I get the Meter reading as an estimated. Is there a way I can make this MR as actual?

Regards,

Unni

bibber0612
Participant
0 Kudos

Hello,

I have the same problem.

Can anybody help me?

Thanks and Regards,

Sven