2008 Jun 19 4:20 PM
Hello,
I have a internal table which stores following values.
T-Code----OBJECT
AC01--
AC01--
Now I have fetched all the data from AGR_1251 table into internal table T_ROLES which stores auhorization data for roles.
I want to read these internal table T_ROLES and check sy-subrc, such that
Object = S_TCODE,
Object = M_SRV_LS and M_SRV_LV, Field = ACTVT and VALUE = 01 and 02.
Now every time the internal table will have different Objects, Field and values but the T-Code will be same for all those values.
Regards,
Rajesh.
2008 Jun 19 4:28 PM
hi do like this..
select
AGR_NAME
OBJECT
AUTH
FIELD
LOW
HIGH
from AGR_1251
into table it_roles
where object in s_object .
loop at it_roles where OBJECT in ( S_TCODE , M_SRV_LV )
and field = ACTVT
and low = 1
and high = 2 .
write:/ ............
endloop .
Hello,
I have a internal table which stores following values.
T-Code----OBJECT
AC01--
AC01--
Now I have fetched all the data from AGR_1251 table into internal table T_ROLES which stores auhorization data for roles.
I want to read these internal table T_ROLES and check sy-subrc, such that
Object = S_TCODE,
Object = M_SRV_LS and M_SRV_LV, Field = ACTVT and VALUE = 01 and 02.
Now every time the internal table will have different Objects, Field and values but the T-Code will be same for all those values.
Regards,
Rajesh.
2008 Jun 19 4:28 PM
hi do like this..
select
AGR_NAME
OBJECT
AUTH
FIELD
LOW
HIGH
from AGR_1251
into table it_roles
where object in s_object .
loop at it_roles where OBJECT in ( S_TCODE , M_SRV_LV )
and field = ACTVT
and low = 1
and high = 2 .
write:/ ............
endloop .
2008 Jun 19 4:42 PM
Actually I want to read the internal table
READ table IT_ROLES with KEY ROLENAME = XXX OBJECT = (I need all the objects which are there in another internal table) Field = (All the field which are there in another internal table) Value (All the values which are there in another internal table)
2008 Jun 19 4:48 PM
try like this.
READ table IT_ROLES with KEY ROLENAME = XXX .
if sy-subrc = 0.
READ table IT_ROLES with KEY OBJECT = (I need all the objects which are there in another internal table).
.....................
hope this will help u.
2008 Jun 19 4:49 PM
hi read is used to get the single line of data but here we may get many no of records ..so it is better to use the loop than read statement
2008 Jun 19 5:25 PM
I have defined IT_MINI as internal table
DATA: BEGIN OF I_KEYROLE occurs 0,
KEYROLE LIKE ZROLEMAP-KEYROLE,
TCODE LIKE ZROLEMAP-TCODE,
OBJECT LIKE ZROLEMAP-OBJECT,
FIELD LIKE ZROLEMAP-FIELD,
VALUE LIKE ZROLEMAP-VALUE,
END OF I_KEYROLE.
DATA: IT_MINI LIKE I_KEYROLE OCCURS 0 with header line.
Now IT_MINI is populated with data.
When I try to read data as following, system says there is no component like IT_MINI[1]. Even if I try to read data
READ table I_RATT with KEY ROLENAME = I_ROLE-ROLE OBJECT = 'S_TCODE'
LOW = IT_MINI[1]-TCODE.
2008 Jun 19 5:42 PM
Hi,
READ table I_RATT with KEY ROLENAME = I_ROLE-ROLE
OBJECT = 'S_TCODE'
LOW = IT_MINI-TCODE.this is the way u use it. it will give the matching record for the goven condition,.
IT_MINI is the internal table in which u want to pass the field TCODE to Low to read the value from I_RATT.
regards,
madhu
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |