Skip to Content
Author's profile photo Former Member

Solution for Adobe Webdynpro Integration Issue

Requirement:

We had to integrate the Copy of Standard Adobe form with a Custom Webdynpro.

Issues Faced:

IMG1.png.jpg

This error is due to long Node names.

Proposed Solution:

Creation of Adobe Form:

Go to Transaction SFP.

Enter the Name of Standard Adobe form – PTRV_EXPENSE_FORM.

IMG2.jpg

Click on ‘COPY’ . Enter the New Form Name.

/wp-content/uploads/2013/05/img3_218395.jpg

Assign a suitable Package and Transport Request. Here I have saved as a local Object.

/wp-content/uploads/2013/05/img4_218402.jpg

The below message would be displayed after successfully copied.

/wp-content/uploads/2013/05/img5_218403.jpg

Enter the Name of Standard Interface and Click on ‘COPY’.

/wp-content/uploads/2013/05/img6_218404.jpg

Enter the New Interface Name.

/wp-content/uploads/2013/05/img7_218408.jpg

Assign a suitable Package and Transport Request. Here I have saved as a local Object.

/wp-content/uploads/2013/05/img8_218409.jpg

The below message would be displayed after successfully copied.

/wp-content/uploads/2013/05/img9_218410.jpg

Enter the Interface Name and click on ‘Change’. Then click on activate and the interface is activated.

IMG10.jpg

/wp-content/uploads/2013/05/img11_218421.jpg

As the form is copied from Standard one, the interface attached to it would be a standard one.

So it is changed to the new interface created. Enter the Form Name and Click on ‘Change’.

/wp-content/uploads/2013/05/img12_218422.jpg

/wp-content/uploads/2013/05/img13_218426.jpg

The form is then activated.

Creation of Webdynpro Component:

Go to Transaction SE80.

Enter the webdynpro component name. Click on ‘YES’ to create.

/wp-content/uploads/2013/05/img14_218427.jpg

Enter the Description. If required the Window Name can be changed.
/wp-content/uploads/2013/05/img15_218428.jpg

Assign a suitable Package and Transport Request. Here I have saved as a local Object.

/wp-content/uploads/2013/05/img16_218429.jpg

Go to MAIN View; create an interactive element – ADOBE_FORM under rootuielementcontainer.

/wp-content/uploads/2013/05/img17_218430.jpg

In the properties of adobe_form, give the template source as form name – ZTEST_PTRV_EXPENSE_FORM.

We can see the below screen.

/wp-content/uploads/2013/05/img18_218431.jpg

Click on ‘Yes’. The context is created.

/wp-content/uploads/2013/05/img19_218435.jpg

When we do a syntax check, we get the below error:

/wp-content/uploads/2013/05/img20_218436.jpg

This error is due to long Node names.

E.g. IT_FORM_ADDRESS_EMPLOYEE, IT_FORM_ADDRESS_EMPLOYER.

It is trying to create WDCIX_IT_FORM_ADDRESS_EMPLO in Component Controller for both IT_FORM_ADDRESS_EMPLOYEE, IT_FORM_ADDRESS_EMPLOYER.

So the above error is generated.

This error is resolved by removing one of the nodes IT_FORM_ADDRESS_EMPLOYEE/ IT_FORM_ADDRESS_EMPLOYER and creating it using Dynamic Node Creation.

Similarly, other nodes which give the above error are also removed and recreated using Dynamic Node.

The below nodes are created dynamically:

      • I_FORM_HEADER_DATA_EMPLOYEE
      • I_FORM_HEADER_DATA_EMPLOYEE
      • IT_RECEIPTS_VS_MAX_AMT_TOTALS
      • IT_RES_REC_VS_MAX_AMT_TLS

Here the required values for the adobe form are fetched using the standard function module – PTRA_WEB_EXPENSE_FORM_DATA_GET by passing the Personnel number, Trip Number,                                       Number of Trip Period = 000, Sequential Number of Period = 00, Plan/Request/Expense Report (Indicator) = E, Sequential Version Number of Table PTRV_VERSION = 0000.

The output of the function module is mapped to corresponding nodes of the context to pass data to the adobe form.

Sample Code for Binding Output of Function Module to the Node:

** Passing Itinerary Details IT_ITINERARY:

