cancel
Showing results for 
Search instead for 
Did you mean: 

printing text in smartforms

Former Member
0 Kudos

Hi everyone

i am working on smartforms and i have to print a text which is of som 50lines in 2 columns

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

thank u

Former Member
0 Kudos

create templet with 2 line that fit to ur window.

create a loop node.

init fill the temple.

first line should have itab-field1(50).

second line should have itab-field+50(w_totalsize)

Former Member
0 Kudos

hi ravi,

did u find out the solution for this..? If so can u please share it with me too..

Former Member
0 Kudos

hi

i didnt find the solution yet.

just closing the thread. wil let u knw once i find a sol.

regards

Former Member
0 Kudos

cretae a templet with two lines.

call the templet between a loop and fill the templet using offset .

Former Member
0 Kudos

hi

can u tell me in detail how to do that becz i didnt use offset yet.

waiting for ur reply

Former Member
0 Kudos

Do you have the lines of text in an internal table?

If so you can do so.

Use the function module 'rkd_word_wrap' to wrap text into lines of, say, 20 characters each.

CALL FUNCTION 'RKD_WORD_WRAP'

EXPORTING

textline = <your itab text line>

  • DELIMITER = ' '

OUTPUTLEN = 20 <no of chars in a line>

  • IMPORTING

  • OUT_LINE1 =

  • OUT_LINE2 =

  • OUT_LINE3 =

  • TABLES

OUT_LINES = table containing

text

  • EXCEPTIONS

  • OUTPUTLEN_TOO_LARGE = 1

  • OTHERS = 2

Count the no of lines in the wrapped text using LINES( itab )

statement.

Divide the lines into two.

Then write those divided lines into table with two columns, remove loop at internal table check box.

Former Member
0 Kudos

Hi,

You need to first save the text in SO10 or you can do the same through Function module Save_Text.

Thanks.

Swati.

Former Member
0 Kudos

hi

i dont know whether my requirement was understood in the correct way r not.

see i have a text of some n lines that can be fitted in one page.

now this text has to be split into 2columns as we see in news paper.

so can anyone gv me some suggestions please...

Former Member
0 Kudos

hi,

Use split command with offset and u can print in two windows

Former Member
0 Kudos

Yes u can print this way. I just tried after looking at your thread.

Create 1 secondary window and main window in page. Go to form painter size your two windows in such a way that it is exacly as a cloumn .

Make it wide or increase sizes as per your wish and give a text element in each window .

Write all you text in each of the window.

Print it.

Try this it works.

Swetha

Former Member
0 Kudos

hi

whatever u said is ok.

but consider the case i have some text data in standard text and now i have to include in the window i have created so what would be the solution?

Former Member
0 Kudos

Try excute and see Ravi.

If you wanted to include text you pass it to text element of the two windows. And start increasing size of window by adjusting on how the output is seen.

As i already mention create a text element under each of window. Now you can even pass dynamic field values text which you are trying to fetch from print program.

Even iam working on same kind of requirement.

Reward if answers are useful.

Revert for any clarifications

Swetha.

Former Member
0 Kudos

HI,

first decalre a variable in global definition of lelngh some 300char.

then now assign the name of the standard textv which you created in SO10 at the initilisation of global definition.

there create a TEXT in the required window

in that mention that TEXT INCLUDE

then give the variable name at the text name

id: st

object text.

sure it will work.

reward if it is useful.

thanks

AM

Former Member
0 Kudos

can u tell me what exactly u r doing.

because i thought of doing the same thing (if it was only one page). incase there are some 10pages then hardcoding i dont think is the solution....

Former Member
0 Kudos

Hi

My requirement is to print text in two columns and i tried in looping main window in order to flow in next pages and i got irritated because there was overlapping. So i ended up in a solution of creating this way.

I actually need to print data form text include which is of 100(approx) lines in each coloum.

Now i am creating page 1 with two windows and hard coded the text and created page 2 repeated the same.

So like this i created 10 pages with each two windows an splitted text.

Which ever window requires dynamic fields i passed there.

My form is ready for testing now.

If this suits your req then do this way.

It is easy to even control the form.

Reward if useful.

Thanks

Swetha.

Former Member
0 Kudos

hi

i did my requirement similar way as i had only 2pages.

the reason for me to insist on this is that i was looking if there is any logical way to do that as i thought hardcode wouldnt be feasible soln.

Former Member
0 Kudos

If you find solution lemme know

Former Member
0 Kudos

hi ,

in the pc editor follow this path.

INSERT-> TEXT->STANDARD.

so that u can include a text.but u need to predefine the text in SO10 transaction.

by this way u can include the text in respective columns.

please reward me if helpful.

gupta pullipudi