cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Forms dynamic number of pages in Webdynpro

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Ankit,

I don't understand how this is related to my issue. Can u please explain about the styles.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Ankit,

I already have the text as GUID in a table. When converting that I am getting the formatted text in lt_line which is of type tline_tab.

Now I just want to display this table values to my adobe form. I am getting the Conversion error when trying to do so.

Former Member
0 Kudos

Any suggestions?

Former Member
0 Kudos

Dear Vidhya,

can you post the type of the param zcit of the fm?

The param has to be the table type of structure tline - e.g. TLINE_T or TLINE_TAB

Please check and cofirm!

Former Member
0 Kudos

Hi Heinz,

I tried in all the ways.

Using String_table for zcit and for lv_citation

Using tline_tab for both

Both didn't work.

Only if i pass both as string its working. But thats not my requirement. I want to display with the alignments .

Former Member
0 Kudos

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.

Former Member
0 Kudos

I am getting a conversion error.

Conversion of type "h" to type "g" not supported

Former Member
0 Kudos

Which language do you use?

Strangely enought though, when the sap-language equals EN, 
everything is rendererd correctly.
But when I change EN to HE (Hebrew), I get a Dynamic type 
conflict when assiging references and more specifically
Object_move_not_supported

Former Member
0 Kudos

I use EN only.