cancel
Showing results for 
Search instead for 
Did you mean: 

unable to print text in continuity in smartform

Former Member
0 Kudos

Hi

I i am not able to print the whole text in the smartform , it prints half of the text in one line and half in the second .

I want to print it in continuity , how do i go about it ?

The code i wrote is as follows:

CLEAR: ls_object, itab_note, wa_note.

UNPACK contract-recnnr TO contract-recnnr.

CONCATENATE contract-bukrs contract-recnnr INTO ls_object-instid.

ls_object-typeid = 'BUS1505'.

ls_object-catid = 'BO'. "constant

CLEAR: ls_relopt, lt_relopt.

ls_relopt-sign = 'I'.

ls_relopt-option = 'EQ'.

ls_relopt-low = 'NOTE'.

APPEND ls_relopt TO lt_relopt.

TRY.

CALL METHOD cl_binary_relation=>read_links_of_binrels

EXPORTING

is_object = ls_object

it_relation_options = lt_relopt

ip_role = 'GOSAPPLOBJ'

ip_no_buffer = 'X'

IMPORTING

et_links = lt_link.

CATCH cx_obl_parameter_error.

CATCH cx_obl_internal_error.

CATCH cx_obl_model_error.

ENDTRY.

SORT lt_link DESCENDING BY utctime.

DATA: wf_clause(7) TYPE c.

DATA: itab_lines TYPE so_text255 OCCURS 0 WITH HEADER LINE.

DATA: wf_crlfch(10).

CALL FUNCTION 'SRET_BINARY_TO_TEXT'

EXPORTING

xbuffer = wc_crlf

laiso = '00'

IMPORTING

textbuffer = wf_crlfch

EXCEPTIONS

failed = 1

OTHERS = 2.

**FIND first note

IF lt_link IS NOT INITIAL.

LOOP AT lt_link INTO ls_link.

    • read content of note

ld_doc_id = ls_link-instid_b.

CALL FUNCTION 'SO_DOCUMENT_READ_API1'

EXPORTING

document_id = ld_doc_id

IMPORTING

document_data = doc_data

TABLES

object_content = t_notecontent

EXCEPTIONS

document_id_not_exist = 1

operation_no_authorization = 2

x_error = 3

OTHERS = 4.

wa_note-title = doc_data-obj_descr.

wa_note-createdby = doc_data-creat_name.

wa_note-createddate = doc_data-creat_date.

  • Check if the line begins with 'Clause:' (any case).

wf_clause = wa_note-title(7).

TRANSLATE wf_clause TO UPPER CASE.

IF wf_clause EQ 'CLAUSE:'.

  • Lease Notes with Clauses

wa_note-clauses = 'X'.

ELSE.

  • Lease Notes without Clauses

wa_note-clauses = ' '.

ENDIF.

LOOP AT t_notecontent INTO notecontent.

REFRESH itab_lines.

TRANSLATE notecontent-line USING wf_crlfch.

SPLIT notecontent-line AT '
' INTO TABLE itab_lines.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi shweta,

Check the window setting in the form painter of the text node which your are displaying.

Regards,

Sravanthi

boolan
Participant
0 Kudos

Hi Shveta,

Smartform has problem with printing character strings longer than 255 characters.

Please try to use function module IQAPI_WORD_WRAP. It splits the string into a table of desired line length.

kind regards,

Krzysztof.

Former Member
0 Kudos

hi Sweta,

The window size can be the problem

please increase the size of the window and see how many character more is coming in the first line.

Then adjust accordingly.

There is one more option which you can try , create another character format of smaller font and try.

Regards,

Avi............

Former Member
0 Kudos

Hi

Try to increase the size of the window and check then..

Regards,

Vishwa.