Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

s my code is rite

Former Member
0 Kudos

am getting dump error for the following code, can anyone tell me if my code is correct

error is telling like alv_grid s empty

this is my first pgm in oops concepts so i dont know how to correct this

tables: mara.

data: itab like table of mara with header line,

w_itab like line of itab.

data:c_container type scrfname value 'test',

alv_grid type ref to cl_gui_alv_grid,

c_custom_container type ref to cl_gui_custom_container.

data:i_fcat type lvc_t_fcat,

w_fcat like line of i_fcat.

select matnr from mara into corresponding fields of table itab.

CREATE OBJECT C_CUSTOM_CONTAINER

EXPORTING

PARENT = c_custom_container

CONTAINER_NAME = c_container

.

w_fcat-fieldname = 'MATNR'.

w_fcat-ref_table = 'MARA'.

w_fcat-ref_field = 'MATNR'.

w_fcat-coltext = text-002.

w_fcat-seltext = 'Material Number'.

w_fcat-col_pos = 1.

append w_fcat to i_fcat.

clear w_fcat.

CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY

CHANGING

IT_OUTTAB = itab[]

IT_FIELDCATALOG = i_fcat

.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
2 REPLIES 2

Former Member
0 Kudos

Former Member
0 Kudos

first error

give test in upper case

data:c_container type scrfname value 'TEST',   "<-------------

U have to create one screen , say 100

call screen 100.

then create one custom container and give the names as TEST

Message was edited by:

Chandrasekhar Jagarlamudi