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

column hide in basic list

Former Member
0 Likes
529

Hai,

in my basic list (out put) i have column1 column2 column3...etc , in any column if all values are zero , that column should be hide in basic list(output),

thank u in advance

4 REPLIES 4
Read only

Former Member
0 Likes
503

You'd have to build your output to an internal table and determine if all values in that column are 0 before you start writing your report and set a switch.

then during the loop that does the writing, if your switch indicates that all are zero, don't write that column.

Read only

Former Member
0 Likes
503

using if condition u can ...........

if <f1> = 0.

dont write.

else write..

endif..

if it is usefull Plz reward

Regards

Anbu

Read only

Former Member
0 Likes
503

hi,

here you can take flag. check it your internal table if you find null values through than set your flag with 1.

and display time check if flag is set than do not disply your column.

you can use this in field cat. if there is no entry in column than do not fill field cat for that column. but for that you have to make two internal table.

one for display column and another to do not disply column.

both internal table are different not same according thier strucuture.

if still there is any problem than reply with me brief.

and if this answer is help full than reward it.

regards,

Vipul

Read only

Former Member
0 Likes
503

Hi,

Please go thru the following logic, it will be helpful.

if all the columns are integers then add them, else concatenate into string.

After filling the internal table, create a work area of the table type .

suppose itab contains 3 fields

Loop at itab.

temp-f1 = temp-f1 + itab-f1.

.

.

.

  • if char .

take all values of the workarea as strings.

concatenate temp-f1 itab-f1 into temp-f1.

endloop.

in this way we can add all the columns incase of integers and concatenate incase of char.

Use a function module for filling FIELDCATALOG values.

now based on the value of this work area either 0 or space pass the field name .

Hope this is clear.

Reward points if helpful.

Thanks and regards.