Skip to Content
0
Former Member
Nov 21, 2005 at 01:18 PM

How to select into a field of my internal table?

3922 Views

Howdy,

I have an internal table:

TYPES: BEGIN OF T_OUTPUT,
        EQUIPMENT         TYPE  EQUI-EQUNR,
        DESCRIPTION       TYPE  EQKT-EQKTX,
        EQUIPMENT_CAT     TYPE  EQUI-EQTYP,
        MASTER_WARRANTY    TYPE  BGMKOBJ-MGANR,
        DELIVERY           TYPE  LIKP-VBELN,
END OF T_OUTPUT.

DATA: ITAB_DETAILS TYPE STANDARD TABLE OF T_OUTPUT WITH HEADER LINE.

Now i'd like to do a slect from LIKP into the field ITAB_DETAILS-delivery, but his code doesn't work?

SELECT VBELN FROM LIKP INTO table ITAB_details-delivery
         WHERE  VBELN IN S_VBELN
         AND VKORG  = P_VKORG
         AND WERKS  = P_WERKS
         AND ERDAT IN S_ERDAT
         AND LFART IN S_LFART.

Does anyone know what I am doing wrong?

I need to keep the name of the field as 'delivery' and I don't want to change its order in the internal table - Otherwise I'd ahve used the 'MOVE CORRESPONDING' command.

Does anyone have any ideas?

Thanks!