on 09-16-2010 1:12 PM
Hi Experts,
My requirement is to display a paragraph in PDF format. The paragraph varies for each employee. The text are stored in a table as GUID.
I am converting the GUID text using read_text function module. The output is of TYPE TABLE OF tline.
Below is the code that I am using the display output in pdf.
CALL FUNCTION lv_fmname
EXPORTING
/1bcdwb/docparams = ls_fp_doc
zcit = *lv_citation*
zsignam = lv_signam
pernr = lv_pernr
ename = lv_ename
desig = lv_desig
zdate = lv_date
zyears = lv_years
IMPORTING
/1bcdwb/formoutput = ls_formout
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
In the above code I have converted the tline format to string and passing that as lv_citation. So in the PDF I am getting a single paragraph as output. I want to get the output with the formatting also.
I tried to pass that tline format to the above function module and its giving some error.
Is this possible to get the output with the formatting available in lt_tline?
Here are the steps:
1) Create your style as we do in case of smartforms
2) Go to the SFP->Form Context and go to the properties of the table parameter where the text data is stored.
3) There is a option for providing the style. Provide the style which you created.
Note: Text Type field is important. Put is according to your way of getting the data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Style is created in case of smartforms wherein you can define the formatting parameters of the text to be displayed like Font size, alignment, paragraph style, etc. Thats a complete ABAP code.
Adobe has provided an option to use that style in the context properties directly.
So, if you want to format your text in Adobe for alignment, paragraphs, etc, you can simply create your style in ABAP and map it to the context properties in the form.
Any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Vidhya,
that sounds very crazy.
If i use tline_tab for the param and in the fm, the whole construction works without any problem.
Can you explain more about the implementation in the layout (or is there an error while calling the fm with the "wrong" type??)
Also have a look at this thread: [click me|;
Declare a itab of type string_table.(say lt_string)
Loop at itab(the actual data) into wrkarea.
concatenate all fileds of wrkarea into a string variable.(say lv_string)
APPEND lv_string TO lt_string.
ENDLOOP.
Bind lt_string to a context attribute of type string_table.
Bind the attribute to the "value" of textedit.I remember doing somthing like this
and it seemed to work.
To show multiline text you'll need to be using a text edit UI element
(with read only flag checked) not a text view UI element.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.