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: 

plz help production issue(smartform)

Former Member
0 Kudos

hi experts plz help its a production issue

i have a box in my smartform in which in one line i can only show 50 characters .and i have a text of 70 characters but i only have to show 50 characters from 70 characters .

now wat i did i stored 70 characters variable into 50 char variable abd displaying it .

but the issue is

if i want to print .

hi this is sdn and here u can get all the information about sap .

now lets say

i of information is the 46th character of my line

now what is happening it is coming like

hi this is sdn and here u can get all the

infor

its showing 50 character only but if word is not completed it is printing it in next line.

it should print like

hi this is sdn and here u can get all the infor

plz help how to do it

thanx in advance .

8 REPLIES 8

Former Member
0 Kudos

code i am using is ::::::::::::::::::::::::::::::::::::::::::::::::

data : TEXT_3I56(50) type c .

move is_bil_invoice-hd_gen-bil_number TO textname.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

id = '0002'

language = is_nast-spras

name = textname

object = 'VBBK'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

tables

lines = t_lines_3156

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8.

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*

*describe table t_lines lines n.

*

*if not n is initial.

*bank_note = 'X'.

*endif.

READ TABLE T_LINES_3156 INDEX 1 .

IF SY-SUBRC = 0 .

TEXT_3I56 = T_LINES_3156-TDLINE .

ENDIF.

0 Kudos

guys plz help

0 Kudos

Anit,

The problem is not in your declaration/ driving program.

It is perferctly fine.

The problem i guess is in your smartform text box. Try to increase its length. It should solve your problem.

Revert for any doubts.

Award points for all helpful answers.

Gowri

0 Kudos

i cannot increase the size of box

i want

like now i am reading and putting it into a 50 char variable .

is it possible to read lines as character string only and read only 50 character .

i guess then it will not tak it as a word .

ne function module or code?????

thanx 4 d rply .

0 Kudos

Amit,

are u sure u can accomodate ur required 50 characters in ur smartforms?...

If not..

To reduce font size :

Create a new style in smartforms. In that create a Character format(say C1) in which u can reduce the font size(second tab ) as required size to u so that u can accomodate 50 char.

Assign the style to the smartforms in the Output options > style.

Now in the general attribues assign C1 in character format.

Hope it solves ur query

Gowri

was edited by gowri

Former Member
0 Kudos

Hi,

You can try to reduce the font size then you can able to see all the 70 characters.

Cheers,

Bujji

0 Kudos

i dont want to rear 70 i only want to read 50 char but i want i word starts from 48 char it should be clipped after 50 char .

also plz tell me how to reduce the font size

tahnx for rplying

Former Member
0 Kudos

HI Anit....

I think there is not Problem wih your Decleration...Try the follwoing steps..

Double click on Table window.

Then Go to Table Painter..

There select the draw symbol and with this you can change the size of the different cells in the Table.

Now here you can increase the Size of the Cell where your text is coming....

............Hope this will solve your problem...

Reward if Useful...