‎2008 Jul 28 8:09 AM
Dear Sir,
How can we access fields of structure in a program ? Structure name is mv10a and field name is kdmat.
I want include this structre in a program so that customer part no can be included in a program
Thanks
Anuradha
‎2008 Jul 28 8:11 AM
Anuradha,
see structure are works exactly as work area they are hoding only one value at a time.so you can use them same way as we use work area in program.
like:
mv10a-kdmat.
Amit.
‎2008 Jul 28 8:27 AM
Hi
How can we access fields of structure in a program ? Structure name is mv10a and field name is kdmat.
here is the sample snippet
DATA : fs_struct TYPE mv10a.
*------For Accesing
Fs_struct-KDMAT.
Regards
Pavan
‎2008 Jul 28 8:29 AM
Hi,
you defenitely can.
use the syntax:
mv10-kdmatto refer the field.
Regards,
Anirban
‎2008 Jul 28 8:32 AM
Hi,
Its same way as you use the table field..
<Table/Structure name>-<field>.
Regards
Narin
‎2008 Jul 28 8:48 AM
Hi anuradha,
You can access the field of a structure in the following manner..
<Structure name>-<Field Name>
Eg, If you want to write the field kdmat of structure mv10a
write mv10a-kdmat.
Best of luck,
Bhumika
‎2008 Jul 28 10:03 AM
Hi,
If you want to use the structure, you can define an object using DATA. Then you can use it like workarea.
See the sample.
DATA x_sample type mv10a.
you can reference the filed like x_sample-kdmat.