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

Data declaration

Former Member
0 Likes
637

Hi all

I am having z table..in that there is a field with NUMC 10. how can i declare this varible in my report?

regards

karthik

6 REPLIES 6
Read only

Former Member
0 Likes
556

data : <var> like <ztabname>-<fieldname>.

Madhavi

Read only

Former Member
0 Likes
556

hi,

data: var1 like ztable-colname.

where, colname is the column with numc 10 declaration.

reward points if helpful..

Read only

Former Member
0 Likes
556

Hi,

There are many ways:

1. data: fieldname type ztablename-fieldname.

2. data: fieldname(10) type n.

Reward Points,

Regards,

Nishant

Read only

Former Member
0 Likes
556

hi,

DECLARING VARIABLES:

Using Predefined Types

1. DATA { {var[(len)] TYPE abap_type [DECIMALS dec]}

| {var TYPE abap_type [LENGTH len] [DECIMALS dec]} }

[VALUE val|{IS INITIAL}]

[READ-ONLY].

Reference to Existing Types

2. DATA var { {TYPE [LINE OF] type}

| {LIKE [LINE OF] dobj} }

[VALUE val|{IS INITIAL}]

[READ-ONLY].

Reference Variables

3. DATA ref { {TYPE REF TO type}

| {LIKE REF TO dobj} }

[VALUE IS INITIAL]

[READ-ONLY].

reward if useful

thanks and regards

suma sailaja pvn

Read only

Former Member
0 Likes
556

Hi Karthikeyan,

u can do it like this.

DATA: <var_name>(10) type NUMC.

cheers,

hema.

Read only

Former Member
0 Likes
556

Hi Dear,

If u r using only single field from Z-table use like this.

Data: Fieldname type N.

If u want to use more foields from u r Z-table in u r

report program create the structure like this.

Types: Begin of x_Eg1

Fieldname1 type Datatype(or)Dataelement,

Fieldname2 type Datatype(or)Dataelement,

...

End of x_Eg1.

I think it will help u according to u r requirement.

Regards

AshokChowdhary