‎2007 Sep 06 5:32 AM
‎2007 Sep 06 5:36 AM
hi Ram..
Goto SE11
Select Data type radio button Enter the Structure name YSTR.
Create : select the Structure radio button.
Add the Fields and Data elements
Activate the Structure.
<b>reward if helpful</b>
‎2007 Sep 06 5:34 AM
Hi,
1. go to se11
2. go to button data type, create the name of the structure u want
3. choose structure button
4. fill the structure with the field u want.
5. After u done fill it, activate the structure
‎2007 Sep 06 5:34 AM
creating strucutre is some what same activity as creating custom table...
- go to SE11
- select data type option
- give your structure name
- from pop-up select option STRUCTURE
- enter fields that you want to include in structure
- save and activate
*Reward if usefull
‎2007 Sep 06 5:34 AM
Hi,
Go to se11.select Data type radio button.put name of structure you wanted to create.press create button.then you will get three radio button options.select structure from ir.
Regards,
Raghu.
Reward points if useful
‎2007 Sep 06 5:35 AM
Hi Ram,
Here is an eg.
types: begin of ty_struct,
var1 type i,
var2 type i,
end of ty_struct.
data : wa_struct type ty_struct.
here wa_struct is the structure.
for creating global structure
go to se11 -> in data type field give structure name and click create button in the pop up select structure and give the field names save and activate it.
Reward if helpful.
Regards,
Ravi G
‎2007 Sep 06 5:36 AM
hi Ram..
Goto SE11
Select Data type radio button Enter the Structure name YSTR.
Create : select the Structure radio button.
Add the Fields and Data elements
Activate the Structure.
<b>reward if helpful</b>
‎2007 Sep 06 5:46 AM
how can i know the data elements of a particular field which i want to add
‎2007 Sep 06 5:50 AM
which particular field u want to add??
If u want to create your own data element, just create the data element first, for ex: zde_bukrs, double click on the data element, then you can define by ur self the data element. after that your field will refer to the data element that u already made
‎2007 Sep 06 5:54 AM
can any body help me in giving the data elements of this
TYPES : BEGIN OF t_prodord_data,
name1 TYPE t001w-name1,
user type sy-uname,
aufnr TYPE caufv-aufnr,
arbpl TYPE crhd-arbpl,
ktext TYPE crtx-ktext,
erdat TYPE caufvd-erdat,
maktx TYPE makt-maktx,
matkl TYPE mara-matkl,
dwerk TYPE afpo-dwerk,
charg TYPE afpo-charg,
licha TYPE mcha-licha,
ntgew TYPE mara-ntgew,
gewei TYPE mara-gewei,
v_maratotal TYPE string,
v_resbtotal TYPE string,
ferth TYPE mara-ferth,
bdmng TYPE resb-bdmng,
meins TYPE resb-meins,
vkorg TYPE t001w-vkorg,
kdmat TYPE knmt-kdmat,
gamng TYPE caufv-gamng,
gltrp TYPE caufv-gltrp,
plnbez TYPE caufv-plnbez,
vgw02 TYPE plpo-vgw02,
vge02 TYPE plpo-vge02,
stdtc TYPE string,
stprc TYPE p decimals 2,
END OF t_prodord_data.
‎2007 Sep 06 5:59 AM
Hi,
Each field in the given structure is related to a table field.for example take t001w-name1.name1 is the field of table t001w.go to se11.and check the table t001w.you will find name1 field.next to it you will find data element used for that field.
‎2007 Sep 06 6:00 AM
‎2007 Sep 06 6:01 AM
Hi,
name1 TYPE t001w-name1, (name1)
user type sy-uname, (bname)
aufnr TYPE caufv-aufnr, (aufnr)
arbpl TYPE crhd-arbpl, (arbpl)
ktext TYPE crtx-ktext, (ktext)
erdat TYPE caufvd-erdat, (erdat)
maktx TYPE makt-maktx, (maktx)
matkl TYPE mara-matkl, (maktl)
dwerk TYPE afpo-dwerk, (dwerk)
charg TYPE afpo-charg, (charg)
licha TYPE mcha-licha, (licha)
ntgew TYPE mara-ntgew, (ntgew)
gewei TYPE mara-gewei, (gewei)
v_maratotal TYPE string, (char1024)
v_resbtotal TYPE string, (char1024)
ferth TYPE mara-ferth, (ferth)
bdmng TYPE resb-bdmng, (bdmng)
meins TYPE resb-meins, (meins)
vkorg TYPE t001w-vkorg, (vkorg)
kdmat TYPE knmt-kdmat, (kdmat)
gamng TYPE caufv-gamng, (gamng)
gltrp TYPE caufv-gltrp, (gltrp)
plnbez TYPE caufv-plnbez, (plnbez)
vgw02 TYPE plpo-vgw02, (vgw02)
vge02 TYPE plpo-vge02, (vge02)
stdtc TYPE string, (char1024)
stprc TYPE p decimals 2, (take direct entry type)
Thanks and Best Regards,
Vikas Bittera.
‎2007 Sep 06 6:02 AM
does we have to give the domain also or else it will get the name of the domain for that particular field automatically, and also onemore question, what about the string and char types.
‎2007 Sep 06 6:06 AM
actually you can double click in your program, for example t001w-name1.. u double click the field in the code, then it will directly call to table t001w, where it shows the data element name1. same like the other, just double click the field in the code, then it will directly go to table.
for type string, replace it with data element char255.
for the type p decimals 2. create ur own custom data element, which is zde_stprc. double click the data element to create new data element. choose predefined type button. fill the data type value with prec length 4 decimal places 2
go to field label, create the label name. Hope this will resolve it
‎2007 Sep 06 6:08 AM
when you are using the standard data element no need to give domain.
For char and string fields you have to create your own data element.
type the field name,then enter the data element name you want to create.It should start with z.for ex take field v_maratotal.create data element with name z_v_maratotal.double click on it.data element is created.now you can either create a doamin or directly enter your type and length inside the data element.
‎2007 Sep 06 6:09 AM
it will get everything automatically... just put the name in the data element field and press enter..
Thanks and Best Regards,
Vikas Bittera.
‎2007 Sep 06 5:59 AM
Hello,
You can create <b>Global structure and Local Structures.</b>
For Global Structure,
1.SE11
2. Enter your structure name in the data type option
3. Press create
4. select data type as structure
5. Enter the field names and there attributes
6. Save
7. Activate
For Local Structure
By using TYPES Statement u can create
<b>types: begin of struct_name,
field_name1 type type_name,
field_name2 type type_name,
end of struct_name.</b>
then by using data statement u can create structure
data : work_area type struct_name.
Alternate way
<b>DATA : begin of struct_name,
field_name1 type type_name,
field_name2 type type_name,
end of struct_name.</b>
Regards,
LIJO JOHN