Application Development 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: 

Smartform Template creation.

Former Member
0 Kudos

Hi Friends,

There is a requirement to design below layout in smart form, Text everything is fixed no data comes from sap.  I tried to create with template am unable to split the cell which are marked. Please help me how to design this.

Thanks in advance.

Neetha.

16 REPLIES 16

Private_Member_7726
Active Contributor
0 Kudos

Hi,

You can't implement that layout in smarform one to one using template or a table alone, unfortunately - at least not proper vertical centering. The grid you could depict by ommitting "unnecessary" lines, but the header part would then need to consist of three rows...


You could also implement the header part using multiple secondary windows and multiple templates, but that's a potential maintenenance pain... and will still not enable proper vertical centering within cells... There is no vertical centering in smartform elements, in other words

cheers

Janis

Edit in: basically, you'd need to split the header part over 4 secondary windows as follows:

The biggest obvious drawback besides being pain to adjust: the positioning and size of the secondary windows content would be static.

Message was edited by: Jānis B

0 Kudos

Hi Guys,

please help me with alternate solution to design, data is filled from sap in yellow highlighted column and rest is the fixed.

Neetha.

0 Kudos

This message was moderated.

0 Kudos

Hi,

I'd go for a table - not template (in my experience tables are superior - in just about any aspect I can think of). Attached form IMO provides the best compromise between fulfilling customer's wishes and future maintainability, but let me warn you - it will already be pain to maintain. The grid is implemented using one table and combining 4 different row types for the table header.

The output is as follows at the moment and I have deliberately not set the correct column widths, line widths, or done other fine-tuning, so you can load the form, try to figure out what I've done how, try to adjust and see if you want to go this way. It should be possible to get the layout very close to your requirement by adjusting column widths, shifting around some cell contents, and manipulating paragraph formats (for fine tuning vertical alignment) of individual header cells (copy Smartstyle FP_TEST to Z namespace, change the Style in Form attributes, get rid of unused formats and give meaningful descriptions to the used ones, as a first thing before trying to adjust layout):

As I said, your preferences may vary... I'll also try to adjust the columns and Style in the evening today to show how far one can take this layout, but let me warn you again - I'm not giving out the "final product" (it's for your benefit to try to learn as much as possible by doing things yourself, I feel). I'll by happy to try to answer any questions you might have.

cheers

Jānis

0 Kudos

Either be a template or a table, each row has to be created for each line and borders have to be shaded according to the template.

0 Kudos

Indeed, but the template rows have fixed height and the assignments of content to template cells have to be done via typing the "bloody" row and column numbers, which both are (unnecessary, avoidable via the use of table) pain when the layout/contents need to be adjusted or finetuned...


Since the table permits to implement virtually everything the template does (apart from fixed row height obviously and the nearly useless for the purposes of using in most flowing layouts vertical alignment statically to the upper window border) I'm using tables to implement gridlike layouts 99% of time...

cheers

Janis

0 Kudos

Hi Janis,

Thanks, its really helpful am middle of my work I copied FP_TEST to Z and i called in my smartform but its messing up. will come back get back to if i struck some where.

Neetha.

0 Kudos

Hi,


Ok, this is as far as I can take, I believe - not 100% match but as close as possible, I feel:

- simplified by removing one headerline because it didn't help with anything;

- defined two paragraph formats for header part: one for "normal" and second for somewhat "lowered" text;

- all character formats to Helvetica 10;

- added the gray shading for header line 2 and gray borders for line 2 and 3 to indicate the borders to be removed...


I decided to still post the code and style; hope you can reuse/refer to it if you really get stuck somewhere

Have fun,

Jānis

0 Kudos

Hi Janis,

Thanks for your help, I could design almost 6 forms successfully. there is another requirement business need is if you see in the below screen shot the vertical and horizontal lines(pointed with red arrows) are displayed as it is as they have the fixed data. In the yellow shaded area(Line type -%LTYPE4) am looping my internal table and displaying it, if table has 3 records it displaying 3 columns with vertical and horizontal lines, if no data then no vertical and no horizontal lines its blank. but some times business want form to be printed with no data(in yellow shaded area) but they need vertical and horizontal line as below. please tell me how to print those lines.

Thanks,

Neeta.

0 Kudos

Hi,

There are many ways to achieve this but I guess the easiest and the best way (no coding in form) that comes to mind at the moment would be to pass to smartform the data table with 10 initial records (filled APPEND INITIAL LINE to {table name}). Then, in the main part of the table, define an additional row; in the row conditions add a condition {work area name} = INITIAL, and in one cell of the row assign a text having one space (the latter is important because rows not having any content will not be output):

In the conditions of original row add a condition {work area name} ≠ INITIAL.

If all the table fields are character-like and there is no fixed cell contents for normal row, you don't even need the second row - it's just there to avoid challenges with outputting or not outputting 0 values for numeric type fields. I still prefer, however, to make it explicit that there are normal rows and blank rows.

cheers

Jānis

Former Member
0 Kudos

Hi,

As per my understanding,

Please create 4 template for that table itself as like as below.

i explain for 2nd and 3rd template.

The output will be like

I hope this will help you.

thanks,

Dhivya N.

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

In smart forms you cannot have the equivalent of html rowspan or colspan (They are not that smart.... )

You can create something close (even in a table) .

You can have multiple types of lines .

The idea is to remove the borders .

Regards.

0 Kudos

Hi,

Create the template and remove the borders as required.

Rgds,

Vaikunt

0 Kudos

I am not the one asking.....

Next time use:

former_member289261
Active Contributor
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi,

as suggested by Eitan, please use multiple line types in a table and hide the borders where you want to merge the cells.

Please see my comments in green.

Create line types 1,2,3 as shown. And wherever you want to merge the cells (say cell 1 of line type 1 and cell 1 of linetype 2, just select those cells and hide the corresponding borders)