cancel
Showing results for 
Search instead for 
Did you mean: 

How to get more than 1 Form output? Is it possible with Adobe forms?

Former Member
0 Kudos

Hi,

Right now my form has an ability to display a single Order with single Header & line items.

I want to enhance the functionality to multiple forms prints.I mean I will be having multiple headers and l ine items.

I can fill my internal tables with multiple records data but what are the other form changes should i take care( hierarchy, data, etc...)

In smartforms I was able to do this because there we can define loops.How do we handle it here in adobe forms?

FYI.. I am filling internal table through WD application.Should I do Some context level changes?

Also,

In Dev environment I can see my Bold objects but when i move it to QA they are disappearing & font is also changing.What could be the reason?

rgds

Vara

Edited by: Vara K on Feb 16, 2009 5:37 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vara,

my blog:

/people/juergen.hauser2/blog/2006/09/12/avoiding-common-mistakes-when-using-tables-on-sap-interactive-forms

talks about data binding to repeating data nodes. This sounds like what you are looking for.

Regards,

Juergen

Former Member
0 Kudos

Juergen,

Thank you for the nice blog.I am following that blog & trying to get multiple print forms by passing multiple job numbers .I am using select -options and I was able to capture the entries .

I have debugged and I see IT_ITAB has all entries which I need to print put.But I am not getting them in adobe form.Here is the code which I have used for pushing data to adobe form.

In context I maintained cardinality 1...n for all nodes.

DATA lo_nd_node_ctc TYPE REF TO if_wd_context_node.
  DATA lo_el_node_ctc TYPE REF TO if_wd_context_element.
  DATA ls_node_ctc TYPE wd_this->element_node_ctc.
* navigate from <CONTEXT> to <NODE_CTC> via lead selection
  lo_nd_node_ctc = wd_context->get_child_node( name = wd_this->wdctx_node_ctc ).
  lo_nd_node_ctc->bind_table( new_items = it_itab  set_initial_elements = abap_true ).

In adobe form I did like this

Created a subform1 
Subform1-> Accessibility - Table 
	  Content -flowed
	  Flow direction - Top to Bottom
                 Check Allow Page Breaks within Content

Underneath Subform1 I have created a Tableform
                 Tableform -> Accessibility - BodyRow
	  Content -flowed
	  Flow direction - Top to Bottom
                  Check Allow Page Breaks within Content

Now I created a table and dragged the entries from Dataview

table properties-> Check Allow Page Breaks within Content
                       -> Binding - Check Repeat table for Each Data Item,Min Count:1

Result : I don't see any entries in form.

What am I doing wrong

Rgds

Vara

Former Member
0 Kudos

Hi vara,

You need to check your data bindings.

My understanding is that you want to have multiple tables on the form.

You said "repeat table for each data item". This is usually used if you have multiple similar tables on the form. Please check if your data binding of the table does contain a "DATA[*]" (DATA is the name of your repeating node). For nested tables you context also has to have a nested structure.

Not sure if your statement "I don't see any entries in form." also means that you do not see one single table with all entries:

Here's what you need to check in this case:

1. Data binding of the table row. You should have a binding that includes "DATA[*]" (thats your repeating node).

2. Check "repeat row for data items"

3. Best practice is that the data binding of your cells is relative to the row. You might want to check this.

Regards,

Juergen

Former Member
0 Kudos

Hi Juergen,

I am following all the steps from your blog and suggestions in your reply. Still missing entries .I only see header captions and item captions on 1 single page.

Here is what I did

In my WD application I have select-options, search button and interactiveform element.

In WD Application Context

1) Created a Node for Selections. ND_SELECT ,

Cardinality: 1..n ,

Selection: 1..n ,

Intialization lead Selection : Checked ,

Singleton : Checked

2) Created a Node for Output Structures ADOBE_DATA

Properties same as above

3) As we need Nesting Under ADOBE_DATA node I have created a subnode for Header: HEADER

Properties same as above

4) Under HEADER node I have created a items Node : ITEM

Properties same as above

In Adobe form I have created 2 subforms one for header and one for Items Subform

A) HeaderForm :

Subform Role: Header Row

Binding : $record.HEADER

Repeat subform for each Data Item Checked

Subform type Flowed , Flow Direction: Western text

Just for testing I just dragged couple of fields in from header data view and dropped on header form.

So field has data binding : DATA[*].PSPID

B) ItemForm:

Subform Role: TABLE

Binding : $record.HEADER.DATA[].ITEM.DATA[]

Repeat subform for each Data Item Checked

Subform type Flowed , Flow Direction: Top to bottom, Allow page breaks within content Checked

In the ItemForm I have dragged item data table ITEMTABLE and it has following properties

