0

I get this error:

In a SELECT access, the read file could not be placed in the target field provided.

when executing this line of code:

SELECT vbeln
       posnr
       matnr
       netpr
       netwr
       kondm
       FROM vbap INTO TABLE t_tab
       FOR ALL ENTRIES IN postab
       WHERE vbeln = postab-vbeln.

I try one by one, and every time I put a currency field it will trigger this dump. Anyone know the root cause?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
RamonC
  • 31
  • 7

2 Answers2

2

How is your t_tab declared? It seems like it is declared like a structure or, maybe, component order is wrong. Try to make declarations like this:

DATA: postab LIKE TABLE OF vbap,
      t_tab  LIKE TABLE OF vbap.

and replace INTO clause with this piece of code

FROM vbap INTO CORRESPONDING FIELDS OF TABLE t_tab
Suncatcher
  • 10,355
  • 10
  • 52
  • 90
0

If your fields in the t_tab have other names then the fields your selecting be sure to match these with as:

SELECT vbeln AS ....
   posnr AS ....
   matnr AS ....
   netpr
   netwr
   kondm
   FROM vbap INTO TABLE t_tab
   FOR ALL ENTRIES IN postab
   WHERE vbeln = postab-vbeln.

If they have the same names try INTO CORRESPONDING FIELDS OF TABLE.
Also be sure that the fields in the t_tab have the right format.