‎2010 Sep 10 1:04 AM
Hi,
While i create a report with grid display with oops ALV using custom container, its giving short dump..
DUMP: CNTL ERROR ouccured..
‎2010 Sep 10 1:15 AM
Howdy,
Perhaps you could give a sample of your code so we can see what's going wrong - perhaps you haven't created the custom container object properly or assigned the grid to the correct parent.
OO is now endorsed by SAP as the programming methodology to use going forward. There are lots of advantages including easier to read and better flowing code, as well as better exception handling.
Cheers
Alex
‎2010 Sep 10 2:24 AM
Hi Phani,
Make sure you have done below things correctly.
While creating a container control in SE51, make sure you have given a name to it in the attributes & use the same name in the ABAP code with data declaration as below:
Suppose you have named the container control in SE51 as CC_CONTAINER
DATA :
g_Container TYPE scrfname VALUE 'CC_CONTAINER',
g_Custom_Container TYPE REF TO CL_GUI_CUSTOM_CONTAINER
g_Grid TYPE REF TO CL_GUI_ALV_GRID.
Also first create a CONTAINER object with reference to container name in the screen & then Create GRID object with reference to parent name
IF g_Custom_Container IS INITIAL.
CREATE OBJECT g_Custom_Container EXPORTING CONTAINER_NAME = g_Container.
CREATE OBJECT g_Grid EXPORTING I_PARENT = g_Custom_Container.
& Finally called method Set table for display for Grid as below :
" SET_TABLE_FOR_FIRST_DISPLAY
CALL METHOD g_Grid->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
Also make sure that you have activated the code in PBO & PAI in SE51.
With these it shouldnt give the above error.
Hope this helps.
Regards
Abhii
‎2010 Sep 10 2:27 AM
Hello Abhii,
You can still get errors if you try to execute your OO ALV in BG mode w/o proper handling
@OP: Provide further details for better answers.
BR,
Suhas
‎2010 Sep 10 2:34 AM
‎2010 Sep 13 12:23 PM
Sorry i forgot to pass the SY-REPID .....Prob has been resolved
And i have on more doubt.....can create a selection screen for that.....
Becz, when ceate a sel-screen before calling of screen the select query(written in PBO) is not picking the sel-options variables
Thanks
‎2010 Sep 10 6:57 AM
Can you please check if the container name you specified in the screen and the one you use in program are the same
‎2010 Dec 22 10:58 AM