I had created a BSP application using MVC.
in do_init method
DATA: DATAMODEL TYPE REF TO ZCL_M_MODELDATA.
DATAMODEL ?= CREATE_MODEL( CLASS_NAME = 'ZCL_M_MODELDATA'
MODEL_ID = 'DATAMODEL' ).
in do_handle_data
DATA:IT_FORMFIELDS TYPE IHTTPNVP.
READ TABLE FORM_FIELDS INTO IT_FORMFIELDS WITH KEY NAME = 'mat' .
IF SY-SUBRC = 0.
DATAMODEL->V_MATNR = IT_FORMFIELDS-VALUE.
CLEAR IT_FORMFIELDS.
SELECT * FROM MARA INTO TABLE DATAMODEL->IT_MARA WHERE MATNR = DATAMODEL->V_MATNR.
ENDIF.
ENDMETHOD.
while executing the first veiw is displayed in which i enter a material number.and when i press display
the second view is not displayed and it is showing the following error.
Error when processing your request
What has happened?
zbsp_mvc_demo/controller.do was not called due to an error.
Note
The following error text was processed in the system ECP : Access not possible using 'NULL' object reference.
The error occurred on the application server IGINSAPECC_ECP_00 and in the work process 1 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Form: DO_HANDLE_DATA of program ZCL_C_CONTROLLER==============CP
Form: DISPATCH_INPUT of program CL_BSP_CONTROLLER2============CP
Form: DO_REQUEST of program ZCL_C_CONTROLLER==============CP
Form: DO_REQUEST of program CL_BSP_CTRL_ADAPTER===========CP
Form: ON_REQUEST of program CL_BSP_RUNTIME================CP
Form: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_HTTP_EXT_BSP===============CP
Form: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP
Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
Module: %_HTTP_START of program SAPMHTTP