Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Strange error

I got the followind code within my BSP:

* ============  Spalten ----> START
LOOP AT t_postng_new ASSIGNING <lw_postng_new>.
  CASE <lw_postng_new>-COMMAND.
    WHEN 'START_TRAY'.
      %>
         <htmlb:tray id      = "ID"  >
      <%
      CONTINUE.
    WHEN 'END_TRAY'.
      %>
         </htmlb:tray>
      <%
      CONTINUE.
  ENDCASE. "TRAY COMMAND
ENDLOOP. "T_POSTNG_NEW - LOOP
* ============  Spalten ----> ENDE

When I try to activate it says: WHEN only allowed after CASE.

If I try with (output htmlb:tray code instead of really using it):

* ============  Spalten ----> START
LOOP AT t_postng_new ASSIGNING <lw_postng_new>.
  CASE <lw_postng_new>-COMMAND.
    WHEN 'START_TRAY'.
      %>
         htmlb:tray id      = "ID"  
      <%
      CONTINUE.
    WHEN 'END_TRAY'.
      %>
         htmlb:tray
      <%
      CONTINUE.
  ENDCASE. "TRAY COMMAND
ENDLOOP. "T_POSTNG_NEW - LOOP
* ============  Spalten ----> ENDE

the code is activated. I am pretty sure I can surround the htmlb extension with if and endif or case .. endcase. What could be the error?

Regards

René

Message was edited by:

Rene Guenther

Former Member
Not what you were looking for? View more on this topic or Ask a question