2009 Apr 06 7:19 AM
Hi All,
I have a small requirement. I have an internal table for example IT_X and it has a field Y(it has more fields other than Y) and this field Y is of internal table IT_Z.
IT_Z has some fields a,b,c....
Now I need to access field b from IT_X.
I have tried to access it like IT_X-Y-b.But I am unable to access it.
Please help.
Thanks in advance
LRK
Hi All,
I have a small requirement. I have an internal table for example IT_X and it has a field Y(it has more fields other than Y) and this field Y is of internal table IT_Z.
IT_Z has some fields a,b,c....
Now I need to access field b from IT_X.
I have tried to access it like IT_X-Y-b.But I am unable to access it.
Please help.
Thanks in advance
LRK
2009 Apr 06 7:28 AM
Hi,
if your IT_X has field 'b' then you can directly access it by giving IT_X-b.
why are you using Y field in between (Is Y a structure which has field B).
Regards,
Syed
2009 Apr 06 7:36 AM
Hi Syed,
IT_X has a field called Y and Y is of table IT_Z and this IT_Z has a field called b. (or y has a field called b)
I am trying to access b through IT_X.
Hope now you got my question.
Thanks
LRK
2009 Apr 06 7:46 AM
Hi;
You can do like this
1.
loop at it_x
loop at it_z where b = it_x-y.
endloop.
endloop
2.
read it_x
if sy-subrc eq 0.
read it_z with key b = it_x-y.
endif.
Regards
Shashi
2009 Apr 06 7:49 AM
Hi ,
In this regard, you cannot access field of some internal table through field refrence.
If you want to do it you have to add the same feild in the Interanl table X and with a common field of refernce between internal table X and Z . and then you can access it,
Regards,
Nitin.
2009 Apr 06 8:08 AM
Hi All,
It got resolved.
First the internal table is moved to work area and then could be accessed.
Thanks All for the help.
Regards,
LRK
2009 Apr 06 8:14 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |