cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms-Increase the length of Long text

Former Member
0 Kudos

Hi!

I need to increase the lenght of the text in my smartform under my main window header 'Product and services" which at present is not able to give the entire text in the out put as the lenght is only 60 characters. I wnat to increase it to 170 characters . Can anyone tell me wher do I go and increase the output lenght so that when I print the invoice I get teh entire text and not justa part of it.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Check the Window length.

Or split the text into 2 and try to print it.

Thanks,

Chaitanya

Former Member
0 Kudos

The window lenght is ok and I dont think that need s to be changed , as the text can flow into the subsequent lines , the problem is after 70 characters the text is not displayed , its cut after those 70 characters.How do I increase its lenght

Becaus eeven if I increase the column width to 160 still the text that will print on invoice will be 70 characters which truncates my half of teh text.

Any help?

Thanks

Answers (2)

Answers (2)

Former Member
0 Kudos

z

former_member181962
Active Contributor
0 Kudos

Go to the window and see what is the variable that is used to print that text.

If it is of 60 characters, you need to modify the length of the variable to 170.

Activate the smartform .

YOu have to change the driver program also.

YOu have to pass the full 170 character text from the driver instead of the 60 character variable.

Regards,

Ravi

Former Member
0 Kudos

What I find is that when I go to the billing document and see the details there(vf03) and chech the material text maintained , I see whats happening. Only the contents of the first line maintaned is printing in the smartform while the subsequent lines are not printed and the lenth of the text lines are 70 in each row thats why only that is getting printedand not the second and thrid lines even though there is lot of place in my smartform to print the entire text. How do i caputer the subsequent lines and not only teh first line. Please.

Thanks

Former Member
0 Kudos

Hi,

Use the read_text function modules with approriate Text_ID and Text Object, language parameters.

You will get the long text in an internal table. Loop this internal table and print all the lines in that.

Thanks,

Subramanian

Former Member
0 Kudos

This is what I have done:-

    • get material sales text

concatenate gs_gen_del-bil_number gs_gen_del-itm_number into l_product_key.

call function 'READ_TEXT'

exporting

name = l_product_key

object = 'VBBP'

id = '0001'

language = sy-langu

tables

lines = lt_lines

exceptions

not_found = 1

ohters = 2.

if sy-subrc = 0.

read table lt_lines into ls_lines index 1.

move ls_lines-tdline to g_kdmat.

  • Remove sapscript special characters

replace: '<(>' in g_kdmat with ' ',

'<)>' in g_kdmat with ' '.

exit.

endif.

    • get Material description

select single arktx into g_kdmat from vbrp where

vbeln = gs_gen_del-bil_number and

posnr = gs_gen_del-itm_number.

  • vbeln = gs_vbap-vbeln and

  • posnr = gs_vbap-posnr.

if sy-subrc <> 0.

g_kdmat = 'No Product service !!!!!'.

endif.

Do I need to to anything to it to increase the lentght or what do I need to do , im totally clueless as what to do to bring out the entire text.

Thanks

Former Member
0 Kudos

Hi,

In the smartforms, check the window width where this text needs to be printed. If the width is not sufficient, extend it. Check if any other nearby fields are overlapping this field.

Even if they overlap, then the entire text may not be visible.

regards,

Subramanina

Former Member
0 Kudos

No nothing is oveerlapping or its not that space is not there on smart forms , .If you see in the code that I sent there is a field

gs_kdmat . In teh global field definbition I see the associated type as CHAR70 . This si what I ahve to change I beleiev.

There is enough space in teh smart form to take the entire text , nothing isoverlapping but teh lenght of this gd_kdmat is 70 which needs to be increased to 160 , that is what I dont know where to chanfge.

Thanks

Former Member
0 Kudos

Oh..Fine. Then in the global definition, change the data type from Char70 to STRING.

It should work.

Regards,

Subramanian

Former Member
0 Kudos

oh ok so changing that associated type from CHAR70 to STRING would help me out ? Let me try that out , never thought that .

Thanks

Former Member
0 Kudos

In teh global data g_kdmat is TDLINE and gs_kdmat is CHAR70 . I am not sure if I should be changing the associated type of TDLINE to string or not .

Thanks

Former Member
0 Kudos

I changed the type to STRING but still its not working , its only taking 70 characters and not more than that .CAn anyone helpme plz?

Thanks'

Former Member
0 Kudos

Yes please.

Go ahead and change it. Dont worry. It will work as you expected.

Regards,

Subramanian

Former Member
0 Kudos

As I siad earlier its not working , I dont know why.

Its exactly taking in 70 characters only.

Thanks

Former Member
0 Kudos

In your code after calling the READ_TEXT FM do the following changes:

1. instead of using a variable i.e. g_kdmat here, use an internal (itab) table of CHAR70 (better to define a table type in DDIC). and populate this table by the entries of

lt_lines.

data: itab type standard table of char70 initial size 0.

data:w_itab type char70.

concatenate gs_gen_del-bil_number gs_gen_del-itm_number into l_product_key.

call function 'READ_TEXT'

exporting

name = l_product_key

object = 'VBBP'

id = '0001'

language = sy-langu

tables

lines = lt_lines

exceptions

not_found = 1

ohters = 2.

if sy-subrc = 0.

loop at lt_lines into ls_lines.

  • Remove sapscript special characters

replace: '<(>' in ls_lines-tdline with ' ',

'<)>' in ls_lines-tdline with ' '.

w_itab = ls_lines-tdline+0(70).

append w_itab to itab

endloop.

2. Pass this table (itab) to the smartform through smartform FM interface.

3. loop on this table in Smartform and display all the entires.

Hope aboe steps will help you to solve the prob.

Regards,

Joy.