2013 Nov 18 1:00 PM
Hi all,
i am using READ_TEXT function module to read long text for line items, i have used these code lines
which is giving whole text in debugging but it is in splitted lines, so if i have lets say three line items
and my first line items contains a very long text then it splits into three lines, and unfortunately when i'm
using these long text to get printed in my smartforms ,it only printing some text from last.
My code is written below, please anybody tell me the required changes i have to perform
here to get whole long text (i am using command &WA_FINAL-TXZ05& to print the long text and TXZ05 is of type
tline-tdline).I know tline-tdline can hold only 132 char length, so not getting how could i achieve this.
DATA:BEGIN OF DT_LINES OCCURS 0,
TDFORMAT LIKE TLINE-TDFORMAT,
TDLINE LIKE TLINE-TDLINE.
DATA:END OF DT_LINES.
LOOP AT it_final INTO wa_final.
CONCATENATE WA_FINAL-EBELN WA_FINAL-EBELP INTO V_NAM.
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
ID = 'A01'
LANGUAGE = SY-LANGU
NAME = V_NAM
OBJECT = 'EKPO'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
TABLES
LINES = DT_LINES
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.
CLEAR DS_LINES.
LOOP AT DT_LINES INTO DS_LINES.
WA_FINAL-TXZ05 = DS_LINES-TDLINE.
MODIFY IT_FINAL FROM WA_FINAL TRANSPORTING TXZ05 .
ENDLOOP.
ENDLOOP.
2013 Nov 19 5:55 AM
Hy Sanjeev,
rather Then You Can Put Your Data To Another Line You Can Dierctly print Your tdline data
in side your location.
inside loop (DT_LINES)make template
in template you put DS_LINES inside text.
thanks
PRAVEEN>>
2013 Nov 19 10:54 AM
Hi Sanjeev,
Yes. Priyesh is right.. For quick fix you can code like .
LOOP AT DT_LINES INTO DS_LINES.
CONNCATENATE WA_FINAL-TXZ05 DS_LINES-TDLINE INTO WA_FINAL-TXZ05 separated by space ( ,/ | whatever desired ).
CLEAR DS_LINES-TDLINE.
ENDLOOP.
MODIFY IT_FINAL FROM WA_FINAL TRANSPORTING TXZ05
ENDLOOP.
Thanks ,
Chirdip
2013 Nov 19 7:12 AM
Hi Sanjeev,
After Fetching Data from function module "READ_TEXT" in the LOOP...ENDLOOP .
Before Modifying the Internal table use A CONCATENATE statement to add all the Text for a Particular Line item text & then Modify it to a particular row of final internal table.
Thanks & Regards.
Priyesh Shah.
2013 Nov 19 11:08 AM
Dear Sanjeev Kumar,
Please try the below mentioned Function Module to Wrap Long Text.
data:begin of in_line occurs 0,
line(256) type c,
end of in_line ,
out_line like table of in_line with header line,
t_out_line like table of in_line with header line.
CALL FUNCTION 'RKD_WORD_WRAP'
* EXPORTING
* textline = t3_ekpo-txz01
** delimiter = ' '
* outputlen = 24
** IMPORTING
** OUT_LINE1 =
** OUT_LINE2 =
** OUT_LINE3 =
* TABLES
* out_lines = out_line
** EXCEPTIONS
** OUTPUTLEN_TOO_LARGE = 1
** OTHERS = 2
* .
* IF sy-subrc = 0.
Append lines of out_line to t_out_line.
endif.
With Regards,
Thangam.P
2013 Nov 19 11:57 AM
Hi Sanjeev,
Create Loop node for IT_LINES internal table like above screen
and dont add any condition in where condition tab.
create text node under loop node and pass the field &lis_lines-tdline(CZ)&.
Thanks,
Sree