‎2008 Jan 09 4:42 AM
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
‎2008 Jan 09 4:43 AM
‎2008 Jan 09 4:45 AM
hi,
data: var1 like ztable-colname.
where, colname is the column with numc 10 declaration.
reward points if helpful..
‎2008 Jan 09 4:48 AM
Hi,
There are many ways:
1. data: fieldname type ztablename-fieldname.
2. data: fieldname(10) type n.
Reward Points,
Regards,
Nishant
‎2008 Jan 09 4:49 AM
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
‎2008 Jan 09 4:51 AM
Hi Karthikeyan,
u can do it like this.
DATA: <var_name>(10) type NUMC.
cheers,
hema.
‎2008 Jan 09 5:21 AM
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