on 09-23-2014 11:07 AM
Dear Expertise
I have created a ALV Webdynpro for EKPO.
I have taken 5 fields.
There's problem in Coding.
Output is as -
Actually when first screen opens , we should be able to select the PO no from the list . But second screen opens and includes the options.
Can anyone help me in this scenario?
Regards
varun
Regards
varun
Hi Varun,
If you go to SE11 and look Purchasing Doc. field it will have search help assigned to it and that is what you are seeing here. There are two ways either create your own search help or do what Ram says.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
yes
code is
Method DOINIT
method WDDOINIT .
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_select_options( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_WDR_SELECT_OPTIONS .
lo_INTERFACECONTROLLER = wd_this->wd_cpifc_select_options( ).
DATA lv_r_helper_class TYPE ref to if_wd_select_options.
lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
).
DATA RT_RANGE_TABLE TYPE REF TO DATA.
CALL METHOD lv_r_helper_class->CREATE_RANGE_TABLE
EXPORTING
I_TYPENAME = 'EBELN'
* I_LENGTH =
* I_DECIMALS =
RECEIVING
RT_RANGE_TABLE = RT_RANGE_TABLE.
.
data : rt_ebeln TYPE REF TO data.
CALL METHOD lv_r_helper_class->ADD_SELECTION_FIELD
EXPORTING
I_ID = 'EBELN'
* I_WITHIN_BLOCK = MC_ID_MAIN_BLOCK
* I_DESCRIPTION =
* I_IS_AUTO_DESCRIPTION = ABAP_TRUE
IT_RESULT = rt_ebeln
* I_OBLIGATORY = ABAP_FALSE
* I_COMPLEX_RESTRICTIONS =
* I_USE_COMPLEX_RESTRICTION = ABAP_FALSE
* I_NO_COMPLEX_RESTRICTIONS = ABAP_FALSE
I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_OVS
* I_VALUE_HELP_ID =
* I_VALUE_HELP_MODE =
* I_VALUE_HELP_STRUCTURE =
* I_VALUE_HELP_STRUCTURE_FIELD =
* I_HELP_REQUEST_HANDLER =
* I_LOWER_CASE =
* I_MEMORY_ID =
* I_NO_EXTENSION = ABAP_FALSE
* I_NO_INTERVALS = ABAP_FALSE
* I_AS_CHECKBOX = ABAP_FALSE
* I_AS_DROPDOWN = ABAP_FALSE
* IT_VALUE_SET =
I_READ_ONLY = ABAP_FALSE
* I_DONT_CARE_VALUE =
* I_EXPLANATION =
* I_TOOLTIP =
* I_IS_NULLABLE = ABAP_TRUE
* I_FORMAT_PROPERTIES =
* I_SUGGEST_VALUES =
* I_SUGGEST_FILTER_METHOD =
.
endmethod.
Method SUBMIT
method ONACTIONSUBMIT .
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_select_options( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_WDR_SELECT_OPTIONS .
lo_INTERFACECONTROLLER = wd_this->wd_cpifc_select_options( ).
DATA lv_r_helper_class TYPE ref to if_wd_select_options.
lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
).
DATA RT_RANGE_TABLE TYPE REF TO DATA.
data : rt_ebeln TYPE REF TO data.
CALL METHOD LV_R_HELPER_CLASS->GET_RANGE_TABLE_OF_SEL_FIELD
EXPORTING
I_ID = 'EBELN'
* I_CHECK_OBLIGATORY = ABAP_TRUE
RECEIVING
RT_RANGE_TABLE = RT_EBELN.
.
* Create a field symbol to store the value entered in select options.
FIELD-SYMBOLS : <fs_ebeln> TYPE table.
ASSIGN rt_ebeln->* to <fs_ebeln>.
DATA lo_nd_ekpo TYPE REF TO if_wd_context_node.
DATA lt_ekpo TYPE wd_this->Elements_ekpo.
* navigate from <CONTEXT> to <EKPO> via lead selection
lo_nd_ekpo = wd_context->get_child_node( name = wd_this->wdctx_ekpo ).
SELECT * from ekpo into CORRESPONDING FIELDS OF TABLE lt_ekpo
WHERE ebeln in <fs_ebeln>.
* @TODO handle non existant child
* IF lo_nd_ekpo IS INITIAL.
* ENDIF.
* * @TODO compute values
* * e.g. call a model function
*
lo_nd_ekpo->bind_table( new_items = lt_ekpo set_initial_elements = abap_true ).
endmethod.
Method OVS
method ON_OVS .
TYPES:
BEGIN OF LTY_STRU_INPUT,
EBELN TYPE EBELN,
END OF LTY_STRU_INPUT.
TYPES:
BEGIN OF LTY_STRU_LIST,
EBELN TYPE EBELN,
END OF LTY_STRU_LIST.
DATA: LS_SEARCH_INPUT TYPE LTY_STRU_INPUT,
LT_SELECT_LIST TYPE STANDARD TABLE OF LTY_STRU_LIST,
LS_TEXT TYPE WDR_NAME_VALUE,
LT_LABEL_TEXTS TYPE WDR_NAME_VALUE_LIST,
LT_COLUMN_TEXTS TYPE WDR_NAME_VALUE_LIST,
LV_WINDOW_TITLE TYPE STRING,
LV_TABLE_HEADER TYPE STRING.
FIELD-SYMBOLS: <LS_QUERY_PARAMS> TYPE LTY_STRU_INPUT,
<LS_SELECTION> TYPE LTY_STRU_LIST.
CASE I_OVS_DATA-M_OVS_CALLBACK_OBJECT->PHASE_INDICATOR.
WHEN IF_WD_OVS=>CO_PHASE_0.
LS_TEXT-NAME = `EBELN`.
LS_TEXT-VALUE = `PO NUMBER`.
INSERT LS_TEXT INTO TABLE LT_LABEL_TEXTS.
LS_TEXT-NAME = `EBELN`.
LS_TEXT-VALUE = `PO NUMBER`.
INSERT LS_TEXT INTO TABLE LT_COLUMN_TEXTS.
I_OVS_DATA-M_OVS_CALLBACK_OBJECT->SET_CONFIGURATION(
LABEL_TEXTS = LT_LABEL_TEXTS
COLUMN_TEXTS = LT_COLUMN_TEXTS
WINDOW_TITLE = LV_WINDOW_TITLE
TABLE_HEADER = LV_TABLE_HEADER ).
WHEN IF_WD_OVS=>CO_PHASE_1.
WHEN IF_WD_OVS=>CO_PHASE_2.
SELECT EBELN
FROM EKPO
INTO TABLE LT_SELECT_LIST.
I_OVS_DATA-M_OVS_CALLBACK_OBJECT->SET_OUTPUT_TABLE( OUTPUT = LT_SELECT_LIST ).
WHEN IF_WD_OVS=>CO_PHASE_3.
FIELD-SYMBOLS : <LT_SEL_OPT_RESULT> TYPE STANDARD TABLE.
ASSIGN I_OVS_DATA-M_OVS_CALLBACK_OBJECT->SELECTION->* TO <LS_SELECTION>.
IF <LS_SELECTION> IS ASSIGNED.
ASSIGN I_OVS_DATA-MT_SELECTED_VALUES->* TO <LT_SEL_OPT_RESULT>.
INSERT <LS_SELECTION>-EBELN INTO TABLE <LT_SEL_OPT_RESULT>.
ENDIF.
ENDCASE.
endmethod.
Regards
varun
Hi Varun,
Sorry for my late reply.
Your code seems to be correct. See once you got the error information at the bottom section of your ECC, just click on that error. It will automatically take to the coding area, where you are facing the error.
Please post that also, so it will be further easy to track on that error cause.
BR,
RAM.
Hi
Error analysis I have seen
"Could not find Attribute LOW"
The exception 'CX_WD_CONTEXT' was raised, but it was not caught anywhere along
the call hierarchy.
Since exceptions represent error situations and this error was not
adequately responded to, the running ABAP program
'CL_WDR_CONTEXT_NODE_INFO======CP' has to be
terminated.
The exception, which is assigned to class 'CX_WD_CONTEXT', was not caught and
therefore caused a runtime error.
The reason for the exception is:
Could not find attribute LOW
Help.
Regards
varun
Hi
Error analysis I have seen
"Could not find Attribute LOW"
The exception 'CX_WD_CONTEXT' was raised, but it was not caught anywhere along
the call hierarchy.
Since exceptions represent error situations and this error was not
adequately responded to, the running ABAP program
'CL_WDR_CONTEXT_NODE_INFO======CP' has to be
terminated.
The exception, which is assigned to class 'CX_WD_CONTEXT', was not caught and
therefore caused a runtime error.
The reason for the exception is:
Could not find attribute LOW
Help.
Regards
varun
Hello Varun,
Check for the below points.
1. I think you have an attribute 'LOW' in your WDC, which has been deleted in Component but still you have it in View level. If yes, go for Update Mapping in your view context.
2. If you are sure that you have deleted this attribute in both component and view level, then check in your coding. You should be have surely used the attribute 'LOW' in some part of coding.
Let me know further.
BR,
RAM.
Hi
I am getting now selection screen . But now when i try to display data according to date.
Its throwing dump as-
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
Help
Regards
varun
Hello Varun,
This is your standard F4 configuration. If you need a F4 where you should directly see the PO list from the table, then you can go for cutom F4 like OVS. Please follow the below link.
BR,
RAM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I have created the design as -
output is
and my code on SUBMIT is as-
method ONACTIONSUBMIT .
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_select_options( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_WDR_SELECT_OPTIONS .
lo_INTERFACECONTROLLER = wd_this->wd_cpifc_select_options( ).
DATA lv_r_helper_class TYPE ref to if_wd_select_options.
lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
).
DATA RT_RANGE_TABLE TYPE REF TO DATA.
data : rt_ebeln TYPE REF TO data.
CALL METHOD LV_R_HELPER_CLASS->GET_RANGE_TABLE_OF_SEL_FIELD
EXPORTING
I_ID = 'EBELN'
* I_CHECK_OBLIGATORY = ABAP_TRUE
RECEIVING
RT_RANGE_TABLE = RT_EBELN.
.
* Create a field symbol to store the value entered in select options.
FIELD-SYMBOLS : <fs_ebeln> TYPE table.
ASSIGN rt_ebeln->* to <fs_ebeln>.
DATA lo_nd_ekpo TYPE REF TO if_wd_context_node.
DATA lt_ekpo TYPE wd_this->Elements_ekpo.
* navigate from <CONTEXT> to <EKPO> via lead selection
lo_nd_ekpo = wd_context->get_child_node( name = wd_this->wdctx_ekpo ).
SELECT * from ekpo into CORRESPONDING FIELDS OF TABLE lt_ekpo
WHERE ebeln in <fs_ebeln>.
* @TODO handle non existant child
* IF lo_nd_ekpo IS INITIAL.
* ENDIF.
* * @TODO compute values
* * e.g. call a model function
*
lo_nd_ekpo->bind_table( new_items = lt_ekpo set_initial_elements = abap_true ).
endmethod.
so why selection option is not coming.
I wanted my select options to be like f4 help.
Regards
varun
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.