cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the text_field to editable in a adobe document in the WDA?

Former Member
0 Kudos

Hi, expert,

I meet a problem when I develop a WDA. I hope to get your help. Thanks a lot. The following is my action:

Action:

1. Make a pdf forms (interactive form) with textfield named “A_textfield” in the webdynpro application. The textfield is editable in the PDF preview when I creat the pdf form using transfer code 'sfp'.

2. Add the pdf forms to webdynpro application and set "sss" to the inputfield through context in the WDA.

3. Run the WDA. In the IE, I found the PDF document with the text_field, but the textfield in the PDF is not editable.

How can I change the code or others to make text_field to editable?

Do you give me some hints? Thank you very much.

The following is my code in the WDA:

method WDDOMODIFYVIEW .

********Make INTERACTIVE_FORM to editable。******

data:

lr_interactive_form type ref to cl_wd_interactive_form,

lr_method_handler type ref to if_wd_iactive_form_method_hndl.

lr_interactive_form ?= view->get_element( 'INTERACTIVE_FORM' ).

lr_method_handler ?= lr_interactive_form->_method_handler.

lr_method_handler->set_legacy_editing_enabled( abap_true ).

**************************************************

data:

Node_Zz_00_Test_Form_000 type ref to If_Wd_Context_Node,

Elem_Zz_00_Test_Form_000 type ref to If_Wd_Context_Element,

Stru_Zz_00_Test_Form_000 type Wd_This->Element_Zz_00_Test_Form_000 ,

Item_TEST1 like Stru_Zz_00_Test_Form_000-TEST1.

  • navigate from <CONTEXT> to <ZZ_00_TEST_FORM_000> via lead selection

Node_Zz_00_Test_Form_000 = wd_Context->get_Child_Node( Name = wd_This->wdctx_Zz_00_Test_Form_000 ).

  • get element via lead selection

Elem_Zz_00_Test_Form_000 = Node_Zz_00_Test_Form_000->get_Element( ).

  • get single attribute

Elem_Zz_00_Test_Form_000->set_Attribute(

exporting

Name = `TEST1`

Value = 'sss' ).

endmethod.

Best regards,

tao

Accepted Solutions (1)

Accepted Solutions (1)

thomas_szcs
Active Contributor
0 Kudos

Hello Wang,

Just for confirmation: The interactiveform ui element is enabled, right? By default, it's disabled.

Best regards,

Thomas

Answers (0)