‎2007 Mar 21 3:27 PM
what is the syntax to create structures .. i need to group some fields together
also how do i use them in my code
thanks !
‎2007 Mar 21 3:29 PM
Hi,
If you want to create a local structure in the program..Check the following..
Defining the structure.
DATA: BEGIN OF L_STRUC,
MATNR TYPE MATNR,
WERKS TYPE WERKS_D,
.........
END OF L_STRUC.
Populate the structure..
L_STRUC-MATNR = 'TEST'.
Thanks,
Naren
‎2007 Mar 21 3:28 PM
‎2007 Mar 21 3:29 PM
If you want to create a structure in ur program , try this
types : begin of itab,
matnr like mara-matnr,
maktx like makt-maktx,
end of itab.
‎2007 Mar 21 3:29 PM
Hi megan,
In the program you can define as follows:
data: begin of work_area,
field1 type matnr_d,
field2(20),
field3 type i,
end of work_area.
Regards,
Ravi
‎2007 Mar 21 3:29 PM
Hi,
If you want to create a local structure in the program..Check the following..
Defining the structure.
DATA: BEGIN OF L_STRUC,
MATNR TYPE MATNR,
WERKS TYPE WERKS_D,
.........
END OF L_STRUC.
Populate the structure..
L_STRUC-MATNR = 'TEST'.
Thanks,
Naren
‎2007 Mar 21 3:31 PM
hi,
TYPES : BEGIN OF ty_test,
code TYPE i,
name(10) TYPE c,
amount TYPE p DECIMALS 2,
END OF ty_test.
regards,
priya.
‎2007 Mar 21 3:38 PM
‎2007 Mar 21 3:41 PM
Hi,
Please try this.
data: begin of itab.
include structure ADRC.
data: field1(10),
field2(10).
data: end of itab.
Regards,
Ferry Lianto