cancel
Showing results for 
Search instead for 
Did you mean: 

How to declare the workarea and internal table in smartforms

Former Member
0 Kudos
1,224

How to declare the workarea and internal tables in smartforms not in driver program, i need to write the source code in smartform ,please send the answer asap

thanks

chinnu

View Entire Topic
Former Member

hi Kumar,

You can declare the Intenal table and the workarea in the Global data tab of global definition. The structural types for that internal table are declared in the types tab of the global definition.

If you use send any internal table with work area from your driven program, there is no need of creating the work are for that internal table inside the smarforms.

The coding can be done in the Initialization part.

You can also definr the subroutines. you want to define the form structure in the form routines.

for eg :

In types tab of Global definition.

Types : begin of t_tab,

matnr like mara-matnr,

maktx like makt-maktx,

end of t_tab.

In Global data tab of Global definition

for internal table :

Variable name = it_tab.

Type assignment = type table of

Associated Type = t_tab.

for work area :

Variable name = wa_tab.

Type assignment = type

Associated Type = wa_tab.

In initialization :

Output parameter = it_tab.

select maramatnr maktmaktx into table it_tab from mara inner join makt on maramatnr = maktmaktx.

Form routines :

Form.

.................

......................

..................

Endform.

Regards,

ragu

mamun_eitekh
Explorer
0 Kudos
Worked for me