on 03-05-2013 8:21 AM
Hi,
I have been debugging the code pasted here, but it keeps returning "Field symbol <FS_PSPNR> is not yet assigned".
If I run my app, I get an Error 500 RABAX_STATE.
Perhaps someone here can see what is wrong here.
METHOD onactiongetdata .
TYPES:
lty_r_pspnr TYPE RANGE OF ps_posnr,
tty_empwbs type STANDARD TABLE OF zhr_empwbs.
DATA
lr_empwbs TYPE REF TO if_wd_context_node.
* Variables used to retrieve the values of select-options fields
DATA
lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
FIELD-SYMBOLS:
<fs_sel_item> LIKE LINE OF lt_sel_item,
<fs_pspnr> TYPE ps_posnr.
* Get the selection-screen items
wd_this->m_helper->get_selection_screen_items(
IMPORTING et_selection_screen_items = lt_sel_item ).
* Retrieve the values from the select-options items
LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
CASE <fs_sel_item>-m_id.
WHEN `PSPNR`. "WBS Number
ASSIGN <fs_sel_item>-m_value->* TO <fs_pspnr>.
ENDCASE.
ENDLOOP.
* Retrieve the data from the database table
SELECT pernr pspnr sdatum edatum
FROM zhr_empwbs
INTO CORRESPONDING FIELDS OF TABLE wd_this->empwbs
WHERE pspnr = <fs_pspnr>.
* Filter the data for responsible
* Check that project is active
*
* Bind the data to the context
lr_empwbs = wd_context->get_child_node( name = `EMPWBS` ).
lr_empwbs->bind_table( wd_this->empwbs ).
ENDMETHOD.
Hi,
You need to see, whether lt_sel_item contains PSPNR without initial values.
Also it is advisable to write,
if <fs_pspnr> is bound.
SELECT pernr pspnr sdatum edatum
FROM zhr_empwbs
INTO CORRESPONDING FIELDS OF TABLE wd_this->empwbs
WHERE pspnr = <fs_pspnr>.
endif.
Hope this helps u.,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your reply. I went debugging Again and found out that if I hit Enter after parameter
search field was filled. Then it worked.and lt_sel_item contained the value from the parameter field.
Is there any way to avoid pressing Enter after entering a value in the parameter field ?
BR
Peter
Hi,
I guess you are using select options! . If so refer this document : http://scn.sap.com/community/web-dynpro-abap/blog/2005/12/20/using-select-options-in-a-web-dynproaba...
This will help u.
Regards,
Kiran
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.