cancel
Showing results for 
Search instead for 
Did you mean: 

How to display more than 132 characters in a smartform

Former Member
0 Kudos

Hi Experts,

I am reading notes/text entries by calling read_text and then passing them in a variable. I want to display the notes. But even after declaring the variable as LINE2048, it is displaying only 255characters as output length in smartform.

My code:

TYPES: BEGIN OF TYP_FINAL,

PARTNER_NO TYPE BU_PARTNER, "Partner No.

OBJECT_ID TYPE CRMT_OBJECT_ID_DB, "Object ID

PROCESS_TYPE TYPE CRMT_PROCESS_TYPE, "Activity Type

ACTUAL_NOTE TYPE LINE2048, "Actual Notes

END OF TYP_FINAL.

data : T_FINAL TYPE STANDARD TABLE OF TYP_FINAL,

WA_FINAL TYPE TYP_FINAL.

data: v_actualnote TYPE LINE2048.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = C_0002

LANGUAGE = sy-langu

NAME = l_name1

OBJECT = C_BUT000

TABLES

LINES = t_line

EXCEPTIONS

ID = 1

LANGUAGE = 2

IF SY-SUBRC = 0.

clear: v_accountnote.

LOOP AT T_LINE INTO WA_LINE.

CONCATENATE v_accountnote wa_line INTO v_accountnote SEPARATED BY space.

clear: wa_line.

ENDLOOP.

wa_final-account_note = v_accountnote.

clear: v_accountnote.

ENDIF.

On the smartformm side, under main window->loop->text(to display the variables).

How to display more than 255 characters in a smartform.

Regards,

Sangeeta.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sangeeta,

Why don't you use the standard smartform possibilities of smartforms to print so10 texts.

It works a lot of better as own made functions

In a text element you have to choose the right type. Then fill some fields and it is working.

Gr., Frank

Answers (3)

Answers (3)

Former Member
0 Kudos

why the heck would you use read_text when you want to print a text/note on a form?

in SAP-Script we use the "INCLUDE"-Statement for this.

and in smartforms a Text-node of type 'I'.

you can not write all in one line and expect the system to handle this like a floating text.

one character takes a cretain amount of space (varying for different characters and font and font sizes).

you Page has a certain width, so where is the miracle in the thesis that on a sheet of paper with a certain width just a certain amount of characters will fit?

alex_m
Active Contributor
0 Kudos

Its not like in program the size would be limited to 255 in smartforms, the text would be printed based on your window size. If possible you can increase the size of the window or else need to print in second line.

Former Member
0 Kudos

HI

U can't dispaly complete text in one line.Since it will not fit in page.

U have to split the text and write it as multiple lines.