on 06-02-2008 8:28 AM
Hi All,
I am having two Input fields and two buttons Insert and EDIT/Display, I Have created Database table and iam inserting the records into the database table by entering into the input fields, After entering into the database table the button EDIT should be changed to Display.
Up on inserting data in to database table the button name should change,
Pls provide the code.
Thanks,
Harish.G
Hi All,
I tried what you all said but the problem was not solved.
can u pls suggest any more code.
ThankQ.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
I am getting the following error.
Note
The following error text was processed in the system RT1 : The lead selection has not been set. MAIN_VIEW ?ꯂ큳??
The error occurred on the application server winserv_RT1_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: RAISEELEMENT_NOT_FOUND of program CL_WDR_CONTEXT_NODE===========CP
Method: PATH_TABLE_GET_ELEMENT2 of program CL_WDR_CONTEXT_NODE===========CP
Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
Hi,
Create a context node BUTTON_TEXT with cardinality 0..1. Create an attribute EDIT_DISP in the context node, of type STRING.
Bind the 'text' property of the EDIT button, to the EDIT_DISP attribute.
In the ONCLICK event handler of the button EDIT, write the following code (modify the logic as reqd):
data lo_nd_button_text type ref to if_wd_context_node.
data lo_el_button_text type ref to if_wd_context_element.
data ls_button_text type wd_this->element_button_text.
* navigate from <CONTEXT> to <BUTTON_TEXT> via lead selection
lo_nd_button_text = wd_context->get_child_node( name = wd_this->wdctx_button_text ).
* get element via lead selection
lo_el_button_text = lo_nd_button_text->get_element( ).
* get all declared attributes
if lo_el_button_text IS NOT INITIAL.
lo_el_button_text->get_static_attributes(
importing
static_attributes = ls_button_text ).
if ls_button_text-edit_disp = 'EDIT'.
ls-button_text-edit_disp = 'DISPLAY'.
endif.
lo_nd_button_text->bind_element( ls_button_text ).
endif.
Regards,
Wenonah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi harish,
U might have written a method to pass the data to the database rite.
declare a attribute in the context also with type string if required u can give a default value to the button as 'Edit' and bind to the button which u want the text to be changed.
after successful passing, declare a string.
and assign lv_string = 'Display'.
and set the attribute of the button to lv_string.
now after the successful passing the name of the button will be changed to 'display' from edit.
Regards...
Arun.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.