Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error in ABAP Program

hi ,

I am a basis person and very new to ABAP.

Pls let me know the error in the folllowing program

REPORT Z_ROLES.

data : count type i.

data : begin of it_role occurs 0,

agr_name type AGR_NAME,

end of it_role.

data : begin of obj_table occurs 0,

objct type XUOBJECT,

end of obj_table.

select OBJCT from TOBJ into table obj_table

where OCLSS IN ('RS','RSR', 'RSBC').

clear count.

loop at obj_table.

add 1 to count.

endloop.

select AGR_NAME from AGR_1250

into table it_role

for all entries in obj_table

where OBJECT = obj_table.objct

AND

AGR_NAME LIKE 'Z%'.

clear count.

loop at it_role.

add 1 to count.

endloop.

write : count.

Tags:
Former Member
Former Member replied

Hi,

data : count type i.
data : begin of it_role occurs 0,
agr_name type AGR_NAME,
end of it_role.
data : begin of obj_table occurs 0,
objct type XUOBJECT,
end of obj_table.

select OBJCT from TOBJ into table obj_table
where OCLSS IN ('RS','RSR', 'RSBC').
clear count.
loop at obj_table.
add 1 to count.
endloop.

select AGR_NAME from AGR_1250
into table it_role
for all entries in obj_table
where OBJECT = obj_table-objct AND " Check here you have used '.' you should use '-'
AGR_NAME LIKE 'Z%'.

clear count.
loop at it_role.
add 1 to count.
endloop.
write : count.

Regards,

Sesh

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question