I) Subform Role: TABLE ( Defaulted)

Binding : $record.HEADER.DATA[].ITEM.DATA[]

Subform type Flowed , Flow Direction: Top to bottom, Allow page breaks within content Checked

In this I have Both header row and body row

Body row(DATA) has following properties

II) Row type: bodyrow ( Defaulted)

Allow Page break within Content Checked

Binding : $record.HEADER.DATA[].ITEM.DATA[]

Repeat row for Each data item : Checked

Subform type Flowed , Flow Direction: Top to bottom, Allow page breaks within content Checked

As I have used Select-options and I am getting both header and Item data in to button search method .

DATA lo_nd_adobe_data TYPE REF TO if_wd_context_node.
  DATA lo_nd_header TYPE REF TO if_wd_context_node.
  DATA lo_el_header TYPE REF TO if_wd_context_element.
  DATA ls_header TYPE wd_this->element_header.
* navigate from <CONTEXT> to <ADOBE_DATA> via lead selection
  lo_nd_adobe_data = wd_context->get_child_node( name = wd_this->wdctx_adobe_data ).

* navigate from <ADOBE_DATA> to <HEADER> via lead selection
  lo_nd_header = lo_nd_adobe_data->get_child_node( name = wd_this->wdctx_header ).
  lo_nd_header->bind_table( new_items = it_header  set_initial_elements = abap_true ).

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

* navigate from <ADOBE_DATA> to <HEADER> via lead selection
  lo_nd_header = lo_nd_adobe_data->get_child_node( name = wd_this->wdctx_header ).

* navigate from <HEADER> to <ITEM> via lead selection
  lo_nd_item = lo_nd_header->get_child_node( name = wd_this->wdctx_item ).
 lo_nd_item->bind_table( new_items = it_item  set_initial_elements = abap_true ).

Could you please tell me where I am doing wrong?

Rgds

Vara

Edited by: Vara K on Feb 24, 2009 7:18 PM

Former Member
0 Kudos

Hi Vara,

I hope I understood your context structure. I think you need to adjust your form structure and your data bindings.

You are using a nested table. That means you also need to use a nested structure in your form design.

You could, for example start with a subform. This subform is bound to $record.HEADER.DATA[] and you need to check repeat subform for each data item. Inside this subform you can add a table. For the table itself use the data binding "ITEM" (this is a relative binding - to the outer subform). The body row should have "DATA[]" as data binding and should be repeated for each data item.

One of the issues of your description is that you are using the same data binding "$record.HEADER.DATA[].ITEM.DATA[]" multiple times. This will not work.

And please make sure that you body pages is also set to flowed content.

Regards,

Juergen

Former Member
0 Kudos

Juergen,

thank you for the Tips.

As per your recommendation I have simplified the process & did following structure changes in Form.

Created one MainForm and its properties are

Binding : $record.HEADER.DATA[*]

Repeat subform for each data item Checked , Min Count: 1

Subform Content : Flowed ,Western Text , Allow page breaks withing Content Checked

Accessibility /Subform Role: None

Inside this Mainform I have created a small table ITEMTABLE with 3 fields and mapped it item data.

Itemtable properties

Binding : ITEM

Uncheck Repeat table for Each Data item.

I have Itemtablerow inside Itemtable and its properties are:

Binding : DATA[*]

Repeat row for each data item Checked ,Min count: 1

Accesibility:/Subform Role: Body row

Row: body row, Check Allow page breaks within content

Still donu2019t see data on form.here is what i have in Hierarchy tab.

ADOBE_DATA (no Caption)
 - (Master pages)(no caption)
         Page1 
                  Untitled Content Area(no caption)
- Mainform(no Caption)
                   PSPID {PSPID}
          -ItemTable (No caption)
                  - ItemtableRow (no Caption)
                               PSPID(no Caption)
                                CJTDAT(no Caption)
                                CPERCO(no Caption)

Also , I cannot do this below becasue I don't see any option for my body page ADOBE_DATA.

And please make sure that you body pages is also set to flowed content.

What could be going wrong ?

Rgds

Vara

Edited by: Vara K on Feb 25, 2009 5:41 PM

Former Member
0 Kudos

Hi Vara,

It's hard to say what the issue is. In general nested tables work. So I would have to take a look at the form design.

If you want to you can send me a sample PDF.

Regards,

Juergen

Former Member
0 Kudos

Vara,

The data binding and structure of the form look fine now. Please check your context in WD and verify that for example the cardinality of the nodes is OK. Please also make sure that the context is populated with data.

Regards,

Juergen

Former Member
0 Kudos

Juergen,

Thank you very much for wonderful support & I salute your patience.

I am awarding you full 10 points.

Rgds

Vara

Answers (0)