In the Previous post we have seen how to create a simple Adobe Form. Now let us see how to integrate these adobe forms in the Webdynpro component.
Step 1: Go to the Tcode SE80 and create a webdynpro component.
Assign the component to the package or save it in the local object.
Step 2: Go to the layout tab of the view controller and insert a interactive form UI element.
Provide the ID and Type as shown below.
Choose a template source for the interactive form UI element using F4 help.
Enter the form name in the name of the object input box and press enter. If you are not sure with the name of the form search it using the addition * with the search string and press enter.
The system will display the list of available forms according to the search criteria. Double click on the required form to choose it.
System will prompt whether to generated the context attribute for the interface parameters of the form. Click on yes.
In the context tab now you can see the context node and attribtue generated for the interface paramters of the form which we created in the previous post and binded to the data source property of the Interactive form UI element.
Change the width and height properties of the form UI element.
Step 3: Go to the do init method and initalize values for these context attributes.
Code will be generated as below.
Note: I have removed the unwanted codes.
Code :
DATA lo_nd_zcsk_form TYPE REF TO if_wd_context_node.
DATA lo_el_zcsk_form TYPE REF TO if_wd_context_element.
DATA ls_zcsk_form TYPE wd_this->Element_zcsk_form.
lo_nd_zcsk_form = wd_context->get_child_node( name = wd_this->wdctx_zcsk_form ).
lo_el_zcsk_form = lo_nd_zcsk_form->get_element( ).
ls_zcsk_form-name = 'ARUN K'.
ls_zcsk_form-addr_line1 = 'No 23, MG Nagar'.
ls_zcsk_form-addr_line2 = 'Post Office road'.
ls_zcsk_form-addr_line3 = 'Anna Nagar'.
ls_zcsk_form-addr_line4 = 'Chennai-56'.
lo_el_zcsk_form->set_static_attributes(
static_attributes = ls_zcsk_form ).
Save and activate the whole component.
Step 5: Create a Webdynpro application and test the component.
0 Comments:
Post a Comment