on 12-12-2008 6:53 PM
Hey Folks,
I am enhancing a standard Webdynpro ALV table to remove some standard buttons from the ALV toolbar.
I have included the following piece of code in the post-exit method of wddoinit of the view controller
DATA:
lo_controller TYPE REF TO iwci_salv_wd_table,
lo_model TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
lo_controller = wd_this->wd_cpifc_usage_alv( ).
lo_model = lo_controller->get_model( ).
lo_model->if_salv_wd_std_functions~SET_EXPORT_ALLOWED( abap_false ).
However , at line lo_model = lo_controller->get_model( )., I am getting an error stating 'Data no longer available when SALV_WD_TABLE GET_MODEL called '
The error occurred on the application server <<>> and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: IF_SALV_WD_COMP_TABLE_IF~GET_MODEL of program CL_SALV_WD_C_TABLE============CP
Method: GET_MODEL of program /1BCWDY/BDC31YN620G3NH3QXFAG==CP
Method: IWCI_SALV_WD_TABLE~GET_MODEL of program /1BCWDY/BDC31YN620G3NH3QXFAG==CP
Method: _PST_4C3THUISYCQPYPORP8SL6VSFG of program /1BCWDY/BHBW0342WCZVRFN76NO3==CP
Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/BHBW0342WCZVRFN76NO3==CP
Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
Method: INIT of program CL_WDR_CONTROLLER=============CP
Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
What am I missing here? In the wddoinit of the method the ALV usage is being created . What data is it expecting from the model class?
Any pointers would be really helpful.
Thanks and Best Regards,
Puja
make sure your component usage has active comopnent
DATA: LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
DATA: LR_INTF_CTRL TYPE REF TO IWCI_SALV_WD_TABLE.
DATA: LR_MODEL TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).
IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
LR_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
LR_INTF_CTRL = WD_THIS->WD_CPIFC_ALV( ).
LR_MODEL = LR_INTF_CTRL->GET_MODEL( ).
WD_THIS->M_MODEL = LR_MODEL.
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Puja,
check this thread for the code snippet
https://forums.sdn.sap.com/click.jspa?searchID=19892986&messageID=6567613
Thanks
Bala Duvvuri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.