Skip to Content
author's profile photo Former Member
Former Member

ALV FM REUSE_ALV_GRID_DISPLAY

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on May 01, 2012 at 03:40 PM

    fieldcatalog-fieldname = 'v_eng_yard'. Make them Capital.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 01, 2012 at 03:46 PM

    Hi Vinu,

    Make every field in fieldcatalog-fieldname capital.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 01, 2012 at 03:48 PM

    Moderator message - FAQ

    Locked.

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.