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

Dynamic Table Control

Former Member
0 Likes
1,979

Hi all,

I have a requirement that caters to dynamic table control. It says that at the selection screen there will be Employee and company code( Both as select option ). Now in the table control it will have first column filled with all the employee name as input disabled and second column onwards each column will contain the company code as its title. Say, user enters 15 company code, then leaving first column there will be another 15 columns there. The field value will have active/inactive status for each employee and column. This is a NxN matrix you can think. Can this development be achieved.

Please suggest.

Thanks in advance.

Atanu

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,779

I don't think that you can do this in a table control, you can do it with a Editable ALV Grid.

Regards,

Rich Heilman

Read only

0 Likes
1,779

I am facing a fundamental problem in dynamic table control. My objective is to populate data to the dynamic internal table. I have written the following code:

create data NEW_LINE like line of <FS_1>.

assign NEW_LINE->* to <FS_2>.

LOOP AT S_EMPNAM.

MOVE S_EMPNAM-LOW TO <FS_2>.

APPEND <FS_2> TO <FS_1>.

ENDLOOP.

<FS_1> has 4 columns for eg. I want to enter data in all 4 fields. Presently it it populating one value to the internal table first column. I am not finding any other way of populating other values to other fields. For eg. I want to populate value "active" in all other columns.<FS_2> is having only length C(12) coming as default, not as the structure of dynamic internal table.

Another query: Can a combo box be put at ALV report when in edit mode. I want to put combo box there.

Please suggest.

Thanks and regards,

Atanu

Read only

0 Likes
1,779

Atanu,

For your second question, yes it is possible to provide a drop down in an ALV.

Please open a new thread if you have new questions.

Regards,

Ravi

Read only

0 Likes
1,779

Ravi,

I appreciate your knowledge. I will definitely open a new thread if anything new is of concern. Please can you elaborate on the drop down. Please note that this is a dynamic table control which is finally leading to ALV report. I want to put a drop down of active/inactive in the field.

Your help will be highly helpful.

best wishes,

Atanu

Read only

Former Member
0 Likes
1,779

is it possible to specify a max limit on the number of company codes....if yes then u can create that many columns in the table control and later at runtime you can control their visibility...

i can help you on how to do this(enabling/disabling individual columns or even individual cells) ...if this suits your requirement.

rgds,

PJ

Read only

0 Likes
1,779

Priyank,

I have one of the proposal of limiting number of columns in table control to a fixed number. Please can you elaborate on how can we hide number of columns.

Thanks in advance for all your cooperation.

Atanu