Skip to Content
0
Feb 21, 2008 at 11:51 AM

Create a work area field symbol for dynamic table

507 Views

Hello Gurus,

I have the next code sequence in a class method:

itablref type ref to data,

itablref_line type ref to data,

<itabl> type standard table,

<witabl> type any,

CALL METHOD MB51READ->MB51OUTPUT

RECEIVING

TABLE_OUT = itablref.

ASSIGN itablref->* to <itabl>.

create data itablref_line like line of <itabl>.

assign itablref_line->* to <witabl>.

LOOP AT <itabl> assigning <witabl>.

READ TABLE imseg into <wimseg> INDEX sy-tabix.

Error >>>>> <witabl>-wempf = <wimseg>-wempf.

MODIFY <itabl> FROM <witabl> TRANSPORTING wempf WHERE mblnr = <witabl>-mblnr.

ENDLOOP.

It is not working, the error is: The data object <witabl> has no structure and therefor no component called "WEMPF".

I want only OO programming !!!!!!

I will reward points !!!!!