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: 

Is there any BAPI/Function module for EEDM04

Former Member
0 Kudos

Hi friends,

I am new to SAP IS utilities and IDEX.

I

need to create EDM profile (Transaction EEDM06). For which I found out that ISU_S_PROFHEAD_CREATE can be used.

After creating the EDM profile device and register needs to be allocated. This can be done with transaction code EEDM04.

Is there any BAPI/Function module for this? Could you please help.

Thanks.

6 REPLIES 6

Former Member
0 Kudos

Hi,

You can try the function module ISU_S_PROFASS_CHANGE to assign the profile number with the logical register number of the register. The profile number should be passed with the valid from date-time and to date-time.

Thanks.

Former Member
0 Kudos

After creating profile header by using ISU_S_PROFHEAD_CREATE function module then populate registers in the lt_xy_obj-db_data-ieprofass import parameter.

*Allocation of profiles.

CALL FUNCTION 'ISU_DB_EPROFASS_UPDATE_PREPARE'

EXPORTING

x_profass_old = lt_xy_obj-db_data-ieprofass

IMPORTING

yt_insert_profass = lt_insert_eprofass

yt_update_profass = lt_update_eprofass

yt_delete_profass = lt_delete_eprofass

CHANGING

x_profass_new = lt_xy_obj-data-ieprofass.

  • Now call the function to update the rows.

CALL FUNCTION 'ISU_DB_EPROFASS_UPDATE_ALL'

TABLES

xt_insert_profass = lt_insert_eprofass

xt_update_profass = lt_update_eprofass

xt_delete_profass = lt_delete_eprofass

EXCEPTIONS

OTHERS = 1.

Let me know if you need any more information.

Regards,

Siva Bontha

Former Member
0 Kudos

Hi all,

Thanks for your reply.

But I am still facing problem with assiging the device and register to the EDM profile using 'ISU_S_PROFASS_CHANGE'

Do we need to call any other FM before 'ISU_S_PROFASS_CHANGE'. I am not able to assign register and device data into the profile.

The profile head is created which I can see in table EPROFHEAD and transaction EEDM06.

We can see the allocation of profile in transaction EEDM04. Could you please let me know the table name where the allocation data are stored ?

0 Kudos

You are allocatiing the profile to a register so you want to have your logical register number.

If you have the equipment number you could go to table ETDZ or call FM ISU_DB_ETDZ_SELECT and fetch the registers. Then assign the one you want to use to lauto_key-logikzw of input parameter x_auto.

If you want to see the table of profile allocations you can check table EPROFASS.

If you're still facing problems please be more specific about it.

Edited by: evolderen on Apr 7, 2010 6:01 PM

Former Member
0 Kudos

Hi,

Actually we need to assign both register and device details to the EDM profile after creating the profile.

The creation of prtofile is done (throug FM 'ISU_S_PROFHEAD_CREATE') We can see the profile in table EPROFHEAD. But cannot assign the device and register data.

The requirement is as follows:

After profile is created, device and register need to be allocated. This can be done with transaction code EEDM04.

We are trying to use BAPI/FMfor this instead of doing a BDC of transaction EEDM04.

The following data needs to be assigned:

Profile (PROFILE) = Profile number created in previous step. (created profile number)

Profile allocation role (PROFROLE_SELECT) = 0001 (CONSUMPTION MEASURED

Device (GERAET) = Serial number (GERAET)

Material Number (MATNR) = Device category

Register (ZWNUMMER) = Internal register number

Equipment Number (EQUNR) = Equipment Number

Installation (ANLAGE) = Installation number.

The FMwe are using is as follows:

DATA: ls_auto TYPE eprofhead_auto,
        l_c_profile TYPE e_profile,
        l_c_upd TYPE e_update,
        ls_eprofass_object TYPE eprofass_object,
        ls_eprofass_screen TYPE eprofass_screen,
        ls_eprofass_screen_data TYPE eprofass_screen_data,
        l_c_exit TYPE exit_type.
  CONSTANTS: lc_true TYPE c VALUE 'X'.

  ls_auto-head-proftext = 'TEST123'.
  ls_auto-head-sparte = '20'.
  ls_auto-head-proftype = '01'.
  ls_auto-head-profvalcat = '01'.
  ls_auto-head-intsizeid = 'DAY'.
  ls_auto-head-mass = 'M3'.
  ls_auto-head-concheckgrp = 'STATUS'.
  ls_auto-head-forward_oriented = lc_true.
  ls_auto-head-datefrom =  sy-datum. 
  ls_auto-head-dateto = sy-datum + 90.
  ls_auto-head-time_zone = 'GMTUK'.

  CALL FUNCTION 'ISU_S_PROFHEAD_CREATE'
    EXPORTING
      x_upd_online    = lc_true
      x_no_other      = lc_true
      x_no_dialog     = lc_true
      x_no_commit     = lc_true
      x_auto          = ls_auto
      x_forminst_auto = lc_true
    IMPORTING
      y_profile       = l_c_profile
      y_db_update     = l_c_upd
      y_exit_type     = l_c_exit
    EXCEPTIONS
      invalid_key     = 1
      foreign_lock    = 2
      input_invalid   = 3
      system_error    = 4
      OTHERS          = 5.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  CLEAR:l_c_upd.

  ls_eprofass_screen-equnr = '10003906'.
  ls_eprofass_screen-geraet = 'TESTNEW'.
  ls_eprofass_screen-matnr = 'E-CR--1-5-GAS'.
  ls_eprofass_screen-zwnummer = 001.
  ls_eprofass_screen-profrole = '0001'.
*  ls_EPROFASS_SCREEN-anlage =
  APPEND ls_eprofass_screen TO ls_eprofass_object-screen-ieprofass.

  CALL FUNCTION 'ISU_S_PROFASS_CHANGE'
   EXPORTING
*     X_LOGIKZW                     =
     x_profile                     = l_c_profile
*     X_KEYDATE                     =
     x_upd_online                  = lc_true
*     X_NO_OTHER                    =
*     X_NO_CHANGE                   =
     x_no_dialog                   = lc_true
     x_obj                         = ls_eprofass_object
*     X_AUTO                        =
*     X_AUTO_REPLACE_EXISTING       =
   IMPORTING
     y_db_update                   = l_c_upd
*     Y_EXIT_TYPE                   =
   EXCEPTIONS
     invalid_key                   = 1
     invalid_register              = 2
     foreign_lock                  = 3
     input_invalid                 = 4
     system_error                  = 5
     OTHERS                        = 6
            .
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  COMMIT WORK AND WAIT.

After we run the FM 'ISU_S_PROFASS_CHANGE' , we get sy-subrc = 0 but cannot find the device and register data in transaction EEDM04 (after giving the profile number). I don't know the table name where this data is stored. Could you please have a look?

Thanks,

Edited by: Resdas on Apr 8, 2010 9:11 AM

0 Kudos

If you don't see an allocation for the profile in EEDM05 then nothing happend.

Although your post is a bit messy to read it seems to me as if you're not using the x_auto parameter in your call for FM ISU_S_PROFASS_CHANGE.

Create a parameter of type eprofass_auto, and a parameter of type eprofass_auto-ieprofass_auto.

Fill profrole, dateto, timeto, datefrom, profile, logikzw, etc. in the parameter of type eprofass_auto-ieprofass_auto.

Then append this parameter to the parameter of type eprofass_auto.

Then use this in your calll as x_auto.