Hi, I provide training in SAP UI5. Also feel free to checkout my new web page https://saptechblog.com
Webdynpro ABAP

Integrating Adobe forms in Webdynpro ABAP

 

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.

 

clip_image002

 

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.

 

clip_image004

 

 

Provide the ID and Type as shown below.

clip_image006

 

 

Choose a template source for the interactive form UI element using F4 help.

 

clip_image007

 

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.

clip_image009

 

 

The system will display the list of available forms according to the search criteria. Double click on the required form to choose it.

 

clip_image010

 

 

System will prompt whether to generated the context attribute for the interface parameters of the form. Click on yes.

 

clip_image011

 

 

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.

 

clip_image012

Change the width and height properties of the form UI element.

clip_image013

                                   

 

 

 

 

Step 3: Go to the do init method and initalize values for these context attributes.

 

clip_image015

 

 

Code will be generated as below.

 

clip_image017

 

Note: I have removed the unwanted codes.

 

clip_image019

 

 

 

 

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.

 

clip_image021

 


  

About Arun

0 Comments:

Post a Comment

Powered by Blogger.