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 Table Control to a routine

Former Member
0 Likes
454

Hi all

I am writing a routine common to many dynpros. In this routine I have to handle data about a table control, but I don't know how to pass it to a routine .. or better, I don't know how to declare the form:

FORM my_form table_control TYPE ????
ENDFORM.

If is impossible, it should be sufficient to have the COLS table of the table control, but also here cannot understand which type can be used for passing this table as arguments to a form.

does anyone faced this issue ?

thanks for help

regards

Gabriele

Hi all

I am writing a routine common to many dynpros. In this routine I have to handle data about a table control, but I don't know how to pass it to a routine .. or better, I don't know how to declare the form:

FORM my_form table_control TYPE ????
ENDFORM.

If is impossible, it should be sufficient to have the COLS table of the table control, but also here cannot understand which type can be used for passing this table as arguments to a form.

does anyone faced this issue ?

thanks for help

regards

Gabriele

2 REPLIES 2
Read only

former_member209703
Active Contributor
0 Likes
413

If you actually need to pass the Table Control you can use CXTAB_CONTROL (Use type-pools: CXTAB) If you need to parse the actual data, you have to pass the corresponding internal table.

Read only

Former Member
0 Likes
413

Though you have a table control, you will be looping at some itab for that table control. Why dont you pass that itab to the subroutine.


FORM test TABLES p_gt_test.

ENDFORM.

p_gt_test will become the structure that you are actually passing. Hope this helps.