on 05-24-2010 6:43 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.