on 11-28-2006 8:39 AM
Hi
I have an input field binded to a context. on the onEnter event I tries to debug and retreive the value the user has keyed in, using get_attribute method. But always it gives me the data passed to the field from model. How do i retrive the values keyed in by the user in that field. onEnter event.
Regards,
Murali.
Hi Murali,
in general reading the context attribute will return the value the user has entered.
There are 2 possibilities, why it may not work:
1. The user has entered the value somewhere in a table and you retrieve the value from the lead selection. In this case you should pass the correct index.
2. The user has entered wrong data, and your action handler is declared as validation independent. In this case you have no access to the entered value.
Regards, Regina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murali,
The coding is quite streight forward - I assume generated by the code wizard.
Please check whether you really bind against this attribute in this node.
Then set a breakpoint in the event handler (use the new debugger), switch one tool to the Web Dynpro debugger, and check the values.
Another possibility: Perhaps the code in WDDOBEFOREACTION does change the context attribute and overwrites the user input. If you have any coding there, set a breakpoint there and check the context.
Ciao, Regina
Hi, seem strange.
Please put your code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This is the piece of code written for onEnter of an Input Field that is binded to my context attribute - AUSBI. It refers to P0002-AUSBI and have mapped it from Component controller.
DATA:
node_changing TYPE REF TO if_wd_context_node,
node_i_p0022 TYPE REF TO if_wd_context_node,
elem_i_p0022 TYPE REF TO if_wd_context_element,
stru_i_p0022 TYPE if_edu_detail=>element_i_p0022 ,
item_ausbi LIKE stru_i_p0022-ausbi.
navigate from <CONTEXT> to <CHANGING> via lead selection
node_changing = wd_context->get_child_node( name = if_edu_detail=>wdctx_changing ).
navigate from <CHANGING> to <I_P0022> via lead selection
node_i_p0022 = node_changing->get_child_node( name = if_edu_detail=>wdctx_i_p0022 ).
@TODO handle not set lead selection
IF ( node_i_p0022 IS INITIAL ).
ENDIF.
get element via lead selection
elem_i_p0022 = node_i_p0022->get_element( ).
@TODO handle not set lead selection
IF ( elem_i_p0022 IS INITIAL ).
ENDIF.
get single attribute
elem_i_p0022->get_attribute(
EXPORTING
name = `AUSBI`
IMPORTING
value = item_ausbi ).
Now , my problem is item_ausbi always shows the value stored in attribute. I am populating value of the attribute using Component controller (referring BAPI). Hence whenevr I debug this code, I always get value coming from model. But i require to capture the value the user modified on the click of 'ENTER' key.
Regards,
Murali.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.