cancel
Showing results for 
Search instead for 
Did you mean: 

select-options CODE DOUBT

Former Member
0 Kudos

Hi.....

plxxx Explain why we using this ref ? IG_COMPONENTCONTROLLER, IF_WD_COMPONENT_USAGE ,

WD_THIS->WD_CPUSE_SELECT_OPTIONS( ). WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).

why we using all these?

once explain .........

DATA: LT_RANGE_TABLE TYPE REF TO DATA,

RT_RANGE_TABLE TYPE REF TO DATA,

READ_ONLY TYPE ABAP_BOOL,

TYPENAME TYPE STRING.

DATA: LR_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,

L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.

  • create the used component

L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).

IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.

L_REF_CMP_USAGE->CREATE_COMPONENT( ).

ENDIF.

WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).

  • init the select screen

WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).

  • create a range table that consists of this new data element

LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).

  • add a new field to the selection

WD_THIS->M_HANDLER->ADD_SELECTION_FIELD( I_ID = 'S_CARR_ID'

IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).

bye.......

Edited by: prajnith on May 14, 2009 9:12 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hey buddy!!!!

there are 2 type of controller which act as data source for transferring data to ur views as well as to other application : 1. component controller 2. cutom controller

now when we create the webdynpro application automatically the component controller for each application gets created . now the custom controller are those that we add depending on our req

now to access the component contr the sap has provided the wd_comp_controller . but for the custom cntl nothing is provide so to access the components of the custom ctrl we use the ig_contrl

that is nothing but an interface

so do that if_wd_comp_usage

now we use the wd_this to refer to our main interface which gets created when we create our application

n the rest of the code is self explanatory as it is used to access the elements !!!

Hope this will help you !!!

Thanks & Regards,

Punit Raval.

Former Member
0 Kudos

thq very much......