‎2007 Mar 09 7:53 AM
Hi Experts
Is there anyone who know that, how can we display multiple line in smartforms? I have used READ_TEXT but I can only display the last line, it's something like having the latest value in the variable.
I have tried using concatenate also but the output is coming in the same line; do we have any provision of new line character or some other technique to acheive this.
Responses will be highly appreciated.
Thanks and Regards
Vishal
‎2007 Mar 09 8:29 AM
Hi,
The same parameters that you pass on to the READ_TEXT FM, use the same and pass it to the Text node with <b>node type = Include Text</b>.
This might solve the Problem.
Thanks
Anirban M.
‎2007 Mar 09 7:58 AM
hi,
when tou use the FM REad_tect u will ge t teh Internal table... if you want to print the total data you have to loop the internal table.. i haef done the same. in my smartform
‎2007 Mar 09 7:58 AM
Use RKD_WORD_WRAP function, here you can set the column width in which you would like to fit your text (like in a newspaper article), the function nicely wraps the text
For example I am pasting the input/output directly from SE37 on this function after setting a width of 35 chars
INPUT
THIS IS A VERY LONG TEXT AND THE GIVEN FUNCTION SHOULD WRAP IT NICELY IN A COLUMN NOT EXCEEDING 35 CHARACTERS WIDTH
OUTPUT
THIS IS A VERY LONG TEXT AND THE
GIVEN FUNCTION SHOULD WRAP IT
NICELY IN A COLUMN NOT EXCEEDING
Also note that the function wraps your text in a maximun 3 lines, so for longer lines you may need to do some calculation to get it all wrapped
‎2007 Mar 09 8:05 AM
hi
IT_TLINE is internal table type STANDARD TABLE OF TLINE
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = '0002'
LANGUAGE = V_LANGU
NAME = V_TDNAME
OBJECT = 'VBBK'
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.
CLEAR IT_TLINE.
ENDIF.loop the table IT_TLINE in in you r smartforms..
‎2007 Mar 09 8:24 AM
Hi Vishnu
We have data; like this:
ssdfsd
dsfsdf
dsfdsgh
dgdfgfd
sdgdsgg
dasfsd123456789
I need to display the data in same way, as this data we will be getting from the database.
Do we have any solution for like some new line character or something.
Regards
Vishal
‎2007 Mar 09 8:29 AM
Hi,
The same parameters that you pass on to the READ_TEXT FM, use the same and pass it to the Text node with <b>node type = Include Text</b>.
This might solve the Problem.
Thanks
Anirban M.
‎2007 Mar 09 11:00 AM
Hi Anirban
Could you please tell me which parameter I need to pass.
This is my FM: READ_TEXT:
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = '0002'
LANGUAGE = wa_language
NAME = WA_TDNAME
OBJECT = 'VBBK'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = it_tline_marks
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
.
loop at it_tline_marks into wa_tline_marks.
v_packlist_marks = wa_tline_marks-tdline.
endloop.
And how to determine the node type.
Thanks and Regards
Vishal.
‎2007 Mar 09 11:40 AM
Hi Anirban,
The variable WA_TDNAME holds the Invoice Number and from the header of that invoice we are getting the data, and which is in multiple lines.....................
If i'll pass this WA_TDNAME in to the text node; either I am getting the invoice number by using &WA_TDNAME&or I am getting it as "WA_TDNAME".
Response to this will be highly appreciated.
Thanks and Regards
Vishal.
‎2007 Mar 12 5:19 AM
HI Vishal,
You need to pass the following
ID = '0002'
LANGUAGE = wa_language
NAME = WA_TDNAME
OBJECT = 'VBBK'Into the text Node. Use a Program Line before this to retrieve the values of the wa_langugae and wa_tdname (if required). The Text node will print all the data as found from the read text return table.
Hope that Helps
<i>Please reward Points if Helpfull</i>
Thanks
Anirban M.
‎2007 Mar 09 11:38 AM
hi vishal,
READ_TEXT function module will return the internal table. What u need to do is declare one internal table in global definitions and pass that internaltable as a parameter to Read_text fun module.
<i>.....
1)it_lines type lines.
2) do this in program lines.
note :pass this <b>it_lines</b> as a export values of <b>program lines</b>.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = '0002'
LANGUAGE = V_LANGU
NAME = V_TDNAME
OBJECT = 'VBBK'
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.
CLEAR IT_TLINE.
ENDIF.
3) loop this it_lines and use text element to print contents for it_lines.
...>place this in text element &it_lines-text...&
thats it! you can get the desired output.
[II].....
Same thing can be achived in another way.
text element--> include text....
I HOPE UR PROBLEM WILL SOLVED.....DON'T FORGET TO GRADE POINTS IF UR PROB SOLVED...
Regards
Sreenivasa Sarma