Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

line selection using class

Former Member
0 Likes
347

experts,

how to use hide statement to display the line items of the selected row on the basic list using classes without using alv reporting.

since the syntactical error states that " hide is not supported with the attributes of a class ".

1 REPLY 1
Read only

Former Member
0 Likes
287

I think u cannot use Hide statement inside the class. To use hide u can define ur final table in class as public and read only. Then from outside the class use write statement to display the table. Here u can use hide statement.

REPORT z_test.

class lcl_mara definition.

public section.

data: i_mara type standard table of mara read-only.

methods: fetch_data.

endclass.

class lcl_mara implementation.

method fetch_data.

select * from mara

into table i_mara

up to 100 rows.

endmethod.

endclass.

start-of-selection.

data: dref type ref to lcl_mara.

data: w_mara type mara.

create object dref.

dref->fetch_data( ).

loop at dref->i_mara into w_mara.

write:/ w_mara-matnr.

hide w_mara-matnr.

endloop.

at line-selection.

write:/ w_mara-matnr.

window starting at 0 10 ending at 20 60.