cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic filling AdobeInteractive form-Based on input field from form itself

Former Member
0 Kudos

Hi,

I am developing a Adobe interactive form in which when user enters an input field 1 it should automatically populate respective values for input field 2 in the same form.I have this relation maintained in ztable.

After this I have a submit button to submit it to SAP.

How do we handle this?

Rgds

Vara

Edited by: Vara K on Mar 4, 2009 6:27 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vara,

If your field is outside a table and the value is stored in a single data node you can use explicit binding (i.e. using an explicit binding expression and not "normal") that points to the same data node for both fields.

If you are inside a table or each field has its own data node you need to write a script in the exit event that copies the data value from one field to another. This is one line of code something like field1.rawValue = field2.rawValue. field1 (and field2) are SOM expression pointing to the respective field in your form hierarchy.

Regards,

Juergen

Former Member
0 Kudos

Juergen,

thank you for your reply.Here is what I have done so far.

My Requirement is Form should be pre-filled with fields in Item column1 and then user fills in a field in Item column C2.Finally my submit button on form should take c1,c2 values and I will be using this in Click method for further processing.

For this I have done following.

1- created a structure ZILAB( which has COLUMN 1 & COLUMN 2 FIELDS) and created a node adobe_data with cardinality 1.1, and then under it created another node called ITEM CARDINALITY 1..N).This is mapped to ZILAB.

2- Created job number as parameter and button1 .This button1 brings up the pre-filled item Column1 fields to form.

3- There is new column C2 in the output form which user will input.

4- When I click final submit button it is stopping in Onclick method.my code is bringing up C1 values but not bringing of C2 values(which is user input) in my Onclick event of SUbmit button-WDACTIVEX.

Also I have checked enable option, Assigned pdfsource, change type to activeX.I even tried to change element item name but still not able to get entries in onclick method.

What is wrong with my code/process?

DATA lo_nd_adobe_data TYPE REF TO if_wd_context_node.
  DATA lo_nd_item TYPE REF TO if_wd_context_node.
  DATA lo_el_item TYPE REF TO if_wd_context_element.
  DATA ls_item1 TYPE IF_MAIN=>element_item.
* navigate from <CONTEXT> to <ADOBE_DATA> via lead selection
  lo_nd_adobe_data = wd_context->get_child_node( name = IF_MAIN=>wdctx_adobe_data ).

* navigate from <ADOBE_DATA> to <ITEM> via lead selection
  lo_nd_item = lo_nd_adobe_data->get_child_node( name = IF_MAIN=>wdctx_item ).

* get element via lead selection
  lo_el_item = lo_nd_item->get_element(  ).

* get all declared attributes
  lo_el_item->get_static_attributes(
    IMPORTING
      static_attributes = ls_item1 ).

Where am i going wrong?

Rgds

Vara

Former Member
0 Kudos

Hi Vara,

Please check the type of your context node. And my other suggestion is to test with different values like integers to see if you have a data conversion issue.

For example, it could be that you have a text field on your form and the node in your context expects an integer but on the form you enter a fraction.

Regards,

Juergen

Former Member
0 Kudos

Hi Juergen,

Thank you for you reply.

I followed your recommendation.Still having same issue.

I guess my node which has C1 values intially is what I am getting in final Onclick method.

I actually want it to overwrite with node which has C1 & C2(user input column) values.

Pls let me know if my way of doing is it right or not?

Rgds

vara

Answers (0)