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: 

EMIGALL PROFASSIGN Hyper Object

daniel_mccollum
Active Contributor
0 Kudos

I'm attempting to generate a Hyper Object in EMIGALL with a PROFASSIGN structure.

it appears the code in 'GET_LOGIZW' in event SERVI01 is not translating in the Hyper Object, & when generating after adding PROFASSIGN, I am presented with the error

"The field "EPROFASS_AUTO_DATA" is unknown, but there is a field with the similar name "H_IEPROFASS_AUTO01"."

Are there any suggestions on overcoming this?

regards

Daniel

1 ACCEPTED SOLUTION

daniel_mccollum
Active Contributor

I resolved this by replacing the event code provided below (for reference)

" we have to combine EQUNR and ZWNUMMER (and dates)
" to have the correct LOGIKZW !!
data: wa_etdz like etdz.
data: it_etdz like table of wa_etdz.

select * from etdz into table it_etdz
         where equnr    = emg_profassign_int-equnr
           and zwnummer = emg_profassign_int-zwnummer.

loop at auto-ieprofass_auto into eprofass_auto_data.
   loop at it_etdz into wa_etdz
        where bis ge eprofass_auto_data-dateto
        and ab  le eprofass_auto_data-dateto.
      exit.
   endloop.
   if sy-subrc ne 0.
      mac_msg_putx 'E' '093'
                 'EG' emg_profassign_int-equnr
                 'X' space
                 space space.
      if 1 = 2. message e093(eg). endif.
      mac_jump 5.
  endif.

  eprofass_auto_data-logikzw = wa_etdz-logikzw.
  modify auto-ieprofass_auto from eprofass_auto_data.
endloop.

" move referred profile number to auto data
move-corresponding emg_profassign_int to auto-auto_key.

with this:

" we have to combine EQUNR and ZWNUMMER (and dates)
" to have the correct LOGIKZW !!
data: wa_etdz like etdz.
data: it_etdz like table of wa_etdz.


select * from etdz into table it_etdz
         where equnr    = emg_profassign_int-equnr
           and zwnummer = emg_profassign_int-zwnummer.

loop at auto-ieprofass_auto into H_IEPROFASS_AUTO01.
   loop at it_etdz into wa_etdz
        where bis ge H_IEPROFASS_AUTO01-dateto
        and ab  le H_IEPROFASS_AUTO01-dateto.
      exit.
   endloop.
   if sy-subrc ne 0.
      mac_msg_putx 'E' '093'
                 'EG' emg_profassign_int-equnr
                 'X' space
                 space space.
      if 1 = 2. message e093(eg). endif.
      mac_jump 5.
  endif.

  H_IEPROFASS_AUTO01-logikzw = wa_etdz-logikzw.
  modify auto-ieprofass_auto from H_IEPROFASS_AUTO01.
endloop.

" move referred profile number to auto data
move-corresponding emg_profassign_int to auto-auto_key.

the Hyper object now compiles without error.

View solution in original post

1 REPLY 1

daniel_mccollum
Active Contributor

I resolved this by replacing the event code provided below (for reference)

" we have to combine EQUNR and ZWNUMMER (and dates)
" to have the correct LOGIKZW !!
data: wa_etdz like etdz.
data: it_etdz like table of wa_etdz.

select * from etdz into table it_etdz
         where equnr    = emg_profassign_int-equnr
           and zwnummer = emg_profassign_int-zwnummer.

loop at auto-ieprofass_auto into eprofass_auto_data.
   loop at it_etdz into wa_etdz
        where bis ge eprofass_auto_data-dateto
        and ab  le eprofass_auto_data-dateto.
      exit.
   endloop.
   if sy-subrc ne 0.
      mac_msg_putx 'E' '093'
                 'EG' emg_profassign_int-equnr
                 'X' space
                 space space.
      if 1 = 2. message e093(eg). endif.
      mac_jump 5.
  endif.

  eprofass_auto_data-logikzw = wa_etdz-logikzw.
  modify auto-ieprofass_auto from eprofass_auto_data.
endloop.

" move referred profile number to auto data
move-corresponding emg_profassign_int to auto-auto_key.

with this:

" we have to combine EQUNR and ZWNUMMER (and dates)
" to have the correct LOGIKZW !!
data: wa_etdz like etdz.
data: it_etdz like table of wa_etdz.


select * from etdz into table it_etdz
         where equnr    = emg_profassign_int-equnr
           and zwnummer = emg_profassign_int-zwnummer.

loop at auto-ieprofass_auto into H_IEPROFASS_AUTO01.
   loop at it_etdz into wa_etdz
        where bis ge H_IEPROFASS_AUTO01-dateto
        and ab  le H_IEPROFASS_AUTO01-dateto.
      exit.
   endloop.
   if sy-subrc ne 0.
      mac_msg_putx 'E' '093'
                 'EG' emg_profassign_int-equnr
                 'X' space
                 space space.
      if 1 = 2. message e093(eg). endif.
      mac_jump 5.
  endif.

  H_IEPROFASS_AUTO01-logikzw = wa_etdz-logikzw.
  modify auto-ieprofass_auto from H_IEPROFASS_AUTO01.
endloop.

" move referred profile number to auto data
move-corresponding emg_profassign_int to auto-auto_key.

the Hyper object now compiles without error.