on 06-03-2009 6:44 AM
Hi,
Is there any way to deafult current date to date select-option in web dyn pro?
So you need to add the following code before calling method
ADD_SELECTION_FIELD
FIELD-SYMBOLS: <tab> TYPE INDEX TABLE,
<struct> TYPE ANY,
<wa> TYPE ANY,
<option> TYPE char2,
<sign> TYPE char1,
<high> TYPE ANY,
<low> TYPE ANY,
<wa_values> TYPE ANY.
ASSIGN lt_range_table->* TO <tab>.
APPEND INITIAL LINE TO <tab> ASSIGNING <wa>.
ASSIGN COMPONENT 'OPTION' OF STRUCTURE <wa> TO <option>.
ASSIGN COMPONENT 'HIGH' OF STRUCTURE <wa> TO <high>.
ASSIGN COMPONENT 'LOW' OF STRUCTURE <wa> TO <low>.
ASSIGN COMPONENT 'SIGN' OF STRUCTURE <wa> TO <sign>.
<sign> = 'I'. "Default sign which you want to give
<option> = 'EQ'. "Default option you want to give
<low> = 'Low_value'."Default low value which you want to give
<high>= 'High_value'
I hope it helps.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Check following code:
DATA:
lr_componentcontroller TYPE REF TO ig_componentcontroller,
l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
DATA:
lt_range_table TYPE REF TO data,
lt_types TYPE string_table,
rt_range_table TYPE REF TO data,
text TYPE string,
typename TYPE string.
DATA: vbeln TYPE lips-vbeln,
erdat TYPE lips-erdat,
auart TYPE vbak-auart,
trnsp TYPE vtadd01t-add_info,
kunnr TYPE likp-kunnr.
DATA:
num_events TYPE i.
DATA: uname TYPE sy-uname.
uname = sy-uname.
wd_context->set_attribute( name = 'CUSTOMER'
value = uname ).
wd_context->GET_ATTRIBUTE( Name = 'TRANSPORTER_CODE'
Value = uname ).
create the used component
l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
get a pointer to the interface controller of the select options component
wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
init the select screen
wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VBELN_VL' ).
wd_this->m_handler->add_selection_field(
i_description = 'Sales Document'
i_id = 'VBELN'
i_obligatory = 'X'
it_result = lt_range_table
i_value_help_structure = 'LIPS'
i_value_help_structure_field = 'VBELN' ).
lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'ERDAT' ).
wd_this->m_handler->add_selection_field( i_id = 'ERDAT' i_obligatory = 'X' it_result = lt_range_table ).
*lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VTTK_ADD01' ).
*wd_this->m_handler->add_selection_field( i_id = 'VTTK_ADD01' I_DESCRIPTION = 'CHAHA' it_result = lt_range_table ).
wd_this->m_handler->add_selection_field(
i_description = 'Transporters Code'
i_id = 'VTTK_ADD01'
it_result = lt_range_table
i_value_help_structure = 'VTADD01T'
i_value_help_structure_field = 'ADD_INFO' ).
*Supress Global options in Used Component
wd_this->m_handler->set_global_options(
i_display_btn_cancel = ''
i_display_btn_check = ''
i_display_btn_execute = ''
i_display_btn_reset = '' ).
lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VBAK-AUART' ).
wd_this->m_handler->add_selection_field(
i_description = 'Sales Document Type'
i_id = 'AUART'
i_obligatory = 'X'
it_result = lt_range_table
i_value_help_structure = 'VBAK'
i_value_help_structure_field = 'AUART' ).
ENDMETHOD.
METHOD onactionexecute .
DATA: node_saledoc TYPE REF TO if_wd_context_node.
DATA: node_crdate TYPE REF TO if_wd_context_node.
DATA: node_transcode TYPE REF TO if_wd_context_node.
DATA: node_doctype TYPE REF TO if_wd_context_node.
DATA: node1 TYPE REF TO if_wd_context_node.
DATA: node2 TYPE REF TO if_wd_context_node.
DATA: rt_saledoc TYPE REF TO data.
DATA: rt_crdate TYPE REF TO data.
DATA: rt_transcode TYPE REF TO data.
DATA: rt_doctype TYPE REF TO data.
FIELD-SYMBOLS: <fs_saledoc> TYPE table,
<fs_crdate> TYPE table,
<fs_transcode> TYPE table,
<fs_doctype> TYPE table.
Retrieve the data from the select option
rt_saledoc = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'VBELN' ).
Assign it to a field symbol
ASSIGN rt_saledoc->* TO <fs_saledoc>.
Retrieve the data from the select option
rt_crdate = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'ERDAT' ).
Assign it to a field symbol
ASSIGN rt_crdate->* TO <fs_crdate>.
Retrieve the data from the select option
rt_doctype = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'AUART' ).
Assign it to a field symbol
ASSIGN rt_doctype->* TO <fs_doctype>.
Retrieve the data from the select option
*rt_transcode = wd_this->m_handler->get_range_table_of_sel_field(
*i_id = 'VTTK_ADD01' ).
Assign it to a field symbol
assign rt_transcode-> to <fs_transcode>.
node_saledoc = wd_context->get_child_node( name = 'S_VBELN' ).
node_saledoc->bind_table( <fs_saledoc> ).
node_crdate = wd_context->get_child_node( name = 'S_ERDAT' ).
node_crdate->bind_table( <fs_crdate> ).
node_doctype = wd_context->get_child_node( name = 'S_AUART' ).
node_doctype->bind_table( <fs_doctype> ).
IF <fs_doctype> IS NOT INITIAL
AND <fs_crdate> IS NOT INITIAL
AND <fs_saledoc> IS NOT INITIAL
.
wd_comp_controller->execute_zotddelvnote_vend_tari( ).
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.