on 08-22-2008 3:38 PM
HI ,
I am able to read the header text from "read_text" function module in the smartform in the program lines .
I want to display it in the text element .
The data is available in internal table .I want to display all the internal table data read from read_text in the smartform output.
Pls help
Bharat,
refer below code:
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = stxh-tdid
language = stxh-tdspras
name = name
object = stxh-tdobject
TABLES
lines = i_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.
* Only 4 lines of Header text supported. Can add if needed
LOOP AT i_lines INTO r_lines.
CONDENSE r_lines-tdline NO-GAPS.
v_cnt = v_cnt + 1.
CASE v_cnt.
WHEN 1.
zzboldsx = r_lines-tdline.
WHEN 2.
zzboldsx2 = r_lines-tdline.
WHEN 3.
zzboldsx3 = r_lines-tdline.
WHEN 4.
zzboldsx4 = r_lines-tdline.
WHEN OTHERS.
EXIT.
ENDCASE.
* zzbolDSX = i_lines-tdline .
ENDLOOP.
here i print zzboldsx,zzboldsx2,zzboldsx3,zzboldsx4
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharathiraja,
Instead of using READ_TEXT Function module in smartform program lines and displaying using text element in loop, you can easily include the contents of the header text by;
1) Create a new Text Element
2) Change the type of the text element in the general attributes to I Include text
3) Enter the Textname, textobject, textid and language values which u supply to the function module....
4) Now it will display all the contents of the header text.
No need for program lines or loop or internal table, this is the easiest way to display header text/
Regards
Karthik D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharathi Raja,
Put a loop and in that mention your internal table name and wa
and in the text element outout that and in that set the type as append directly.
This is one way or else you can directly create a text element and in that you can chang the type of the text element as include text and in that give the text id text name and text language and dont forget to check the box No error if no text exists.
Hope this helps
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
use the loop node and give the internal table.
under that loop node create the text node to write the content.
there is Another way to get the text instead of writing the code to get the text
create the text node and change the text type as include text.
and give the text name then it will print the entire text.
Regards,
Jagadeesh.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.