on 11-25-2009 5:56 AM
Hi all,
I have scenario lik the following..
I have one input field and search button. if i enter one value in input field, it shuld fetch the data as per my input. This is working fine. But,
if i not enter any input, it should fetch all the records. but no records are fetched. Wat is error here?
node_input->get_attribute( EXPORTING name = 'KUNNR'
IMPORTING value = it_kunnr ).
data:
node_size TYPE int1.
node_size = node_input->get_element_count( ).
if ( node_size eq '1' ).
SELECT * FROM KNA1 into table itab where Kunnr = it_kunnr.
ELSEIF ( node_size ne '1' ).
SELECT * FROM KNA1 into table itab.
endif.
Thanks and Regards,
Gopi.
Try this way :
if it_kunnr is not initial.
SELECT * FROM KNA1 into table itab where Kunnr = it_kunnr.
ELSE.
SELECT * FROM KNA1 into table itab.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
DATA lo_nd_node_inputTYPE REF TO if_wd_context_node.
DATA lo_el_node_inputTYPE REF TO if_wd_context_element.
DATA ls_node_inputTYPE wd_this->element_node_input.
lo_nd_node_input= wd_context->get_child_node( name = wd_this->wdctx_resume_info ).
lo_el_node_input= lo_nd_node_input->get_element( ).
lo_el_node_input->get_attribute(
EXPORTING
name = 'KUNNR'
IMPORTING
value = it_kunnr ).
if it_kunnr is not initial.
SELECT * FROM KNA1 into table itab where Kunnr = it_kunnr.
ELSE
SELECT * FROM KNA1 into table itab." this statement should fetch all the records of the table
endif.
Priya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your valuable replies..
my problem gets solved..
now my doubt is how can i get node size ? ( how to use that)
Thanks and Regards,
Gopi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
node_input->get_attribute( EXPORTING name = 'KUNNR'
IMPORTING value = it_kunnr ).
read the attribute which is binded to the input field and use get_static_attributes_table
for getting the conteents of ur internal table instead of get_attribute
DATA: lv_node TYPE REF TO if_wd_context_node,
lt_kunnr TYPE if_main=>elements_kunnr,
wa_kunnr TYPE if_main=>element_kunnr.
lv_node = wd_context->get_child_node( name = 'KUNNR' ).
CALL METHOD lv_node->get_static_attributes_table
IMPORTING
table = lt_kunnr.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.