‎2006 Jul 12 4:55 AM
Hi,
Is there a way to declare an internal table, which does not refer to a data dictionary, in a smartform? I think this can be implemented using the TYPES node in the GLOBAL DEFINITIONS but Im not sure.
Thanks & Regards
Saikiran
‎2006 Jul 12 6:01 AM
‎2006 Jul 12 4:59 AM
You can do that exactly the way you have said. Declare a structure in the TYPES declaration and in the GLOBAL DATA tab you can declare the internal table referring to that TYPE.
I just did this in TYPES
types:begin of ty_mara.
include structure mara.
types: end of ty_mara.
And in GLOBAL DATA tab
T_MARA TYPE TABLE OF TY_MARA
That's all
regards,
Ravi
Note :Please mark all the helpful answers and close the thread if the issue is resolved.
Message was edited by: Ravikumar Allampallam
‎2006 Jul 12 5:02 AM
What exactly is your requirement...? Are you passing an internal table into the smartform..? Then you should declare the internal table in the Tables tab in the Form Interface...Then create a work area in teh Global defintion.
If you are trying to create a internal table containing specified number of fields, then create a work area and internal table in the Types tab of Global definition like this...
TYPES: types: begin of t_lips,
vgbel type vgbel,
end of t_lips.
TYPES: ITAB type table of t_lips.
In the Global data tab, do like this.
ITAB1 TYPE ITAB
t_lips type t_lips.
In the loop section (if you are using any loops), specify
ITAB1 INTO t_lips.
In this method , you can't use internal table with header line.
Close the thread once the problem is resolved.
‎2006 Jul 12 5:25 AM
hi
good
you r right, you can declare the internal table in the type tab of the global definition node.
here is a example
ypes : begin of x_norec,
vbeln like vttp-vbeln ,
end of x_norec .
types : ty_norec type table of x_norec .
types : begin of x_detail,
matnr like lips-matnr,
stawn like marc-stawn,
maktx like makt-maktx,
vbeln like lips-vbeln,
posnr like lips-posnr,
lfimg1(15) type c,
vgbel like lips-vgbel,
vgpos like lips-vgpos,
bstnk like vbak-bstnk,
kzwi4 like lips-kzwi4,
lfimg like lips-lfimg,
stprs(15) type c ,
herkl like marc-herkl,
totamt(15) type c ,
end of x_detail.
types : ty_detail type
thanks
mrutyun
‎2006 Jul 12 6:01 AM
‎2006 Jul 12 6:14 AM
Sai,
You will have to close the thread by choosing "Solved my problem" against the answer that helped you solve the problem. Then the thread will be marked as closed.
Regards,
Ravi