Skip to Content
0
Former Member
Mar 24, 2009 at 04:30 PM

Error message when creating internal table

29 Views

I'm trying to define an intenal table to load the master data for 0EMPLOYEE.

I tried ALL, but always get the same error message:

"you can not use internal table as working area"

this is the code:

{*DATA: BEGIN OF WA_EMPL TYPE /BI0/QEMPLOYEE occurs 0 with header line.

DATA: WA_PACK TYPE STANDARD TABLE OF WA_TEMP.

*DATA: itab_empl TYPE STANDARD TABLE OF W_EMPL.

*DATA: wa_temp TYPE STANDARD TABLE OF wa_empl.

*DATA: wa_empl TYPE /BI0/QEMPLOYEE OCCURS 0 WITH HEADER LINE.

*DATA: wa_empl LIKE STANDARD TABLE OF /BI0/QEMPLOYEE.

  • Read ALL master data 0EMPLOYEE into internal table

SELECT * FROM /BI0/QEMPLOYEE INTO itab_empl.

  • Sort data

*SORT itab_empl ASCENDING BY EMPLOYEE OBJVERS DATETO.

  • Read data package into memory area

LOOP AT SOURCE_PACKAGE INTO wa.

READ TABLE wa_empl WITH KEY EMPLOYEE = wa-EMPLOYEE

OBJVERS = 'A'

DATETO >= wa-calday

DATEFROM <= wa-calday.

wa-CNTRCTTYPE = wa_empl-CNTRCTTYPE.

wa-COMP_CODE = wa_empl-COMP_CODE.

MODIFY DATA_PACKAGE FROM wa.

ENDLOOP.*DATA: BEGIN OF WA_EMPL TYPE /BI0/QEMPLOYEE occurs 0 with header line.

DATA: WA_PACK TYPE STANDARD TABLE OF WA_TEMP.

*DATA: itab_empl TYPE STANDARD TABLE OF W_EMPL.

*DATA: wa_temp TYPE STANDARD TABLE OF wa_empl.

*DATA: wa_empl TYPE /BI0/QEMPLOYEE OCCURS 0 WITH HEADER LINE.

*DATA: wa_empl LIKE STANDARD TABLE OF /BI0/QEMPLOYEE.

  • Read ALL master data 0EMPLOYEE into internal table

SELECT * FROM /BI0/QEMPLOYEE INTO itab_empl.

  • Sort data

*SORT itab_empl ASCENDING BY EMPLOYEE OBJVERS DATETO.

  • Read data package into memory area

LOOP AT SOURCE_PACKAGE INTO wa.

READ TABLE wa_empl WITH KEY EMPLOYEE = wa-EMPLOYEE

OBJVERS = 'A'

DATETO >= wa-calday

DATEFROM <= wa-calday.

wa-CNTRCTTYPE = wa_empl-CNTRCTTYPE.

wa-COMP_CODE = wa_empl-COMP_CODE.

MODIFY DATA_PACKAGE FROM wa.

ENDLOOP.}

I do not know what is the problem!!! please HELP!!!How I define my internal table for 0EMPLOYEE?

And Where?

Thank you!!

Rosana

Edited by: Rosana Choruzy on Mar 24, 2009 5:30 PM