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

passing TABLEVIEW object to FORM

Former Member
0 Likes
457

Hi. I'd like to write a form that will shade all rows in tableview object. So in that form I need to pass reference to that particular tableview i want to shade.


CONTROLS: t_view TYPE TABLEVIEW USING SCREEN 1031.
...

PERFORM shade_rows USING t_view.

FORM shade_rows USING tableview TYPE *???* .
  LOOP AT tableview-cols INTO cols.
    cols-screen-input = '0'.
    MODIFY tableview-cols FROM cols INDEX sy-tabix.
  ENDLOOP.
ENDFORM.                    " shade_rows

How should I declare a form parametr? Which type should it be?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
429

That should be table type.

if t_view is of type type_t_view. like :

data: t_view type table of type_t_view.

Then declare another table type :

Types: t_type_t_view type table of type_t_view.

and use this type there. like :

FORM shade_rows USING tableview TYPE t_type_t_view.

....

....

ENDFORM.

That should be table type.

if t_view is of type type_t_view. like :

data: t_view type table of type_t_view.

Then declare another table type :

Types: t_type_t_view type table of type_t_view.

and use this type there. like :

FORM shade_rows USING tableview TYPE t_type_t_view.

....

....

ENDFORM.

1 REPLY 1
Read only

Former Member
0 Likes
430

That should be table type.

if t_view is of type type_t_view. like :

data: t_view type table of type_t_view.

Then declare another table type :

Types: t_type_t_view type table of type_t_view.

and use this type there. like :

FORM shade_rows USING tableview TYPE t_type_t_view.

....

....

ENDFORM.