ORM DATOS.
  SELECT BOTEXT KNUMA VKGRP KOBOG KAPPL
    INTO (KONA-BOTEXT,KONA-KNUMA,KONA-VKGRP,KONA-KOBOG,KONA-KAPPL)
    FROM KONA
    WHERE DATAB IN DATAB
    AND  DATBI IN DATBI
    AND  VKGRP IN VKGRP
    AND  BONEM IN BONEM.

   SELECT KAPPL KAPPL
     INTO (KONA-KAPPL, KONA-KOBOG)
     FROM T6B2
     WHERE KAPPL EQ KONA-KAPPL
      AND KOBOG EQ KONA-KOBOG.

  SELECT BEZEI
     INTO  TVGRT-BEZEI
     FROM  TVGRT
      WHERE VKGRP EQ KONA-VKGRP
      AND SPRAS EQ 'S'.

  SELECT BONUS KNUMH KSCHL KAPPL BONUS
    INTO (KOTE902-BONUS,KOTE902-KNUMH,KOTE902-KSCHL,KOTE902-KAPPL,KOTE902-BONUS)
    FROM  KOTE902
     WHERE KNUMA EQ KONA-KNUMA.

  IF SY-SUBRC = 0.
  ENDIF.

  SELECT VTEXT
    INTO TVBOT-VTEXT
     FROM TVBOT
      WHERE BONUS EQ KOTE902-BONUS
      AND SPRAS EQ 'S'.

  SELECT KBETR KONWA
    INTO (KONP-KBETR, KONP-KONWA)
    FROM KONP
     WHERE KNUMH EQ KOTE902-KNUMH
      AND KSCHL EQ KOTE902-KSCHL
      AND KAPPL EQ KOTE902-KAPPL.
      LT_INTERNA-KNUMA  = KONA-KNUMA.
      LT_INTERNA-BONEM  = KONA-BONEM.
      LT_INTERNA-BOTEXT = KONA-BOTEXT.
      LT_INTERNA-DATAB  = KONA-DATAB.
      LT_INTERNA-DATBI  = KONA-DATBI.
      LT_INTERNA-VKGRP  = KONA-VKGRP.
      LT_INTERNA-KAPPL  = KONA-KAPPL.
      LT_INTERNA-KOBOG  = KONA-KOBOG.
      LT_INTERNA-BEZEI  = TVGRT-BEZEI.
      LT_INTERNA-BONUS  = KOTE902-BONUS.
      LT_INTERNA-VTEXT  = TVBOT-VTEXT.
      LT_INTERNA-KBETR  = KONP-KBETR.
      LT_INTERNA-KONWA  = KONP-KONWA.
      APPEND LT_INTERNA.
      CLEAR LT_INTERNA.
      ENDSELECT.
      ENDSELECT.
      ENDSELECT.
      ENDSELECT.
      ENDSELECT.
      ENDSELECT.
  ENDFORM.              "DATOS
