cancel
Showing results for 
Search instead for 
Did you mean: 

Hide table columns in smart form?

Former Member
0 Kudos

Hi Experts,

Here is the scenario.

We have a custom table that maintains some details for a materials. In my smartform, I need to display SO with item details. Now each Item has different material and based on the customizing of that material there are different columns. So Item 10 can have material with 3 columns, item 20 with 7 columns and so on....I need to display dynamic colums on the smart form.

This is my first smartform, very new to them. In ABAP, I was able to use Table control and hide the column that I didn't need. I'm not sure how to do this in Smart forms. I've searched the forum and not been able to find anything except for dynamic internal table. But even then, how would I create the nodes in Smart form.....

Any help on this would be great

Cheers

PM

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

After passing as string,the output had the colums separated by lines?

Or the string just prevented blank spaces for the colums that had no data?

We are facing a similar issue.

Any help would be appreciated.

Thanks

NM

Former Member
0 Kudos

*Hi experts,*

*please help me , becoz im freshr for abap,*

*my requirement is in smart form there are 10 line items in output form, one line item dont display in form output .*

*what can i do please help me.for this requirement.*

Edited by: Ravi kumarMCA on Jun 17, 2010 2:37 PM

Former Member
0 Kudos

Thank you guys,

I finally gave up trying to hide the column and here is a work around for this issue. I defined a program line and in ABAP I looped thru my table and concatenated the columns that I need in a string format and passed it on to the table cell. I defined only one cell to fit the maximum length. This took care of my columns.

FYI For others who may go thru similar issue.

This is what I needed

Material : 123

col1 col2 col3 col4

xxx xxx xxx xxx

Material: 456

col1 col2 col3 col4 col5 col6

xxx xxx xxx xxx xxx xxx

Trying to hide column would give me the following(eg col 3)

Material : 123

col1 col2 col4

xxx xxx xxx

Passing a string worked.

Cheers

Parul

Former Member
0 Kudos

Thank you guys,

I finally gave up trying to hide the column and here is a work around I

Former Member
0 Kudos

Just declare the internal table with the type of the custom table

Then at the table step declare the nodes.but put a condition that if record present for that table field then only print else hide.

like -

data :itab type standard table of z**. "internal table name

data : ls_itab like line of itab. "wa for iatb

at the table node-

for an example if you want to hide the servi order type-

At the header node- on SO text field go to the condition tab.

and write there - ls_itab-serordtype <> blank

write the same logic at body part as well

Hope this will help.

Regards.

Abinash

Former Member
0 Kudos

Hi

I tried that but it still displays a column. The only thing this condition's doing....is not display the data but it still displays a blank column. I need to eliminate the whole column. Any help on that??? Kinda urgent

Tnx

PM

Former Member
0 Kudos

Hi,

i think u cant hide a column in smartform u can just hide the data of it.

u can do it in ALV and Table Control

Regards

Sandipan

Former Member
0 Kudos

P M

Why dont you create 2 line types

one with the column you want to display

and one without the column

Put these in 2 different rows

put a condition on the row.

So now you will have it when you want

You can use the same or a similar line type for the header

former_member210123
Active Participant
0 Kudos

U can use the condition tabs in the text element of each cell of the table.There u can have ur condition.like based on the condition the cell will be displayed.

To be very clear.The text elements in each cell of the table in the header, main area and footer.You can have conditions.When u have condition on the text it will have e nerw icon attached to it.

This is the only way to satisfy your requirement.