cancel
Showing results for 
Search instead for 
Did you mean: 

Is Tab control available in Adobe form

chinna_babu2
Active Participant
0 Kudos

Hi All,

Any body have an idea whether tab control available for Webdynpro Adobe forms. In my PDF, I have to create more number of controlls in a single page. So, if a tab control like in weddynpro avaliable in ADOBE forms, all the fileds can be fit in a single page.

Does any body got this type of requirement and acheived it?

Regards,

Chinna.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Babu,

You dont have such option in Adobe Forms but this example might help you.

[http://saptechnical.com/Tutorials/AdobeForms/Table/page1.htm]

Regards,

Amit.

Answers (3)

Answers (3)

chinna_babu2
Active Participant
0 Kudos

solved myself.

former_member189058
Active Contributor
0 Kudos

Hi Chinna,

Tab Control is not available with Adobe Forms. However, I have acheived the same through a work around.

Concept: Have Buttons and Subforms in Adobe and make them work as tabs.

Approach:

Web Dynpro

Context:


TAB_PDF  1..1
  TAB1       1..1 or 0..1 depending on what you have to show
     Attrib1
     ..
     Attribn
  TAB 2     1..1
     Attrib1
     ...
     Attribn
TAB3        1..1
     Attrib1
     ...
     Attribn

Method: WDINIT or wherever you wan to retrieve the data for the PDF

Assume that ls_data has all the data that is to be shown on the form


  DATA: 
        lo_node TYPE REF TO if_wd_context_node,
        lo_ele  TYPE REF TO if_wd_context_element,
        ls_data TYPE wd_this->element_data,
        ls_tab1    TYPE wd_this->element_tab1,
        ls_tab2    TYPE wd_this->element_tab2,
        ls_tab3    TYPE wd_this->element_tab3.
  
  lo_node = wd_context->get_child_node( name = wd_this->wdctx_data ).
  lo_ele = lo_node->get_element( ).
  lo_ele->get_static_attributes(
    IMPORTING
      static_attributes = ls_data ).
  
  CLEAR lo_node.
  lo_node = wd_context->get_child_node( name = wd_this->wdctx_tab_pdf ).
  lo_node = lo_node->get_child_node( name = wd_this->wdctx_tab1 ).
  MOVE-CORRESPONDING ls_data to ls_tab1.
  lo_node->bind_structure( ls_tab1 ).
  
  CLEAR lo_node.
  lo_node = wd_context->get_child_node( name = wd_this->wdctx_tab_pdf ).
  lo_node = lo_node->get_child_node( name = wd_this->wdctx_tab2 ).
  MOVE-CORRESPONDING ls_data to ls_tab2.
  lo_node->bind_structure( ls_tab2 ).
  
  CLEAR lo_node.
  lo_node = wd_context->get_child_node( name = wd_this->wdctx_tab_pdf ).
  lo_node = lo_node->get_child_node( name = wd_this->wdctx_tab3 ).
  MOVE-CORRESPONDING ls_data to ls_tab3.
  lo_node->bind_structure( ls_tab3 ).

Layout: Create an Interactive Form UI element

Bind data source to TAB_PDF

Bind pdf source

Provide Form name in template source.

Double click on form name and create interface using node TAB_PDF.

Interface: Activate the Interface

Adobe Form:

Form Layout Type - ZCI

Form Design:

Create a sunform and name it main.

Object Palette -> Subform Tab --> Content --> Flowed

Create 3 buttons - button1, button2 and button3 in main.

All regular buttons with raised border.

Create 3 subforms namely subform1, subform2 and subform3 under main.

make each subform overlap each other completely. At the time of overlapping, check that subform2 doesnt become the child of subform1. If so, drag it out and mplace under main in the heirarchy view.

Now for each subform, do this->

Object Palette -> Subform Tab -->

Presence --> Hidden (Exclude from layout) - Only for the first subform, ie. subform1 keep it visible.

Now to to DATA view and drag n drop fields from TAB1 node on to subform1.

Now make subform1 --> Object Palette -> Subform Tab --> Content --> Flowed

Presence --> Hidden (Exclude from layout)

Make subform2 visible and drag n drop fields from tab2 onto subform2.

Now make subform2 --> Object Palette -> Subform Tab --> Content --> Flowed

Presence --> Hidden (Exclude from layout)

Make subform3 visible and drag n drop fields from tab3 onto subform2.

Now make subform3 --> Object Palette -> Subform Tab --> Content --> Flowed

Presence --> Hidden (Exclude from layout)

Finally after designing all the sbforms, make subform1 visible.

Now write the following code on the click event of the buttons:


Button1:
xfa.form.TAB_PDF.main.Subform1.presence = "visible"
xfa.form.TAB_PDF.main.Subform2.presence = "hidden"
xfa.form.TAB_PDF.main.Subform3.presence = "hidden"

Button2:
xfa.form.TAB_PDF.main.Subform1.presence = "hidden"
xfa.form.TAB_PDF.main.Subform2.presence = "visible"
xfa.form.TAB_PDF.main.Subform3.presence = "hidden"

Button3:
xfa.form.TAB_PDF.main.Subform1.presence = "hidden"
xfa.form.TAB_PDF.main.Subform2.presence = "hidden"
xfa.form.TAB_PDF.main.Subform3.presence = "visible"

Hope you find this solution good.

Regards,

Reema.

Edited by: Reema Shahbazkar on Sep 19, 2008 8:18 PM

Edited by: Reema Shahbazkar on Sep 19, 2008 8:32 PM

You can also change the background color and the text color of the tabs when clicked.

Only thing that can't be changed is the Shape of the button.

Former Member
0 Kudos

Hi Chinna,

I think TAB control(Creating multiple tabs with diff fields under each tab) is not available in IF.

Regards,

Arafat

Edited by: Arafat Farooqui on Sep 19, 2008 7:06 AM