‎2005 Nov 30 6:41 AM
Hi,
I need a help in the table control of Module pool.
Here I am using 40 columns in the table control. Out of 40, 30 columns are numeric type.
Now the client need only 5 columns total in the last row. I made it as per requirement.
But it is giving 5 columns total and the remaining 25 columns are filled zero value of total row.
Now the client doesnt want to display the zero for these 25 columns in the Total row.
Its very urgent. Please help on this.
Reward points will be providing for useful answers.
Advance Thanks 4 all.
Regards,
KBS REDDY
‎2005 Nov 30 11:25 AM
hi,
thanks for all your replies. but i didn't get the correct answer from any one. please help on this ASAP.
here using internal table i have populated the values in the table control.
i have calculated the totals for required columns(5) and i have disable the total row in the table as last row.
Vijay, using the internal table, now i know the total no. of rows after that i increased one value and i have moved the 'TOTAL' keyword in the first column for final row and displayed the calculated values for remaining columns. in my work first column is MATNR, so i can move the keyword 'TOTAL' in that column.
if it is input enable then it won't display any value means.. it will display space;
but, if it is output only then it displaying zeros for all numeric columns.
thanks for your help.
if you get any idea or any solution please let me know immediately.
points will be rewarding after getting the correct answer.
thanks.
regards,
KBS REDDY
‎2005 Nov 30 7:14 AM
Hi,
When you are doing SUM try to append SPACE to the remaining fields.
And then populate to Table control.
This you can do while looping your internal table.
Thanks.
If this helps award points and close the thread.
‎2005 Nov 30 7:14 AM
While Populating the Totals use write tot to tot-field no-zero.
and then move it to table control.
But I don't know how you are totalling. please let me know.
regards
vijay
‎2005 Nov 30 7:16 AM
Hi
Try referencing a character type fields for those coloumns.
There wont be any problem in referencing character type field..
Regards,
Abdul
‎2005 Nov 30 7:28 AM
Hi KBS Reddy ,
If you are displaying the totals in last row (as last row of the internal table ) of the table control and the five colums were consecutive side then u can apply this code after endloop as:
<i>(rough code)
**position the control at the last row.
read table itab sy-tabix.
check sy-subrc.
itab-cols into cols .
cols-screen-INVISIBLE = '0'.</i>
(or) check the program "<b>demo_dynpro_tabcont_loop_at</b>"
Hope this may helps you.
Regards,
Raghavendra
‎2005 Nov 30 11:25 AM
hi,
thanks for all your replies. but i didn't get the correct answer from any one. please help on this ASAP.
here using internal table i have populated the values in the table control.
i have calculated the totals for required columns(5) and i have disable the total row in the table as last row.
Vijay, using the internal table, now i know the total no. of rows after that i increased one value and i have moved the 'TOTAL' keyword in the first column for final row and displayed the calculated values for remaining columns. in my work first column is MATNR, so i can move the keyword 'TOTAL' in that column.
if it is input enable then it won't display any value means.. it will display space;
but, if it is output only then it displaying zeros for all numeric columns.
thanks for your help.
if you get any idea or any solution please let me know immediately.
points will be rewarding after getting the correct answer.
thanks.
regards,
KBS REDDY
‎2005 Nov 30 11:37 AM
Hi,
In your PBO, inside LOOP ENDLOOP, have a module for screen modifications and for the last row that has totals, you set screen-invisible = 1 inside LOOP AT SCREEN. ENDLOOP.
For example,
If your screen has following PBO Logic,
MODULE ...
MODULE ...
LOOP ...
****New module here for screen modification if does not ****exist already.
MODULE modify_screen.
ENDLOOP.
and then in MODULE modify_screen.
MODULE modify_screen.
****Basically check MATNR EQ 'TOTAL' or some thing like ****that
IF <your condition for totals line>.
LOOP AT SCREEN.
****Note instead of screen-name, you can assign a screen ****group to all columns w/o totals and then use
****SCREEN-GROUP1 EQ <your grp> logic
IF screen-name EQ <your column name w/o totals>.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDMODULE.
On another note, since you are already disabling this fields in the last row, you have all the screen modification logic already I guess, so just add SCREEN-INVISIBLE = 1 for all fields w/o totals..
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
‎2005 Nov 30 12:18 PM
hi friends,
i got the answer from Srikanth. he has given good idea.
any way thanks 4 all.
Regards,
KBS Reddy