‎2007 Feb 06 7:24 AM
Hi all,
I want to define an internal table in the global definition part of smartform,
so in which tab of global definition i will have to define it. Remember this
table contains fields from two different structures.
Thanks
Sushant Singh
‎2007 Feb 06 8:04 AM
Hi Sushant,
Declare a type definition of structure in the TYPES tab with the
fields from different structures.
Declare a table of that declared structure..
TYPES : BEGIN OF type_table,
matnr TYPE mara-matnr,
werks TYPE marc-werks,
lgort TYPE mard-lgort,
END OF type_table.
TYPES : t_table TYPE STANDARD TABLE OF type_table.
In the Global data Tab, declare the table of the above declared table...
I_TABLE TYPE T_TABLE .
‎2007 Feb 06 8:04 AM
Hi Sushant,
Declare a type definition of structure in the TYPES tab with the
fields from different structures.
Declare a table of that declared structure..
TYPES : BEGIN OF type_table,
matnr TYPE mara-matnr,
werks TYPE marc-werks,
lgort TYPE mard-lgort,
END OF type_table.
TYPES : t_table TYPE STANDARD TABLE OF type_table.
In the Global data Tab, declare the table of the above declared table...
I_TABLE TYPE T_TABLE .
‎2007 Feb 06 8:13 AM
Hi,
You can declare types in Global declaration->Types.And then call that type while declaraing internal table in Global declaration->global data.
In Global declaration->Types tab,declare
types : begin of ty,
f1 type d1-f1,
f2 type d2-f2,
end of ty.
In Global declaration->Global Data tab, declare
itab type standard table of ty.
One important thing to be noted is you can use the structures(types you declared) only inside the smartform.You cannot use the same in print program.