‎2007 Jun 15 10:34 AM
i have declared my structure as shown below
TYPES: t_mast TYPE STANDARD TABLE OF zrmmast.
DATA: it_mast TYPE t_mast.
how do i reference the fields for structure it_mast say for example table zrmmast has a field status and i want to reference field status using it_mast.
i want to select from TAB where status = status of structure it_mast
‎2007 Jun 15 10:36 AM
Hi
You can access all the fields of the table zrmmast using the structure it_mast
ie you can say it_mast-status or any field followed by it_mast-...
Reward points for useful Answers
Regards
Anji
‎2007 Jun 15 10:42 AM
thanx but i tried that and it gave me this error "IT_MAST is a table without a header line and therefore has no component called status". any other idea
‎2007 Jun 15 10:52 AM
HI,
Your IT_MAST is not a strucutre dude..
its an internal table thats why you cannot refer its fields like that,
what you can do is in you second DATA statement use as follows
DATA: IT_MAST like line of t_mast.
Regards,
Sesh
.
‎2007 Jun 15 10:36 AM
‎2007 Jun 15 10:42 AM
thanx but i tried that and it gave me this error "IT_MAST is a table without a header line and therefore has no component called status". any other idea
‎2007 Jun 15 10:48 AM
Hi,
define work area
wa_mast type t_mast.
you need to loop at it_mast into wa_mast and then refer
select ...... where status = wa_mast-status..
rewards if useful
regards,
nazeer
‎2007 Jun 15 10:54 AM
thanks but its now giving me this error: it "wa_mast cannot be converted to the line type of it_mast"
‎2007 Jun 15 10:57 AM
Hi,
If you want to create a work area create it as I have told
<b>DATA: wa_area like line of t_mast.
OR event better
DATA: wa_area type zrmmast.</b>
t_mast is an internal table and for creating a work area you have to use its line type.
Regards,
Sesh
.
‎2007 Jun 15 11:13 AM
Hi willard,
it is difficult to know your situation in detail.
post your relevant code (don't forget to use Code button above) and people will flood you with answers.
In the meantime, find out the difference between structures, internal tables, types ans so on.
Regards,
Clemens