Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Smartform - Internal table definition

sushant_singh
Participant
0 Likes
397

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

1 ACCEPTED SOLUTION
Read only

Shivaji16
Active Participant
0 Likes
346

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 .

2 REPLIES 2
Read only

Shivaji16
Active Participant
0 Likes
347

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 .

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
346

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.