2008 Feb 15 1:09 AM
I declared this dynamic internal table as shown:
field-symbols: <tab> type standard table.
What code should I write to declare workarea of my internal table that i declared?
I declared this dynamic internal table as shown:
field-symbols: <tab> type standard table.
What code should I write to declare workarea of my internal table that i declared?
2008 Feb 15 1:17 AM
DATA <work area> LIKE LINE OF <tab>.
OR
DATA <work area> TYPE <standard table>.
Regards,
Atish
2008 Feb 15 1:22 AM
I tried this code.
field-symbols: <tab> type standard table.
DATA wa LIKE LINE OF <tab>.
But I got this error http://img230.imageshack.us/img230/6861/screenog1.png
How do i solve this problem or should I use other codes?
2008 Feb 15 1:26 AM
Hi,
Sorry for my earlier reply. But the table which you defined using field-symbols you must need to assign.
i.e. for eg.
ASSIGN <internal table> TO <tab>.
only after this declaration <tab> become specific table type.
You can define generic work area like below.
FIELD-SYMBOLS <work area> TYPE any.
and now you can use as a work area of the internal table using ASSIGN keyword.
Regards,
Atish
2008 Feb 15 2:11 AM
Hi Atish,
can you give me example of the code you explain? as I am still sort of not sure.
2008 Feb 15 2:45 AM
Hi,
Can you tell me as why you are using field symbols then I can give you an example.
Regards,
Atish
2008 Feb 15 2:47 AM
I have this input field called IO_TABLE and a button. When the user key in the database name into IO_TABLE and press the button, the records/data in the database will be written out.
So i need to dynamically create an internal table to store the database entered in my IO_TABLE.
2008 Feb 15 3:08 AM
Hi,
So you can use the same table name to dynamically create a work area as I shown above.
Define
FIELD-SYMBOLS <work area> type any.
Now use this to dynamically create the work area.
Regards,
Atish
2008 Feb 15 3:10 AM
Yes I tried that. But I can't call this workarea when I tried create a table control using wizard. So what other method should I use to display the record of the table I enter at my IO_INPUT?
2008 Feb 15 1:36 AM
Hi
Check Below..
TYPES DECLARATION..
BEGIN OF g_ty_conditions,
knumh TYPE konh-knumh,
vakey TYPE konh-vakey,
kbetr TYPE konp-kbetr,
kopos TYPE konp-kopos,
END OF g_ty_conditions .
INTERNAL TABLE
DATA g_t_conditions TYPE TABLE OF g_ty_conditions WITH HEADER LINE .
WORK AREA
DATA g_r_conditions LIKE g_t_conditions .
Hope It Helps.
Praveen
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |