‎2005 Nov 23 7:35 PM
Hi, I have this type:
TYPES:
BEGIN OF it_consu_notif_todos_model,
matnr_p LIKE mseg-matnr,
aufnr LIKE afpo-aufnr,
rueck LIKE afru-rueck,
rmzhl LIKE afru-rmzhl,
END OF it_consu_notif_todos_model.
DATA: it_consu_notif_todos TYPE HASHED TABLE OF it_consu_notif_todos_model WITH UNIQUE KEY matnr_p.When I Activate the Program an error message told me that "IT_CONSU_NOTIF_TODOS" is a table without a header line.
I'll try to use "OCCURS 0 WITH HEADER LINE" in it_consu_notif_todos declaration but it doesn't support it using hashed tables..
Any suggest?
Thanks in advance,
CL
‎2005 Nov 23 7:54 PM
I don't think your problem is in this definition. It may be where you are using it. You might not have defined any work area for this internal table, that is why you are getting this error.
LOOP AT it_consu_notif_todos
INTO myworkarea <-- this is what is probably missing
ENDLOOP.
Srinivas
‎2005 Nov 23 7:54 PM
I don't think your problem is in this definition. It may be where you are using it. You might not have defined any work area for this internal table, that is why you are getting this error.
LOOP AT it_consu_notif_todos
INTO myworkarea <-- this is what is probably missing
ENDLOOP.
Srinivas
‎2005 Nov 23 8:00 PM
Do not use the <b>OCCURS 0</b> addition with tables defined using the form
DATA: <iTab> HASHED TABLE OF <type>.use this instead
DATA: <iTab> HASHED TABLE OF <type> WITH HEADER LINE.
‎2005 Nov 23 11:57 PM
Use like mentioned below -
TYPES:
BEGIN OF t_consu_notif_todos_model,
matnr_p LIKE mseg-matnr,
aufnr LIKE afpo-aufnr,
rueck LIKE afru-rueck,
rmzhl LIKE afru-rmzhl,
END OF t_consu_notif_todos_model.
types: t_consu_notif_todos TYPE HASHED TABLE OF
t_consu_notif_todos_model WITH UNIQUE KEY matnr_p.
data : it_consu_notif_todos type t_consu_notif_todos,
wa_consu_notif_todos type t_consu_notif_todos_model.
insert wa_consu_notif_todos into table it_consu_notif_todos.
loop at it_consu_notif_todos into wa_consu_notif_todos.
endloop.
Good luck
Hari
‎2005 Nov 23 7:57 PM
Hi Try to Check the Other part of code.
for me it works fine,
Regards
Rajesh
‎2005 Nov 24 12:36 AM
Carlos,
I also get a clean activation of your code.
What version of R/3 are you running?
‎2005 Nov 23 7:58 PM
Hi,
Why do you want to declare it as Hashed table.Is there any reason??
You can declare as table right.