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: 

problem with REUSE_ALV_LIST_DISPLAY

Former Member
0 Kudos

I'm trying to do simple example. From

http://www.howforge.com/abap-4-example-code-alv-list-by-fm-reuse-alv-list-display

I copied code into my program but when I check errors (ctrl+F2) I receive

Field "’REUSE_ALV_LIST_DISPLAY’" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. Cpuld You help me with that problem? Greetings. P.

1 ACCEPTED SOLUTION

amit_khare
Active Contributor
0 Kudos

Can you paste your version of code here.

It seems you forget to put stop (.) after the statement before doing CALL FUNCTION.

Regards,

Amit

3 REPLIES 3

amit_khare
Active Contributor
0 Kudos

Can you paste your version of code here.

It seems you forget to put stop (.) after the statement before doing CALL FUNCTION.

Regards,

Amit

0 Kudos
REPORT ZWOP_TEST1 .

TYPE-POOLS: SLIS.
 
DATA: it_spfli TYPE TABLE OF spfli WITH HEADER LINE,
      it_cat TYPE SLIS_T_FIELDCAT_ALV,
      wa_cat TYPE slis_fieldcat_alv.
 
START-OF-SELECTION.
  SELECT * FROM spfli
           INTO TABLE it_spfli.
 
  PERFORM create_field_catalog.
 
  CALL FUNCTION ’REUSE_ALV_LIST_DISPLAY’
    EXPORTING
*     I_INTERFACE_CHECK              = ’ ’
*     I_BYPASSING_BUFFER             =
*     I_BUFFER_ACTIVE                = ’ ’
*     I_CALLBACK_PROGRAM             = ’ ’
*     I_CALLBACK_PF_STATUS_SET       = ’ ’
*     I_CALLBACK_USER_COMMAND        = ’ ’
*     I_STRUCTURE_NAME               =
*     IS_LAYOUT                      =
      IT_FIELDCAT                    = it_cat[]
*     IT_EXCLUDING                   =
*     IT_SPECIAL_GROUPS              =
*     IT_SORT                        =
*     IT_FILTER                      =
*     IS_SEL_HIDE                    =
*     I_DEFAULT                      = ’X’
*     I_SAVE                         = ’ ’
*     IS_VARIANT                     =
*     IT_EVENTS                      =
*     IT_EVENT_EXIT                  =
*     IS_PRINT                       =
*     IS_REPREP_ID                   =
*     I_SCREEN_START_COLUMN          = 0
*     I_SCREEN_START_LINE            = 0
*     I_SCREEN_END_COLUMN            = 0
*     I_SCREEN_END_LINE              = 0
*     IR_SALV_LIST_ADAPTER           =
*     IT_EXCEPT_QINFO                =
*     I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
*   IMPORTING
*     E_EXIT_CAUSED_BY_CALLER        =
*     ES_EXIT_CAUSED_BY_USER         =
    TABLES
      T_OUTTAB                       = it_spfli
*   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 SY-MSGV4.
  ENDIF.
*&---------------------------------------------------------------------*
*&      Form  create_field_catalog
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM create_field_catalog .
  IF it_cat[] is initial.
    clear wa_cat.
    wa_cat-col_pos   = 1.
    wa_cat-fieldname = ’CARRID’.
    wa_cat-datatype  = ’CHAR’.
    wa_cat-inttype   = ’C’.
    wa_cat-intlen    = 3.
    wa_cat-seltext_l   = ’Airline Code’.
    wa_cat-seltext_m   = ’Airline Code’.
    wa_cat-seltext_s   = ’Airline Code’.
    append wa_cat to it_cat.
 
    clear wa_cat.
    wa_cat-col_pos   = 2.
    wa_cat-fieldname = ’CONNID’.
    wa_cat-datatype  = ’NUMC’.
    wa_cat-inttype   = ’N’.
    wa_cat-intlen    = 4.
    wa_cat-seltext_l   = ’Flight Conn. No’.
    wa_cat-seltext_m   = ’Flight Conn. No’.
    wa_cat-seltext_s   = ’Flight Conn. No’.
    append wa_cat to it_cat.
 
    clear wa_cat.
    wa_cat-col_pos   = 3.
    wa_cat-fieldname = ’CITYFROM’.
    wa_cat-datatype  = ’CHAR’.
    wa_cat-inttype   = ’C’.
    wa_cat-intlen    = 20.
    wa_cat-seltext_l   = ’Dep. city’.
    wa_cat-seltext_m   = ’Dep. city’.
    wa_cat-seltext_s   = ’Dep. city’.
    append wa_cat to it_cat.
 
    clear wa_cat.
    wa_cat-col_pos   = 4.
    wa_cat-fieldname = ’AIRPFROM’.
    wa_cat-datatype  = ’CHAR’.
    wa_cat-inttype   = ’C’.
    wa_cat-intlen    = 3.
    wa_cat-seltext_l   = ’Dep. airport’.
    wa_cat-seltext_m   = ’Dep. airport’.
    wa_cat-seltext_s   = ’Dep. airport’.
    append wa_cat to it_cat.
 
    clear wa_cat.
    wa_cat-col_pos   = 5.
    wa_cat-fieldname = ’CITYTO’.
    wa_cat-datatype  = ’CHAR’.
    wa_cat-inttype   = ’C’.
    wa_cat-intlen    = 20.
    wa_cat-seltext_l   = ’Arrival city’.
    wa_cat-seltext_m   = ’Arrival city’.
    wa_cat-seltext_s   = ’Arrival city’.
    append wa_cat to it_cat.
 
    clear wa_cat.
    wa_cat-col_pos   = 6.
    wa_cat-fieldname = ’AIRPTO’.
    wa_cat-datatype  = ’CHAR’.
    wa_cat-inttype   = ’C’.
    wa_cat-intlen    = 3.
    wa_cat-seltext_l   = ’Dest. airport’.
    wa_cat-seltext_m   = ’Dest. airport’.
    wa_cat-seltext_s   = ’Dest. airport’.
    append wa_cat to it_cat.
 
  ENDIF.
ENDFORM.                    " create_field_catalog 

0 Kudos

I think you directly paste the code from the link, do one thing, just paste the code to a notepad and from there copy and paste it to your ABAP editor. It will work.

Actually, code from web page/ word documents dont recognize constants or values in Quotes. Or write all quoted values manully.

Regards,

Amit