cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic formating in smartforms

former_member737583
Participant
0 Kudos
365

I'm just curious if there is a possible to create a dynamic formatting in Smartforms. What I mean saying dynamic? Lets imaging that I've a strucure where I've following information;

LINE_NUMBER

TEXT

This structure is used to build a table, where I can assign one or more text to one line.

So my example data in this table will be:

LINE_NUMBER | TEXT

1 | my first item

1 | first item description

1 | some other text

2 | second item

2 | second item extended name

2 | second item additional text

2 | second item summary text

and so one...

So I can have varying texts number assigned into one line (max 8).

Now I want to use paragraph, with 8 prepared tabs.

Now the problem comes, how to pass this texts into tableline inside smartform and do not prepare separate lines for 1,2,3... elements?

Any idea? It is possible to prepare data in variable which looks like:

1,,my first item,,first item description,,some other text

and display this data in such way, that commas will be recognized as tabs formatting in paragraph instead displaying them?

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member737583
Participant
0 Kudos

It's not feasible

Edited by: Tomasz Suchanek on Jul 15, 2010 11:00 AM

Former Member
0 Kudos

hi..try this...

create table->create a line type as required.

loop at itab containing ur data.

in the main area of the table create a row:

right click on main area->table line

in the output options of the row assign the line type from the drop down. in the condition of the row give the condition wa-LINE_NUMBER = 1.

similarly create other rows(table lines) giving the conditions 1 to 8.

that is you will have 8 table lines with conditions:

row1 condition -> wa-LINE_NUMBER = 1

row2 condition -> wa-LINE_NUMBER = 2

row3 condition -> wa-LINE_NUMBER = 3

.

.

.

row8 condition -> wa-LINE_NUMBER = 8

so if line_number = 1 then row 1 will be use..

if its 8 then row 8 will be used......

inside the rows u can use different text elements with different para formats...

Former Member
0 Kudos

Hi,

You have an option of Event on sort before, event on sort after with your loop node and table node.

You can make use of these... they work same as at new and at end of events in reports respectively.....

In your case...give the number field and select the check box under event on sort before... and write the display code

regards

padma

Former Member
0 Kudos

hi please elaborate it

i think u've to take an internal table then pass the table at the specified table feild then at last update the table .

thanks

Sachhidanada.

Former Member
0 Kudos

Hi,

I am trying to achieve a dynamic formatting of a table field in SapScript.

I have tried this:

Print Program:

DATA: G_DYN_SIGN(8) TYPE C. "Dynamic Formatting

DATA: G_DYN_SIGN2(8) TYPE C. "Dynamic Formatting

DATA: G_DYN_SIGN3 TYPE BAPIEXT-VALUE. "Dynamic Formatting

G_DYN_SIGN = '.4<'.

G_DYN_SIGN2 = 'F*'.

G_DYN_SIGN3 = '&KOMVD-KWERT(F0)&'.

Layout set:

IL 1:,,,,,,,,&KOMVD-KWERT(&G_DYN_SIGN&)&

IL 2:,,,,,,,,&KOMVD-KWERT(G_DYN_SIGN2)&

IL 3:,,,,,,,,&G_DYN_SIGN3&

Printout:

1: &KOMVD-KWERT(.4<)&

2: &KOMVD-KWERT(G_DYN_SIGN2)&

3: 0000000000000,00

I hope this will help you.

Thanks,

Khushbu.

Edited by: khushboo Brahmbhatt on Jul 28, 2008 2:42 PM