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

Append column to table control durring runtime

Private_Member_19084
Active Contributor
0 Likes
1,513

Hi experts,

is there a possibility, to append a column to a table control durring the runtime?

So, that column is not appended to the dynpro at load-of-program.

I know, that I can modify the table control structure, but when I append a column to this I can't see them.

Thx in advance

12 REPLIES 12
Read only

Former Member
0 Likes
1,479

Hi,

You can use ALV for this purpose. Check the [Link|;

Read only

0 Likes
1,479

Hello,

thx for the fast answer.

I know, but my problem is, that I HAVE TO USE a table control.

Read only

0 Likes
1,479

Check the link I have given in previous reply. It have lot information about table control as well.

You may also create columns and hide it according to your requirement.

To hide a column we will use the INVISIBLE field of the structure CXTABA_CONTROL and set its value to 'X'.

e.g. To hide column number 3.

DATA col LIKE LINE OF tab-con-COLS .
READ TABLE tab_con-COLS INTO col WHERE index = 3. "tab_con is the name                                                                                
" of table control.
col-INVISIBLE = 3.
MODIFY  tab-con-COLS FROM col INDEX 3.

Read only

0 Likes
1,479

I know, but I have to APPEND the column durring runtime.

Not changing the visibility.

Read only

0 Likes
1,479

Hi Christian,

I need to append a column to a table control in runtime. Did you achieve this?

Thanks in advance.

Regards,

Pedro Sousa

Read only

0 Likes
1,479

HI Pedro,

first sorry for late answer, but I was at home due to illness.

I am very sorry, but I also found no solution for this problem.

I had to modify the dynpro.

Kind regards

Christian

Read only

manish_shankar
Participant
0 Likes
1,479

Hi Christian,

Go through this link

http://scn.sap.com/docs/DOC-32197

- Regards,

Manish Shankar.

Read only

0 Likes
1,479

ehmm....

and where is the column appended to the table control durring runtime?

Read only

0 Likes
1,479

+ (Insert) button is there, after clicking on it, it will add one blank row.

You've to change the code according to your requirement.

First it'll come like this:

After clicking on insert button

- Regards,

Manish Shankar.

Read only

0 Likes
1,479

ok, but what has this to do with this thread?

Read only

0 Likes
1,479

Ohh sorry, I interpreted column as row. It's my mistake.

I will try for solution and if I'll get, then sure I'll help you.

- Regards,

Manish Shankar.

Read only

0 Likes
1,479

oh ok,

now I understand your posts

Thx also for help