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

Smartforms-Declaring Internal Table

Former Member
0 Likes
630

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
588

The issue is solbed, The Thread can be closed now

5 REPLIES 5
Read only

Former Member
0 Likes
588

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

Read only

0 Likes
588

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.

Read only

Former Member
0 Likes
588

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

Read only

Former Member
0 Likes
589

The issue is solbed, The Thread can be closed now

Read only

0 Likes
588

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