cancel
Showing results for 
Search instead for 
Did you mean: 

Display of view1 to view2 in rows and columns

Former Member
0 Kudos

Hi All,

I want to display the user input fields data into view1 in rows and column,

I am having some rows of input fields for user in view1, they can key in even 1 row of data .

I am trying to display in view2 all the fields for which the user has entered data and not the blank fields.

The data is getting transfered but not as I need. In table UI when I am binding it is displaying in one row . I want to display in rows and columns.

Class Area

A XYZ

B PDF

C DEF

Could any one highlight some points.

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

arjun_thakur
Active Contributor
0 Kudos

Hi Kiran,

Please provide more details. Your requirement are not very clear.

Regards

Arjun

Former Member
0 Kudos

Hi Arjun,

Thanks for reply,

I have some input fileds in view 1 for user inputs

Airline Class Date Flight No

XYC First 01/02/09 AIN234

PDF SECOND 02/002/09 AIN 435

I want the same way do display them in View2 just for there review on click of submit. I tried using the table UI and bind it but it comes like

Airline Class Date Flight No Airline Class Date Flight No

XYC First 01/02/09 AIN234 PDF SECOND 02/002/09 AIN 435

So can you suggest

Thanks

arjun_thakur
Active Contributor
0 Kudos

kiran,

Try this method:

- Create a node with 4 attributes ( Airline Class Date Flight No) and bind it with the table UI element.

- Create an internal table having same structure as your node.

- I assume that each of your input field is binded to a separate attribute. Read each and every node and get the data entered by the user in the internal table create above.

- Bind that internal table with the node that is binded to your table.

This way the data eill come in the tabular form.

Regards

Arjun

Former Member
0 Kudos

HI arjun,

Thanks for the reply .

I created the node with the dictionary structure .

Binded to the table UI

the below code is there in inbound plug of view2

DATA lo_nd_flight_structure TYPE REF TO if_wd_context_node.

DATA lo_el_flight_structure TYPE REF TO if_wd_context_element.

DATA ls_flight_structure TYPE wd_this->element_flight_structure.

  • navigate from <CONTEXT> to <FLIGHT_STRUCTURE> via lead selection

lo_nd_flight_structure = wd_context->get_child_node( name = wd_this->wdctx_flight_structure ).

  • get element via lead selection

lo_el_flight_structure = lo_nd_flight_structure->get_element( ).

  • get all declared attributes

lo_el_flight_structure->get_static_attributes(

IMPORTING

static_attributes = ls_flight_structure ).

could you help me for

  • Bind that internal table with the node that is binded to your table.

thanks

Former Member
0 Kudos

hi,

Use this statement to bind table with node :

lo_nd_flight_structure->bind_table( ls_flight_structure ).

Thanx.

Former Member
0 Kudos

Hi saurav

Thanks,

I am getting error "LS_FLIGHT_STRUCTURE" is not type- compatible with formal parameter.

coudl you let me know

thanks

Former Member
0 Kudos

hi,

->You have to read data from Input field.For that read the input fields using code wizard(control +F7).

-> Store the data read into an internal table.

-> And finally bind the internal table with the node which is binded to Table UI Element.

lo_nd->bind_table( itab ) . here itab is your internal table which has all the data.

As per i understand , you are having input fields in View 1 and Table in View2.

-> So you got to map View1 with the component controller.

-> Similiarly View2 wiht the component controller.

-> Now on the click of button on view1 fire the outbound plug to View2.

-> In the WDDoinit of view2, read the input fields using code wizard.

-> Have all the read data in internal table and finally bind the table with node as shown above.

Thanx.

arjun_thakur
Active Contributor
0 Kudos

Kiran,

Create an internal table like this:



DATA ls_flight_structure1 TYPE table of  wd_this->element_flight_structure.

Get the data in it and then bind it to the node.

Regards

Arjun

Former Member
0 Kudos

Hi Saurav and arjun.

Thanks for your inputs.

I am getting error

Subnode GENERAL_DATA_VIEW.flight_structure does not exist

when i click on the submit button in view1..

The below code I wrote in inbound plug of view2 where the table UI is binded with flight_structure and also I have done the mapping of both the views context with component controller

DATA lo_nd_flight_structure TYPE REF TO if_wd_context_node.

DATA lo_el_flight_structure TYPE REF TO if_wd_context_element.

DATA ls_flight_structure TYPE wd_this->element_flight_structure.

DATA ls_flight_structure1 TYPE table of

wd_this->element_flight_structure.

*DATA ls_flight_structure TYPE PTK99.

  • navigate from <CONTEXT> to <FLIGHT_STRUCTURE> via lead selection

lo_nd_flight_structure = wd_context->get_child_node( name =

wd_this->wdctx_flight_structure ).

  • get element via lead selection

lo_el_flight_structure = lo_nd_flight_structure->get_element( ).

  • get all declared attributes

lo_el_flight_structure->get_static_attributes(

IMPORTING

static_attributes = ls_flight_structure ).

lo_nd_flight_structure = wd_context->get_child_node( name =

`flight_structure` ).

lo_nd_flight_structure->get_static_attributes_table( IMPORTING table =

ls_flight_structure1 ).

lo_nd_flight_structure->bind_table( ls_flight_structure1 ).

Could you please suggest .

Thanks

arjun_thakur
Active Contributor
0 Kudos

Hi,

edit this line in your code

lo_nd_flight_structure = wd_context->get_child_node( name =

`flight_structure` ).

use instead:

lo_nd_flight_structure = wd_context->get_child_node( name =

wd_this->wdctx_flight_structure ).

Regards

Arjun

Edited by: Arjun Thakur on Mar 11, 2009 5:17 PM

Former Member
0 Kudos

Hi Arjun,

Still I am getting user data in rows and not in tabular format.

Steps

  • Created tabel UI and binded with all attributes of flight structure. So there are many columns create depending on attributes.

below is the code in inbound plug of view2 .

DATA lo_nd_flight_structure TYPE REF TO if_wd_context_node.

DATA lo_el_flight_structure TYPE REF TO if_wd_context_element.

DATA ls_flight_structure TYPE wd_this->element_flight_structure.

DATA ls_flight_structure1 TYPE table of

wd_this->element_flight_structure.

*DATA ls_flight_structure TYPE PTK99.

  • navigate from <CONTEXT> to <FLIGHT_STRUCTURE> via lead selection

lo_nd_flight_structure = wd_context->get_child_node( name =

wd_this->wdctx_flight_structure ).

  • get element via lead selection

lo_el_flight_structure = lo_nd_flight_structure->get_element( ).

  • get all declared attributes

lo_el_flight_structure->get_static_attributes(

IMPORTING

static_attributes = ls_flight_structure ).

lo_nd_flight_structure->get_static_attributes_table( IMPORTING table =

ls_flight_structure1 ).

lo_nd_flight_structure->bind_table( ls_flight_structure1 ).

any points

thanks

arjun_thakur
Active Contributor
0 Kudos

Kiran,

You won't be able to get the data in the tabular form like this.

watch the steps:

- create a internal table and a work area of the same type as your node.

- read each attribute (binded to the input field) and pass the value in the corressponding field of work area and then append it in the internal table.

- after getting all the data in the internal table bind it with the node.

Regards

Arjun

Edited by: Arjun Thakur on Mar 12, 2009 9:23 AM