Skip to Content
0
Former Member
May 01, 2012 at 03:31 PM

ALV FM REUSE_ALV_GRID_DISPLAY

27 Views

I am trying to display an ALV report, getting an short dump 'GETWA_NOT_ASSIGNED'. Here is my code for the field catalog and table

internal table structure...

types: begin of t_empstatus,
v_date(8) type n,
v_emp_status(4) type c,
v_eng_road(4) type n,
v_eng_yard(4) type n,
v_eng_locl(4) type n,
v_cond_road(4) type n,
v_cond_yard(4) type n,
v_cond_locl(4) type n,
v_asst_cond_road(4) type n,
v_asst_cond_yard(4) type n,
v_asst_cond_locl(4) type n,
v_ese_qual_road(4) type n,
v_ese_qual_yard(4) type n,
v_ese_qual_locl(4) type n,
* v_ydm_qual_road(4) type n,
* v_ydm_qual_yard(4) type n,
* v_ydm_qual_locl(4) type n,
end of t_empstatus.

data: it_empstatus TYPE STANDARD TABLE OF t_empstatus INITIAL SIZE 0,

the fieldcatalog structure is...

fieldcatalog-fieldname = 'v_date'.
fieldcatalog-seltext_m = 'End Date'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-datatype = 'NUMC'.
fieldcatalog-emphasize = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_emp_status'.
fieldcatalog-seltext_m = 'Employee Status'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_eng_road'.
fieldcatalog-seltext_m = 'Eng Road'.
fieldcatalog-col_pos = 2.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_eng_yard'.
fieldcatalog-seltext_m = 'Eng Yard'.
fieldcatalog-col_pos = 4.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_eng_locl'.
fieldcatalog-seltext_m = 'Eng Local'.
fieldcatalog-col_pos = 5.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_cond_road'.
fieldcatalog-seltext_m = 'Cond Road'.
fieldcatalog-col_pos = 6.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_cond_yard'.
fieldcatalog-seltext_m = 'Cond Yard'.
fieldcatalog-col_pos = 7.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_cond_locl'.
fieldcatalog-seltext_m = 'Cond Locl'.
fieldcatalog-col_pos = 8.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_asst_cond_road'.
fieldcatalog-seltext_m = 'Asst Cond Road'.
fieldcatalog-col_pos = 9.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_asst_cond_yard'.
fieldcatalog-seltext_m = 'Asst Cond Yard'.
fieldcatalog-col_pos = 10.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_asst_cond_locl'.
fieldcatalog-seltext_m = 'Asst Cond Local'.
fieldcatalog-col_pos = 11.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_ese_qual_road'.
fieldcatalog-seltext_m = 'ESE Qual Road'.
fieldcatalog-col_pos = 12.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_ese_qual_yard'.
fieldcatalog-seltext_m = 'ESE Qual Yard'.
fieldcatalog-col_pos = 13.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

fieldcatalog-fieldname = 'v_ese_qual_locl'.
fieldcatalog-seltext_m = 'ESE Qual Local'.
fieldcatalog-col_pos = 14.
fieldcatalog-datatype = 'NUMC'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.

and the FM used is...

V_REPID = SY-REPID.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = v_repid
* I_BYPASSING_BUFFER = 'X'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_GRID_TITLE = i_title_empstatus
IT_FIELDCAT = fieldcatalog[]
* I_DEFAULT = 'X'
I_SAVE = 'X'
IT_EVENTS = gt_events
T_OUTTAB = it_empstatus.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Let me know am I missing something here....

Thanks,

VG