* Navigate from <CONTEXT> to <IT_ITINERARY> via lead selection

  lo_nd_tripdetails = wd_context->path_get_node( path = ‘ZTEST_PTRV_EXPENSE_F.IT_ITINERARY` ).

  IF lo_nd_tripdetails IS BOUND.

* Bind the values

    CALL METHOD lo_nd_tripdetails->bind_table

      EXPORTING

        new_items = lt_itinerary.

    CLEAR: lo_nd_tripdetails, lo_el_tripdetails.

  ENDIF.

Code for Dynamic Node Creation:

All the new nodes are created under the Sub node ‘ZTEST_PTRV_EXPENSE_F’.

**** Data Declaration for Dynamic Node Creation:

  DATA: lr_root_info TYPE REF TO if_wd_context_node_info,

        lr_child_node_info TYPE REF TO if_wd_context_node_info,

        ld_nd_info_summarize TYPE REF TO if_wd_context_node_info,

        ld_nd_info_hdr_emp TYPE REF TO if_wd_context_node_info.

*Get the Child Node:

  lr_root_info = wd_context->get_node_info( ).

  ld_nd_info_summarize = lr_root_info->get_child_node( name = ‘ZTEST_PTRV_EXPENSE_F’ ).

*Dynamic Node Generation for Nodes that has longer names in Adobe forms:

  ld_nd_info_hdr_emp =  ld_nd_info_summarize->add_new_child_node(

         static_element_type = ‘PTRV_WEB_FORM_HEADER_EMPLOYEE’

               name = ‘I_FORM_HEADER_DATA_EMPLOYEE’

                     is_mandatory = abap_true

                     is_mandatory_selection = abap_false

                     is_multiple = abap_false

                     is_multiple_selection = abap_false

                     is_singleton = abap_true

                     is_initialize_lead_selection = abap_true

                     is_static = abap_true ).

  CLEAR: ld_nd_info_hdr_emp.

  ld_nd_info_hdr_emp =  ld_nd_info_summarize->add_new_child_node(

         static_element_type = ‘PTRV_WEB_FORM_EDITOR_ADDRESS’

               name = ‘IT_FORM_ADDRESS_EMPLOYEE’

                     is_mandatory = abap_false

                     is_mandatory_selection = abap_false

                     is_multiple = abap_true

                     is_multiple_selection = abap_true

                     is_singleton = abap_true

                     is_initialize_lead_selection = abap_true

                     is_static = abap_true ).

  CLEAR: ld_nd_info_hdr_emp.

  ld_nd_info_hdr_emp =  ld_nd_info_summarize->add_new_child_node(

         static_element_type = ‘PTRV_WEB_RECEIPTS_FORM_TLS’

               name = ‘IT_RECEIPTS_VS_MAX_AMT_TOTALS’

                     is_mandatory = abap_false

                     is_mandatory_selection = abap_false

                     is_multiple = abap_true

                     is_multiple_selection = abap_true

                     is_singleton = abap_true

                     is_initialize_lead_selection = abap_true

                     is_static = abap_true ).

  CLEAR: ld_nd_info_hdr_emp.

ld_nd_info_hdr_emp =  ld_nd_info_summarize->add_new_child_node(

         static_element_type = ‘PTRV_WEB_RES_RECS_MAX_AMT_TLS’

               name = ‘IT_RES_REC_VS_MAX_AMT_TLS’

                     is_mandatory = abap_false

                     is_mandatory_selection = abap_false

                     is_multiple = abap_true

                     is_multiple_selection = abap_true

                     is_singleton = abap_true

                     is_initialize_lead_selection = abap_true

                     is_static = abap_true ).

  CLEAR: ld_nd_info_hdr_emp.

All the four nodes are created dynamically.

The Webdynpro component is activated after completing the changes.

Webdynpro application is created for the webdynpro component with Personnel Number and Trip Number as parameters.

Personnel number and Trip Number are retrieved from the other webdynpro component where this Custom Webdynpro is called.

In the Component Controller, Trip_details node is created with two attributes PERNR & TRIP. The values of Personnel number and Trip Number are retrieved using get_parameter method in WDDOINIT Method and mapped to component controller context node Trip_details.

In the Main View, the Component Controller Context node Trip_details is mapped to pass the values of Personnel Number and Trip Number.

Advantages of New Solution:

1.     No changes involved in Adobe form Interface for parameter names.

2.     As no change in the parameter names in Interface, no Binding changes required in Adobe form Layout.

3.     Testing Effort for Adobe form is considerably reduced.

Output:

When we execute the webdynpro application, the ZTEST_PTRV_EXPENSE_FORM is displayed.

/wp-content/uploads/2013/05/img21_218437.jpg

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Good and smart appraoch  while facing  integration issue with both Web DynPRo and Adobe forms.

      Thanks for the Good Document!