on 01-17-2014 3:49 PM
Good experts days scn, I'm programming the example below to WebDynpro (Save Select Options and ALV Selection records in ABAP Web Dynpro Application - Web Dynpro ABAP - SCN...), but I appear some errors anywhere in this example explain how to create the layout of the screen that is what I have created in the layout tab and also in the tab context, I am new to WebDynpro programming and would like to help me, I create objects in the layout tab as well as the nodes to be created in the context tab.
METHOD onactionget_details .
* Field Symbol Declarations
DATA: BEGIN OF wa_mard,
matnr TYPE mard-matnr,
werks TYPE mard-werks,
lgort TYPE mard-lgort,
END OF wa_mard.
DATA: s_werks TYPE REF TO data,
s_aufnr TYPE REF TO data.
* Field Symbols declarations
FIELD-SYMBOLS: <s_werks> TYPE table.
* Local Data Declarations
DATA lo_nd_header TYPE REF TO if_wd_context_node.
DATA ls_header TYPE wd_this->element_header.
" El nodo creado en context HEADER es igual ha este valor element_header
DATA wa_mara TYPE mara.
DATA li_mard LIKE TABLE OF wa_mard.
DATA wa_marc TYPE marc.
DATA wa_makt TYPE makt.
DATA lo_api_controller TYPE REF TO if_wd_view_controller.
lo_api_controller ?= wd_this->wd_get_api( ).
s_aufnr = wd_this->m_handler->get_range_table_of_sel_field( i_id = 'WERKS_D').
1 READ TABLE <s_werks> INTO ls_werks INDEX 1.
2 CHECK ls_werks-low IS NOT INITIAL.
* Constants Declarations
CONSTANTS: c_x TYPE c VALUE 'X'.
CONSTANTS: c_text TYPE string VALUE 'Select'.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA li_marc TYPE TABLE OF marc.
DATA li_mara TYPE TABLE OF mara.
DATA li_makt TYPE TABLE OF makt.
3 DATA ls_context TYPE wd_this->element_context.
DATA lv_visible LIKE ls_context-visible.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* get single attribute
lo_el_context->set_attribute(
EXPORTING
value = c_x
name = 'VISIBLE' ).
1.- The field "LS_WERKS" is unknown.
2.- The data object "S_WERKS" has no structure and therefore no component called "LOW".
3.- Type "ELEMENT_CONTEXT" is unknown.
Since I have not tried to advance, please any of you has developed this example, hopefully they can guide me.
Best Regards.
Hi Brujo,
The code is having many syntax errors. I think the document which you are referring is not suitable for you as its having lot of syntactical mistakes in it.
If you are practicing for VARIANTS in web dynpro, please go through the below link
Variant Maintenance for selection screen in WDA
Hope this helps you in understanding the concept of variants and also guides you to achieve your requirement.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Brujo,
Have you tried step-1 in the link which you have provided?. In the WIKI link, the sceen is designed with selection parameter namely PLANT and in the wddoinit( ) method of view, they implemented coding for select-options.
So cross check your webdynrpo component with the link you provided. If still the error exists, Pls revert.
Thanks
Katrice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brujo,
At initial level of learining try to do simple applications to understand the design and concept of binding. Once you are clear and confident with the application you might be in the situation to understand the issue.
With Regards,
Giriesh M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
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.