Skip to Content
avatar image
-1
Former Member

SELECT ... INTO CORRESPONDING FIELDS OF itab

Hi,

Please check these codes below :

TYPES: BEGIN OF ty_mara ,
matnr TYPE mara-matnr,
matkl TYPE mara-matkl,
mtart TYPE mara-mtart,
meins TYPE mara-meins,
menge TYPE menge_d,
END OF ty_mara.

DATA: it_mara1 TYPE TABLE OF ty_mara.

SELECT matnr matkl mtart meins FROM mara
INTO CORRESPONDING FIELDS OF TABLE it_mara1
UP TO 100 ROWS.

When I do syntax-checking, it generates this error "The work area 'IT_MARA1' has more fields than selected."

It should not generate this error right, since I am using SELECT ... INTO CORRESPONDING FIELDS OF TABLE itab.

Please help, Thank you.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 06, 2017 at 02:29 PM
    -1

    Normally that is just a warning we get if the internal table has less fields than that were mentioned in the select. In this case you are not selecting MENGE field. Please check that it is just warning and not error.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      thank you so much for the respond. Yes it is a warning. But sometimes I am afraid that that warning might bite me back in the future. But as long as I know what I am doing with it. It shouldn't be a problem. Right ?

      Once again thanks so much. Hesitation answered.

  • Jun 06, 2017 at 12:59 PM

    The error is not an error, it is a warning, and it is exactly correct. You get this message because you have not selected menge.

    Add comment
    10|10000 characters needed characters exceeded