Even though the use of select-options is not as straight-forward in ABAP Webdynpro as it is in standard ABAP programming you will find bellow that it is easy nonetheless.
The first thing you should do is to create your own Webdynpro Component like the one below, and activate it.
|
Create your Webdynpro Component |
Then go to the Compoment properties and add the WDR_SELECT_OPTIONS reusable component to the used webdynpro components.
|
add the standard WDR_SELECT_OPTIONS component to our component |
Now we add a new ViewContainer to the MAIN_V view so that we can embed the selection-options component.
Add the select_options component and controller to the View Used Controllers/Components list.
|
Add the SELECT_OPTIONS component and controller to the view's used controllers/component list |
It is time to start coding. Go to the main view MAIN_V and then enter the WDDOINIT method which is called once to inicialize the view controller.
method WDDOINIT .
DATA: lr_range_table TYPE REF TO DATA.
" Get a pointer to the interface of select options in order to
" add a new selection field
IF abap_false EQ wd_this->wd_cpuse_select_options( )->has_active_component( ).
wd_this->wd_cpuse_select_options( )->create_component( ).
ENDIF.
" Initialize the selection Screen
wd_this->m_select_options = wd_this->wd_cpifc_select_options( )->init_selection_screen( ).
" ADD a field of type MATNR to ( Material )
" - Create a Range table of type MATNR
lr_range_table = wd_this->m_select_options->create_range_table( 'MATNR' ).
" -- Add the selection field
wd_this->m_select_options->add_selection_field( i_id = 'ID_MATNR' " ID of Selection Field
it_result = lr_range_table ).
endmethod.
Now you only have to create the webdynpro application and test.
Is it possible to create that code using Code wizard?
ReplyDeleteHow we are getting search help in our screen. I mean which method or what code we need for that
ReplyDeleteCool Post on SAP Webdynpro
ReplyDeleteSAP Training
SAP Training in Chennai
SAP Training in Bangalore
SAP Training in Hyderabad
SAP Training in Coimbatore
SAP Training in Ameerpet
SAP Training in India
SAP Web Dynpro Course in Noida
ReplyDeletehttps://erptraininginnoida.wordpress.com/2022/01/18/sap-web-dynpro-training-institute-in-noida/