on 07-31-2012 12:10 PM
Hi ,
I am working on Webdynpro application for Cpro.
I have one check box there , i need to save the value' X' if the checkbox is checked otherwise blank into the table.
I write the below code on the 'On toggle' even.
method ONACTIONENTER .
DATA lr_change_mngr TYPE REF TO cl_dpr_ui_change_manager.
DATA lv_value TYPE string.
lv_value = wdevent->get_string( name = 'ID' ).
* trigger changemanager
cl_dpr_ui_event_source=>start_report_change_events( ).
endmethod.
but the respective value based on the checkbox status not updating into the database.
Please help.
Thanks,
Akhilesh Bhagat.
Hi Akhilesh,
1) You have to take one attribute under the node for Checkbox which is of type ABAP_BOOL.
2) Then bind this attribute with your UI element which you took.
3) Read the value of the checkbox using Get_Attribute( ) method and write the modify statement to update into the data base.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
create on attribute in context....
then follow below screen.
then follow bellow sample code.
* DATA lo_el_context TYPE REF TO if_wd_context_element.
* DATA ls_context TYPE wd_this->element_context.
DATA lv_resub TYPE wd_this->element_context-resub.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* @TODO handle not set lead selection
IF lo_el_context IS INITIAL.
ENDIF.
* get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `RESUB`
IMPORTING
value = lv_resub ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Your check box will be linked to a context attribute. You can get the value using GET_ATTRIBUTE method. ( Put a break point and check if the value is really coming to your variable )
2. How are you using this value in your change maker method? I don't see any parameters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.