Application Development 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: 

declaring IT in smartform

Former Member
0 Kudos
160

Hi all!

I had declared the IT definition in smartform as below:

In global definitions:

g_lips_new type table of t_lips

in types i declared as follows:

types: begin of t_lips,

vgbel type vgbel,

end of t_lips.

But when i am using this IT in the form i am getting an error.

"g_lips_new is a table without an header line and hence no field called vgbel."

Any suggestions please

Praneeth

5 REPLIES 5

Former Member
0 Kudos
78

use this

types: begin of t_lips occurs 0,

vgbel type vgbel,

end of t_lips.

Former Member
0 Kudos
78

Praneeth,

I just tried this and its working for me.

In the TYPES TAB

TYPES: BEGIN OF TY_DATA,

TLINE TYPE TLINE,

END OF TY_DATA.

TYPES: TABLE_DATA TYPE TABLE OF TY_DATA.

In the GLOBAL DATA tab

T_DATA TYPE TABLE_DATA

<b> However, this table does not have a header line so you need to have another variable like WA_DATA TYPE TY_DATA in the global data tab that can act as the workarea for you. </b>

Regards,

Ravi

Message was edited by: Ravikumar Allampallam

former_member188685
Active Contributor
0 Kudos
78

Former Member
0 Kudos
78

Hi praneeth,

1. Simple.

2. Just use like this.

data : g_lips_new type table of t_lips <b>with header line.</b>

regards,

amit m.

Former Member
0 Kudos
78

Hi Praneeth,

It can be solved like this.

In the <b>TYPES</b> tab of <b>Global definition</b>, create a workarea and internal table like this...

<b>TYPES: types: begin of t_lips,

vgbel type vgbel,

end of t_lips.

TYPES: ITAB type table of t_lips.</b>

In the <b>Global data</b> tab, do like this.

<b>ITAB1 TYPE ITAB

t_lips type t_lips.</b>

In the <b>loop</b> section (if you are using any loops), specify

<b>ITAB1 INTO t_lips</b>.

In the text element, just write

<b>&t_lips-vgbel&</b>

That is it!!

Award points if found useful..

Regards,

SP.