on 03-11-2009 5:02 AM
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
Hi Kiran,
Please provide more details. Your requirement are not very clear.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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.
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
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
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
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.