cancel
Showing results for 
Search instead for 
Did you mean: 

i need to display adobe form dynamically in same layout in webdynpro

Former Member
0 Kudos

i have requirement in same layout area i need to display different adobe form based on some condidtion.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

create a variable of type ref to CL_WD_INTERACTIVE_FORM .

use this class CL_WD_INTERACTIVE_FORM method to set different template and source

Former Member
0 Kudos

its not displaying any change in adobe forms

Former Member
0 Kudos

in WD_DOINIT you need to set variable you defined in componnet controller with value you get by

view->get_element(  <interactive UI element> ).

Answers (1)

Answers (1)

former_member211591
Contributor
0 Kudos

Hi Monu,

you have to bind your InteractiveForm to an context attribute of type XSTRING:

To fill this XSTRING do following:

When creating a adobe form an functional module is created which you can use to print this form out. we need to determine this generated funtional module to retrieve the xstring.

First use Functional module ISH_ADOBEFORMS_GET to retrieve the generated FM of the adobe form:

call function 'ISH_ADOBEFORMS_GET'
       exporting
         i_rnfor                  = ls_rnfor 
       importing
         e_function               = lv_fm_name   "NAME OF the generated FM of the adobe form
         e_docparams              = ls_fm_docparams
         e_outputparams           = ls_fp_outputparams
       exceptions
         abbruch                  = 1
         adobeforms_not_supported = 2
         others                   = 3.

(Field  ls_rnfor-afname contains the name of the AdobeForm as a string)

After that you can call the generated FM to get the XSTRING:


call function lv_fm_name
       exporting
         /1bcdwb/docparams  = ls_fm_docparams
         /1bcdwb/docxml     = lv_xxml
       importing
         /1bcdwb/formoutput = lv_fo
       exceptions
         usage_error        = 1
         system_error       = 2
         internal_error     = 3
         others             = 4.

Field lv_fo-pdf contains the XSTRING which you have to assing to your context attribute (PRINT.PDF_STRING).

So just call this routine with

ls_rnfor-afname = 'NAME OF ADOBE FORM YOU WANT TO SWITCH TO' and retrieve lv_fo-pdf which you assign to your context attribute PDF_STRING.


BR

ismail