cancel
Showing results for 
Search instead for 
Did you mean: 

Start rotine error E:Statement "WA_ITAB-CRITICIDAD" is not defined.

Former Member
0 Kudos

Hi,

I've developed the following start routine in a transformation from an DSO to Infocube. Because different changes introduced by the customer I have to rewrite the same routine in the transformation I have from a FILE csv to a DSO.

Unfortunatelly i'm having this error: E:Statement "WA_ITAB-CRITICIDAD" is not defined. Check your spelling.

Can anybody help me with this?

*$*$ begin of global - insert your declaration only below this line  *-*

    Types: begin of itabtype,

    incidencia type i,
    criticidad TYPE C LENGTH 5,
    horas type /BIC/OIZQHORAS,
    difhoras type /BIC/OIZDIFHS,

    END OF itabtype.


    data : itab type standard table of itabtype
    with key incidencia,
    wa_itab like line of itab.

*$*$ begin of routine - insert your code only below this line        *-*

     DATA: wa_SOURCE_PACKAGE type _ty_s_SC_1.

    Loop at SOURCE_PACKAGE into wa_SOURCE_PACKAGE.

      move wa_SOURCE_PACKAGE-NROINCIDENCIA to wa_itab-incidencia.
      move wa_SOURCE_PACKAGE-CRITICIDAD to wa_itab-criticidad.
      move wa_SOURCE_PACKAGE-HSDEDICADAS to wa_itab-horas.
      move wa_SOURCE_PACKAGE-ZDIFHS to wa_itab-difhoras.

      If wa_itab-criticidad EQ 'Alta' and wa_itab-horas GE 8.

        wa_itab-difhoras = wa_itab-horas - 8.

      elseif

      wa_itab-criticidad EQ 'Media' and wa_itab-horas GE 12.

        wa_itab-difhoras = wa_itab-horas - 12.


        wa_itab-criticidad EQ 'Baja' and wa_itab-horas GE 12.

        wa_itab-difhoras = wa_itab-horas - 12.

      else.

        Clear wa_itab-difhoras.

      endif.

      append wa_itab to itab.

    endloop.

Thanks,

Diego

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Diego,

You're missing an elseif in your code:



*$*$ begin of routine - insert your code only below this line        *-*
 
     DATA: wa_SOURCE_PACKAGE type _ty_s_SC_1.
 
    Loop at SOURCE_PACKAGE into wa_SOURCE_PACKAGE.
 
      move wa_SOURCE_PACKAGE-NROINCIDENCIA to wa_itab-incidencia.
      move wa_SOURCE_PACKAGE-CRITICIDAD to wa_itab-criticidad.
      move wa_SOURCE_PACKAGE-HSDEDICADAS to wa_itab-horas.
      move wa_SOURCE_PACKAGE-ZDIFHS to wa_itab-difhoras.
 
      If wa_itab-criticidad EQ 'Alta' and wa_itab-horas GE 8.
 
        wa_itab-difhoras = wa_itab-horas - 8.
 
      elseif
 
      wa_itab-criticidad EQ 'Media' and wa_itab-horas GE 12.
 
        wa_itab-difhoras = wa_itab-horas - 12.

Put an elseif in here:


 
     elseif
 
        wa_itab-criticidad EQ 'Baja' and wa_itab-horas GE 12.
 
        wa_itab-difhoras = wa_itab-horas - 12.
 
      else.
 
        Clear wa_itab-difhoras.
 
      endif.
 
      append wa_itab to itab.
 
    endloop.


Hope this helps,

Regards,

Diogo.

Former Member
0 Kudos

Thanks again Diogo. It solved the problem.

Answers (0)