Skip to Content
0
Former Member
May 14, 2015 at 09:44 AM

Not able to display the result,getting short dump error "GETWA_NOT_ASSIGNED".

13 Views

TYPE-POOLs : slis.


data : BEGIN OF itab OCCURS 0,
connid TYPE sflight-connid,
carrid type sflight-carrid,
fldate TYPE sflight-fldate,
price TYPE sflight-price,
currency TYPE sflight-currency,
planetype TYPE sflight-planetype,
END OF itab.




DATA : i_fcat TYPE slis_t_fieldcat_alv,
wa_fcat type slis_fieldcat_alv,
prg TYPE sy-repid VALUE sy-repid.

SELECT connid carrid fldate price currency planetype
from sflight INTO TABLE itab.

wa_fcat-tabname = 'ITAB'.
wa_fcat-col_pos = '1'.
wa_fcat-fieldname = 'CONNID'.

APPEND wa_fcat to i_fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'ITAB'.
wa_fcat-col_pos = '2'.
wa_fcat-fieldname = 'CARRID'.

APPEND wa_fcat to i_fcat.
CLEAR wa_fcat.

wa_fcat-tabname = 'ITAB'.
wa_fcat-col_pos = '3'.
wa_fcat-fieldname = 'FLDATE'.

APPEND wa_fcat to i_fcat.
CLEAR wa_fcat.

wa_fcat-tabname = 'ITAB'.
wa_fcat-col_pos = '4'.
wa_fcat-fieldname = 'PRICE'.

APPEND wa_fcat to i_fcat.
CLEAR wa_fcat.

wa_fcat-tabname = 'ITAB'.
wa_fcat-fieldname = 'CURRENCY'.

wa_fcat-no_out = 'x'.
APPEND wa_fcat to i_fcat.
CLEAR wa_fcat.

wa_fcat-tabname = 'ITAB'.
wa_fcat-fieldname = 'PLANETYPE'.

wa_fcat-no_out = 'x'.
APPEND wa_fcat to i_fcat.
CLEAR wa_fcat.



CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-cprog

I_STRUCTURE_NAME = 'SFLIGHT'

IT_FIELDCAT = i_fcat

TABLES
T_OUTTAB = itab

EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE id sy-msgid TYPE sy-msgty NUMBER sy-msgno with sy-msgv1 sy-msgv2 sy-msgv3.
ENDIF.