Skip to Content
0
Former Member
Jun 02, 2008 at 11:23 AM

Working with workareas

50 Views

Hello,

I have a problem using workareas:

I want to use a internal table as a puffer:

Data:
BEGIN OF SAPOUTPUTtemp occurs 50,
 PK like Zse11table-PK,
 FNCODE like Zse11table-FNCODE,
END OF SAPOUTPUTtemp.

Furthermore I define a work are like this:

DATA:
wa_Zse11table LIKE Zse11table.

There is a database from se11 I read from:

SELECT * FROM zse11table into corresponding fields of table SAPOUTPUTtemp
WHERE STATE = '0'.

So this code writes everything to my puffer.

Once I want to write the data from puffer to the workarea I wont get a error message but the contents of the workarea is empty:

LOOP AT SAPOUTPUTtemp.
wa_Zse11table-FNCODE = SAPOUTPUTtemp-FNCODE.
wa_Zse11table-MATNR = SAPOUTPUTtemp-MATNR.

Write : / 'Ouput:'.
skip.
write : / wa_Zse11table-FNCODE,
wa_Zse11table-MATNR,
wa_Zse11table-MAKTX,
wa_Zse11table-ZEINR,
wa_Zse11table-MATKL.
ENDLOOP.

As I said the output is empty.

For the background understanding: I want use the workarea to UPDATE the se11 table afterwards. Therefore I copy all the dataset beside the one column I want to change. This one will get the new vallue.

Then I say:

UPDATE Zse11table FROM wa_Zse11table.

Can you help me?

What is wrong with the work area?