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

Table controls column totaling

Former Member
0 Likes
490

Dear Experts,

I had developed a screen which have table control with date wise(monthly bases) columns like you can say time sheet.

Now i am adding row dynamic as +1 per record.

I don't know how many rows enter by user.

But I want to show total of columns after (last + 3 ) rows.

It's position i want to change dynamic as row add.

Is it possible?

for sample i paste some code here.

-


PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

LOOP AT it_tpiguj INTO wa_tpiguj WITH CONTROL tctpi

CURSOR tctpi-current_line.

MODULE enable_columns.

ENDLOOP.

MODULE status_0100 OUTPUT.

SET PF-STATUS 'YTPIGUJ'.

IF r1 = 'X'.

SET TITLEBAR 'YTPI'.

txtheader = 'XYZ'.

ELSEIF r2 = 'X'.

SET TITLEBAR 'YTPI2'.

txtheader = 'xyz'.

ENDIF.

IF r1 = 'X'.

DESCRIBE TABLE it_tpiguj LINES line_count.

tctpi-lines = line_count + 1.

ELSEIF r2 = 'X'.

DESCRIBE TABLE it_tpiguj LINES line_count.

tctpi2-lines = line_count + 1.

ENDIF.

ENDMODULE.

-


now after this i want totaling at place

tctpi-lines = line_count + 3.

if lines increase then totaling possion will chage in manners of +3 lines

is this is possible then what should i have to do?

thanks & regards

Nayan Lad

<< Moderator message - Please do not promise points >>

I will close this thred at 6:00 pm indian time.

Edited by: Rob Burbank on Dec 6, 2011 9:40 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
455

Dear nayan

do you want to add row dynamically by pressing any button

something like Add / Remove row (in table control)

in your switch statement

you may try this logic

WHEN 'INSR'. "insert row

***Appending 1 rows for the table entries...

CLEAR <internal table>.

DO 1 TIMES.

APPEND <internal table>.

ENDDO.

Dear Experts,

I had developed a screen which have table control with date wise(monthly bases) columns like you can say time sheet.

Now i am adding row dynamic as +1 per record.

I don't know how many rows enter by user.

But I want to show total of columns after (last + 3 ) rows.

It's position i want to change dynamic as row add.

Is it possible?

for sample i paste some code here.

-


PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

LOOP AT it_tpiguj INTO wa_tpiguj WITH CONTROL tctpi

CURSOR tctpi-current_line.

MODULE enable_columns.

ENDLOOP.

MODULE status_0100 OUTPUT.

SET PF-STATUS 'YTPIGUJ'.

IF r1 = 'X'.

SET TITLEBAR 'YTPI'.

txtheader = 'XYZ'.

ELSEIF r2 = 'X'.

SET TITLEBAR 'YTPI2'.

txtheader = 'xyz'.

ENDIF.

IF r1 = 'X'.

DESCRIBE TABLE it_tpiguj LINES line_count.

tctpi-lines = line_count + 1.

ELSEIF r2 = 'X'.

DESCRIBE TABLE it_tpiguj LINES line_count.

tctpi2-lines = line_count + 1.

ENDIF.

ENDMODULE.

-


now after this i want totaling at place

tctpi-lines = line_count + 3.

if lines increase then totaling possion will chage in manners of +3 lines

is this is possible then what should i have to do?

thanks & regards

Nayan Lad

<< Moderator message - Please do not promise points >>

I will close this thred at 6:00 pm indian time.

Edited by: Rob Burbank on Dec 6, 2011 9:40 AM

2 REPLIES 2
Read only

Former Member
0 Likes
456

Dear nayan

do you want to add row dynamically by pressing any button

something like Add / Remove row (in table control)

in your switch statement

you may try this logic

WHEN 'INSR'. "insert row

***Appending 1 rows for the table entries...

CLEAR <internal table>.

DO 1 TIMES.

APPEND <internal table>.

ENDDO.

Read only

Former Member
0 Likes
455

It's required more efferts but I want simple solution so i had added another table control for totaling and solved my prolem.