Skip to Content
0
Former Member
Oct 17, 2005 at 08:23 AM

Defining Structure through Table

31 Views

Hello Gurus.... Please check the Following code I want to have a Structure based on the Table MBEW, but I have the FOLLOWING SYNTAX ERROR...

<b>"i_mbew" cannot be a table,a reference, a string,or contain any of these objects</b>

DATA: i_mbew TYPE TABLE OF mbew,

wa_mbew TYPE mbew.

SELECT * FROM mbew INTO i_mbew.

LOOP AT itab INTO wa_itab.

READ TABLE i_mbew INTO wa_mbew WITH KEY

mtrnr = wa_itab-artnr.

IF wa_mbew-vprsv = 'V'.

wa_itab-price = wa_mbew-verpr.

ELSE.

wa_itab-price = wa_mbew-stprs.

ENDIF.

MODIFY itab FROM wa_itab.

WRITE itab.

ENDLOOP.