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

Internal table in smartform

Former Member
0 Likes
1,149

In driver program:

TYPES: BEGIN OF ty_output,

var1 TYPE c,

var2 type c,

TYPES: END OF ty_output.

DATA: gt_output TYPE TABLE OF ty_output.

how to declare this in smartforms?

Thanks

In driver program:

TYPES: BEGIN OF ty_output,

var1 TYPE c,

var2 type c,

TYPES: END OF ty_output.

DATA: gt_output TYPE TABLE OF ty_output.

how to declare this in smartforms?

Thanks

9 REPLIES 9
Read only

Former Member
0 Likes
1,089

Hi,

Declare the types in the TYPES tab in the smartform.

Create a table type of the same over there.

Declare the internal table of the above table type in the global data tab.

Regards,

Ankur Parab

Read only

former_member222860
Active Contributor
0 Likes
1,089

Did you try Declare the same in the Smartforms Global Definitions->Types. !

TYPES: BEGIN OF ty_output,
          var1 TYPE c,
          var2 type c, 
       END OF ty_output.
       
DATA: gt_output TYPE TABLE OF ty_output.

Read only

Former Member
0 Likes
1,089

Hello,

You can do this in program lines, if you need the structure of table this way and use it for further processing.

Thanks,

Sowmya

Read only

Former Member
0 Likes
1,089

hi

in se11 Create A STRUCTURE for TY_OUTPUT

CLICK >GLOBAL DEFINITIONS->GLOBAL DATA

GT_OUTPUT type table of TY_OUTPUT

Or in Program line

Thanks

Read only

Former Member
0 Likes
1,089

Hi,

You can do this in two ways....

1. If you need the interal table to be accessed globally in the smartform, you can declare the internal table in global definitions

first you need to define TYPES for the internal table in Types tab.

and this needs to be given as reference in Global Data tab for the internal table.

2. You need the internal table to be local ,then you can create a program lines node and declare the internal table as you do in the ABAP program

Hope this helps

Regards,

Sujatha

Read only

Former Member
0 Likes
1,089

Hi,

You can do this in two ways....

1. If you need the interal table to be accessed globally in the smartform, you can declare the internal table in global definitions

first you need to define TYPES for the internal table in Types tab.

and this needs to be given as reference in Global Data tab for the internal table.

2. You need the internal table to be local ,then you can create a program lines node and declare the internal table as you do in the ABAP program

Hope this helps

Regards,

Sujatha

Read only

Former Member
0 Likes
1,089

In global defenitions:

Under types tab:

TYPES: BEGIN OF ty_output,

var1 TYPE c,

var2 type c,

TYPES: END OF ty_output.

types: gt_output TYPE TABLE OF ty_output.

global data: gt_output type gt_output

under table node:

data tab:

loop : gt_output into gt_output

error:gt_output cannot be converted into line type gt_output?

Read only

0 Likes
1,089

You should define ONE variable for your internal table GT_OUTPUT (ok) and another variable with OTHER name for your workarea WA_OUTPUT type ty_output.

Read only

Former Member
0 Likes
1,089

1.create a structure of type ty_output

2.create table type and use it in smartforms.

Edited by: BrightSide on Jun 17, 2009 4:15 PM