cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding printing 150 lines from standard text in smartforms

Former Member
0 Kudos

Hi,

I need to display 150 lines and each line contains more than 100 characters from standard text in smartforms but i'm not able to achieve this completely.

Please suggest me the required steps to achieve this.

Thanks in advnace.

Vinodh

Edited by: vinodhBabu nallimelli on May 24, 2010 7:43 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

First get the Long Text using the below code Its for PO

CLEAR: V_EBELN, IT_TLINE, IT_TLINE[].

V_EBELN = WA_EBELN.

CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT                        = SY-MANDT
ID                            = 'F07'
LANGUAGE                      = SY-LANGU
NAME                          = V_EBELN
OBJECT                        = 'EKKO'
*   ARCHIVE_HANDLE                = 0
*   LOCAL_CAT                     = ' '
* IMPORTING
*   HEADER                        =
TABLES
LINES                         = IT_TLINE
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.

and loop the table it_tline to get the Long text Inside the Loop Node use this pease of code to concatenate the Text

IF V_COUNT10 = 0.
V_TEXT1 = V_TEXT2.
CLEAR:V_TEXT1, V_TEXT2.
ENDIF.

V_COUNT1  = V_COUNT10 + 1.
CONCATENATE V_TEXT2 IT_TLINE-TDLINE  INTO V_TEXT2 SEPARATED BY SPACE.
V_COUNT10 = V_COUNT1 MOD 2.

*if v_count1 = 1.
*v_texts = it_tline-tdline.
*endif.

IF V_COUNT10 = 0.
V_TEXT1 = V_TEXT2.
*  condense v_text1.
ENDIF.

Here V_COUNT1, V_COUNT10 is of Type I and V_text is of Type STRING declare these variables in Global definitions

and in the text Display V_TEXT1.

Regards,

Vijaya Lakshmi.T

Former Member
0 Kudos

Hi,

Thanks for your response i am able to read the entire text from the standard text.

But my actual requirement is standard text contains more than 150 lines and each line contains more than 100 characters entire

thing should be printed on only one page . It should not go to next page. It is the business requirement.

Thank you.

Vinodh

arul_murugan
Active Participant
0 Kudos

Hi,

you can achieve standard text by creating the text in a window and select the type as Include text in the general attributes of the text. You can give the text name, object, ID and language in the general attributes.

Thanks

Arul

Former Member
0 Kudos

Hi Arul,

Thanks for your reply . My actual requirement is to display more than 100 lines and on each line i need to display around 100 characters.

But in the standard text single line text is breaking into multiple lines.

I need to have around 100 characters on a single line.

Thank you.

Vinodh