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

Smartforms - Dynamic table columns in Main window

Former Member
0 Likes
8,450

Dear all,

I have a requirement in smartforms main window .I need to design a Table in which the columns are not fixed they can vary from let say 1 to 50 .

Although Table height is dynamic but my requirement is to make table width and the headers to get populated dynamically .

Will it be possible to create dynamic table width and the design automatically inside the main window in the table.I have also attached a sample template to show you the main window wherein the columns  could vary from 20 to n.

where n = any  given integer greater or smaller than 20.

If not possible than what could be the work around for the same as the best possible alternative.

Hope to get the best cooperation from SAP Community.

Thanks & Regards,

Sudhish Ojha

13 REPLIES 13
Read only

Former Member
0 Likes
5,346

HI Sudhish,

Check the below link.

https://scn.sap.com/thread/953237

Thanks

Shony KJ

Read only

SwadhinGhatuary
Active Contributor
0 Likes
5,346

Hi sudhish ,

first you have to fix column no in smart form. instead of using template , use table in smart form so that dynamically it adjust the height and width of table content but you have to fix the no of column. if content of cell is more it come to below to the cell.

Read only

Former Member
0 Likes
5,346

Hello Sudish,

Refer following.

http://scn.sap.com/thread/151292

Thanks

Katrice

Read only

Former Member
0 Likes
5,346

Hi Sudhish,

I don't know the exact requirement but you can create certain line items and put a condition on it so that it can display the the number of columns based on your condition. But in your case, you have a big range so it may fail. Do wait for more suggestions from the experts.

Regards

Purnand

Read only

Former Member
0 Likes
5,346

Hi sudhish,

while creating the table itself,we are selecting the line type specifying the number of columns.Because we know what are all the fields to be printed on smartform.More over those are all the fields specified in any of the internal table.In which scenario you are asking for dynamic columns.Could you please brief on that?

Regards,

shamili.

Read only

0 Likes
5,346

Hi Shamili,

In the Test certificate smartforms which i need to create the chemical compositions ( P% , S%, SI% , Cu % etc )may vary on a scale from let say 2 to 50 depending upon the BIS Norms.

Therefore we cannot fix the columns , if we fix than we don't know how often we need to change them.

So we need to make or design the layout in such a way that the table columns could be designed and populated dynamically.

I have towards

Th sample required format is as above where the chemical compositions could vary to any given integer.

Thanks & Regards,

Sudhish Ojha

Read only

Former Member
0 Likes
5,346

Dear all ,

I again state that i require dynamic Table columns .I already know that templates are static also a table has a dynamic height (i.e. rows).

I would like to know how can table width be made dynamic so that they can very well adjust based on 2 , 10 , 15 , 20 , 36 etc columns.

Can some suggest some appropriate workaround.

Thanks,

Sudhish

Read only

rosenberg_eitan
Active Contributor
0 Likes
5,346

Hi all,

I am not aware that this is posible .

But as a work arround:

- Define a table with the maximum columns.

- The table heading will be filled in the print program in a structure .
- The table body will be filled in the print program in a table type .

To make life easier I usually define those data types in a class so every thing is define in one place .

Since they are defined as public they can be used in the print program and the "Form Interface" .

Read only

rosenberg_eitan
Active Contributor
0 Likes
5,346

Hi,

I was suspecting that this requirement is for this PESKY QM module.

Have you consider using html for your printout ?

Regards.

Read only

0 Likes
5,346

Thanks for your reply.

No i am using SAP ECC 6.0.

Read only

0 Likes
5,346

Hi,

pesky - causing irritation or annoyance;

Search "define pesky" in google :

Adjective

Causing trouble; annoying.

Synonyms

bothersome - annoying - tiresome - troublesome

regards.

Read only

kashif_bashir
Explorer
0 Likes
5,346

Hi SUDHISH,

Long time i had a similar requirment to show PO approvers in the bottom. As maximum of 7 approvers can be in a release strategy. I did this workaround.

1-Created seven tempates.

2-Show/Hide depending on the approval levels.

As a result i managed to get 1, 2,3 or upto 7 number of columns. Which look dynamically but was the tidious way of doing it in smart forms.

This may be help.

Regards

Read only

0 Likes
5,346

Thanks!

I could have done the same in case the number of columns would have been fixed and upto 10 but for the column range of even 20+ the permutation and combination funda is actually bit inappropriate.