on 10-06-2008 1:12 PM
hi experts,
I am having node structure like this :
CLAIM <--- NODE
CLAIMITEM <--- NODE
EXPENSETYPE <--- NODE
expvar <--- ATTRIBUTE
DATEVAR <--- ATTRIBUTE
i m BIND ing node CLAIMITEM to datasource property of table control , having two fields expensetype as dropdown and date.
i am using table for input purpose. so in component controller , where i create the element for claimitem node like this,
DATA:
NODE_CLAIM TYPE REF TO IF_WD_CONTEXT_NODE,
NODE_CLAIMITEM TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_CLAIMITEM TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_CLAIMITEM TYPE IF_COMPONENTCONTROLLER=>ELEMENT_CLAIMITEM .
NODE_CLAIM = WD_CONTEXT->GET_CHILD_NODE( NAME = IF_COMPONENTCONTROLLER=>WDCTX_CLAIM ).
CALL METHOD NODE_CLAIM->CREATE_ELEMENT
RECEIVING
ELEMENT = ELEM_CLAIMITEM.
now if i want to add this element to node claimitem how its possible?
because if i execute application i am getting table in noneditable form..
Thanks,
saurin shah
Hi Saurin,
have you tried to use the BIND_ELEMENT function?
NODE_CLAIM->BIND_ELEMENT(
new_item = ELEM_CLAIMITEM
set_initial_elements abap_false ).
Please let me know if this solves your issue?
Regards, Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi steffen,
as u asked to use Method BIND_ELEMENT,but after creating element for node how can i bind it using this method.
Because this method carrying 1 RETURNIG parameter ELEMENT which type ref to IF_WD_CONTEXT_ELEMENT.and it is not optional.
please let me know how it should work?
Thanks,
saurin shah
Hello Saurin,
This method (BIND_ELEMENT) does indeed return back a reference of type IF_WD_CONTEXT_ELEMENT. You don't have to worry about the value that it returns back to you. The system just returns the reference back so that you can save & use it elsewhere in your program. If you don't need the reference you can omit saving it into some variable & just pass the desired input parameters to the method. So the basic syntax would be something like:
node_flights->bind_element( new_item = first_flight_elem
set_initial_elements = abap_false ).
where:
firs_flight_elem is TYPE REF TO IF_WD_CONTEXTELEMENT
node_flights is TYPE REF TO IF_WD_CONTEXT_NODE
Regards,
Uday
HI UDAY,
thanks to reply me.
What my aim is, i want my table editable for user input with dropdown list in one field, and second field in table with date navaigator.
as i found, what i did, in component controller init method , i initialiaze node and than create element and bind it to claim node. than i created claimitem node thorugh get_child_node method and create element of that and bind it to claimitem node.
no errors.
but when i test application i dont find any rows in output.....
THANKS,
SAURINS SHAH
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
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.