i am trying a simple concept of two custom container with alv on 1 screen.
see declarations:
field-symbols :<fs_o> type any, "two field symbols.
<fs_g> type any.
I have written the code of creating object of class custom container and calling method of class
cl_gui_alv_grid in 1 subroutine.
i have 2 custom container on 1 screen
CUST1
CUST2
***** After calling screen 9002 ---------------------------
MODULE STATUS_9002 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'ZDD'.
assign 'CUST1' to <FS_o>.
assign 'grid1' to <FS_g>.
perform grid1 changing <fs_o> <fs_g>.
perform display_grid1.
assign 'CUST2' to <FS_o>.
assign 'grid2' to <FS_g>.
perform grid1 changing <fs_o> changing <fs_g>.
perform display_grid1.
ENDMODULE. " STATUS_9002 OUTPUT
FORM GRID1 changing o1 type ref to cl_gui_custom_container
g1 type ref to cl_gui_alv_grid.
CREATE OBJECT O1
EXPORTING
CONTAINER_NAME = 'CUST'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT GRID1
EXPORTING
I_PARENT = obj1
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
others = 5
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
In short i dont want to write code to create object and methods for every instance of the class cl_gui_alv_grid,
just 1 subroutine and passing values for diff containers CUST1 & CUST2.
With this code the report is getting Dump.
Runtime Errors PERFORM_CONFLICT_TYPE.
Please help me with the code having correct formal and actual parameters.