2006 Sep 26 7:15 AM
Hi Friends,
i have one std table kna1.
Now i wanted to create internal table & work area for this.
Anybody will tell me how to do this??
data: itab_kna1 type standard table of kna1,
wa_kna1 type kna1.
Is it right??
Hi Friends,
i have one std table kna1.
Now i wanted to create internal table & work area for this.
Anybody will tell me how to do this??
data: itab_kna1 type standard table of kna1,
wa_kna1 type kna1.
Is it right??
2006 Sep 26 7:22 AM
Hi ,
You can use following syntax.
data: itab_kna1 type standard table of kna1,
wa_kna1 like line of itab_kna1.
Regards,
Sumit.
2006 Sep 26 7:23 AM
yes that will work.You can also do like this :
types : begin of t_kna1.
include structure kna1.
types : end of t_kna1.
data :
gt_kna1 type standard table of t_kna1,
wa_kna1 type t_kna1.
2006 Sep 26 10:48 AM
Hi Salil,
Yes your code will work perfectly.
however, if you dont need all the fields of standard table KNA1 or if you need more fields then in KNA1, then you can define a type,
types : begin of t_kna1,
include structure kna1,
field1 type abc,
fiedl2 type dec,
end of t_kna1.
or
types : begin of t_kna1,
kunnr type kna1-kunnr,
field1 type abc,
fiedl2 type dec,
end of t_kna1.and then define your table and work area with this sturcture.
Regards,
Richa.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |