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

global defination ...in smart forms..

Former Member
0 Likes
3,601

hi all 'smart forms' gurus...

how to declare table fields in global defination wat is to rite under variable name and associated type..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,703

variable typeaassinment associatedtype

LT_ITAB type table of bseg

12 REPLIES 12
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
2,703

Hi,

Create a type in global definitions in TYPES TAB and the declare the internal table and work area in GLOBAL DATA TAB

Also variable can be declared in GLOBAL DATA TAB.

In the variable name write the internal table name.

In Type assignment write TYPE.

In Associated type write STANDARD TABLE OF followed by type name created in TYPES

Regards,

Tarun

Edited by: Tarun Gambhir on Mar 26, 2009 11:33 AM

Read only

Former Member
0 Likes
2,703

hi..

variable name is noting but field name......?

Read only

Sm1tje
Active Contributor
0 Likes
2,703

Indeed....like it says, VARIABLE name.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
2,703

Hi,

Yes, variable name can be either an internal table name, work area name or variable name.

Regards,

Tarun

Read only

awin_prabhu
Active Contributor
0 Likes
2,703

Hi,

In 'Global Data' tab, variable name is name of internal tables or work areas or global variables etc...

Ex:

In 'Types' tab declare all user defined structures, data types.

TYPES:

BEGIN OF r_itab,

vbeln TYPE vbrk-vbeln,

vkorg TYPE vbrk-vkorg,

vtweg TYPE vbrk-vtweg,

spart TYPE vbrk-spart,

fkdat TYPE vbrk-fkdat,

END OF r_itab.

In 'Global Data' tab, declare internal tables, work areas, global variables.

Varibale name Type assignment Associated type

ITAB TYPE TABLE OF R_ITAB <----- Internal table

WA TYPE R_ITAB <----- Work area

VAR TYPE I <----- Variable

Read only

Sm1tje
Active Contributor
0 Likes
2,703

1. The name of your internal table

2. The associated (table) type.

Read only

Former Member
0 Likes
2,703

just give a Variable name and write TYPE under type assignment and give a data type (LAF1-NAME1, CHAR10) under associated type.

Read only

Former Member
0 Likes
2,703

In data-dictionary you must create your datatype Table Types....example : EKKO_TTY

Under global data in smartforms you can define your internal table:

tmp_ekko type ekko_tty

Read only

Former Member
0 Likes
2,703

Hi,

Global definition is useful to create the variables, workareas and internal tables which are using in entire smartforms. for user defined work areas create Types structrures in Types Tab . Those can be used to create Internal tables.

Read only

Former Member
0 Likes
2,703

Hi:

Under global definition u can declare as

lt_itab type standard table of but000.

lt_itab type but000.

like this

[LInk|http://mustafayalcin.com/blog/?p=61]

Regards

Shashi

Read only

Former Member
0 Likes
2,704

variable typeaassinment associatedtype

LT_ITAB type table of bseg

Read only

0 Likes
2,703

if u want to create a table of standard type with header line, eg. i_mkpf of type mkpf.

variable :- i_mkpf

Type :- type

Assos Type :- mkpf occurs 0.

And table withot a header line:-

variable :- i_mkpf

Type :- type table of

Assos Type :- mkpf .