02-28-2009 1:22 PM
How i can create an internal table in a WDA?
I try this but not work.
data: begin of itab occurs,
low type c
high type c
end of itab.
it gives me error and said that occurs not supported!!!!
BR
Ali
03-01-2009 5:04 PM
Please refer this.
In ABAP Objects, the following statement causes an error message:
READ TABLE itab WITH KEY = key INTO wa.
Correct syntax:
READ TABLE itab WITH KEY table_line = key INTO wa.
Cause:
This variant is a special solution that lets you access the table with unstructured line types using a key. The introduction of the pseudo-component table_line, which can always be used instead of a key field, renders this variant superfluous.
Hope it will solve your problem
02-28-2009 3:00 PM
Hi Ali,
you can create internal table as
Data: lt_data type table of sflight, "sflight is an existing DataBase table
ls_data like line of lt_data. " lt_data is your new internal table.
Greetings
Prashant
03-01-2009 6:26 AM
I knwo this way,
I need to build my own internal table, not from dictionary.
BR,
Ali
03-01-2009 6:51 AM
create a type like this:
TYPES: BEGIN OF ty_type,
field_a type c,
field_b type n.
TYPES: END OF ty_type.
DATA: itab TYPE TABLE OF ty_type.
Also check F1 help for keyword DATA.
03-01-2009 8:18 AM
hi Micky Oestreich
you answer very helpfull.
My code is like this:
TYPES: BEGIN OF ty_type,
nomtk TYPE oijne-nomtk.
TYPES: END OF ty_type.
DATA: int_fnomtk TYPE TABLE OF ty_type.
data int_fnomtk_wa type ty_type.
LOOP AT ra_nomtk into int_fnomtk_wa.
READ TABLE int_fnomtk WITH KEY nomtk = int_fnomtk_wa-nomtk.
IF sy-subrc = 0.
DELETE ra_nomtk.
ENDIF.
But i face another problem is that in looping it give me :
In OO context either an INTO or an ASSIGNING specification or the addition
"TRANSPORTING TO FIELDS" must be used.
03-01-2009 5:04 PM
Please refer this.
In ABAP Objects, the following statement causes an error message:
READ TABLE itab WITH KEY = key INTO wa.
Correct syntax:
READ TABLE itab WITH KEY table_line = key INTO wa.
Cause:
This variant is a special solution that lets you access the table with unstructured line types using a key. The introduction of the pseudo-component table_line, which can always be used instead of a key field, renders this variant superfluous.
Hope it will solve your problem
03-01-2009 6:15 PM
If you take the time to read the ABAP help on these keywords, you could have answered your question yourself.
03-09-2009 8:58 AM