2009 Jul 30 7:55 AM
This is giving some kind of dump, i think it is relating to fieldcatalog. So could you please solve this.
REPORT ZALV_FIELDCATALOG_BASIC_LIST no standard page heading
line-size 650
line-count 100.
data : v_repid type sy-repid.
type-pools : slis.
types : begin of ty_ekko,
ebeln type ebeln,
bukrs type bukrs,
bstyp type bstyp, " purchasing doc category
end of ty_ekko.
data : wa_ekko type ty_ekko,
it_ekko like table of wa_ekko.
data : wa_listheader type slis_listheader,
it_listheader type slis_t_listheader.
data : wa_events type slis_alv_event,
it_Events type slis_t_event.
data: wa_fcat type slis_fieldcat_alv,
it_fcat type slis_t_fieldcat_alv.
start-of-selection.
select ebeln bukrs bstyp into corresponding fields of table it_ekko from
ekko up to 10 rows.
***** events
clear wa_events.
clear it_events.
wa_events-name = 'TOP_OF_PAGE'.
wa_events-form = 'TOP_OF_PAGE'.
append wa_events to it_events.
clear wa_events.
Field catalog
wa_fcat-tabname = 'it_ekko'.
wa_fcat-fieldname = 'EBELN'.
wa_fcat-seltext_m = 'PO NO'.
append wa_fcat to it_fcat.
clear wa_fcat.
wa_fcat-tabname = 'it_ekko'.
wa_fcat-fieldname = 'BUKRS'.
wa_fcat-seltext_m = 'Comp.Code'.
append wa_fcat to it_fcat.
clear wa_fcat.
wa_fcat-tabname = 'it_ekko'.
wa_fcat-fieldname = 'BSTYP'.
wa_fcat-seltext_m = 'Purc. doc.Typ'.
append wa_fcat to it_fcat.
clear wa_fcat.
end of selection
end-of-selection.
perform display.
&----
*& Form TOP_OF_PAGE
&----
text
----
--> p1 text
<-- p2 text
----
FORM TOP_OF_PAGE .
clear wa_listheader.
clear it_listheader.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Royal Softee Tech'.
append wa_listheader to it_listheader.
clear wa_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = it_listheader
I_LOGO = 'ENJOYSAP_LOGO'
I_END_OF_LIST_GRID =
.
ENDFORM. " TOP_OF_PAGE
&----
*& Form display
&----
text
----
--> p1 text
<-- p2 text
----
FORM display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = 'ekko'
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = it_fcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = 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
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = it_ekko
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.
ENDFORM.
2009 Jul 30 7:58 AM
Hi,
Please let me know Dump message.
2009 Jul 30 7:58 AM
2009 Jul 30 8:04 AM
Dump Message : you attempted to access an un assigned field symbol.
2009 Jul 30 8:11 AM
hi,
Add the below in ur code.
INITIALIZATION.
v_repid = sy-repid.
FORM display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
* i_structure_name = 'EKKO' "---> comment
it_fieldcat = it_fcat[]
it_events = it_events
TABLES
t_outtab = it_ekko.
ENDFORM. "display
Hope it helps you.
Thanks
2009 Jul 30 8:23 AM
Hi,
Check this code.
REPORT zalv_fieldcatalog_basic_list NO STANDARD PAGE HEADING LINE-SIZE 650 LINE-COUNT 100.
DATA : v_repid TYPE sy-repid.
TYPE-POOLS : slis.
TYPES : BEGIN OF ty_ekko,
ebeln TYPE ebeln,
bukrs TYPE bukrs,
bstyp TYPE bstyp, " purchasing doc category
END OF ty_ekko.
DATA : wa_ekko TYPE ty_ekko, it_ekko LIKE TABLE OF wa_ekko.
DATA : wa_listheader TYPE slis_listheader,
it_listheader TYPE slis_t_listheader.
DATA : wa_events TYPE slis_alv_event,
it_events TYPE slis_t_event.
DATA: wa_fcat TYPE slis_fieldcat_alv,
it_fcat TYPE slis_t_fieldcat_alv.
START-OF-SELECTION.
SELECT ebeln bukrs bstyp INTO CORRESPONDING FIELDS OF TABLE it_ekko FROM ekko UP TO 10 ROWS.
* ***** events clear wa_events.
CLEAR it_events.
wa_events-name = 'TOP_OF_PAGE'.
wa_events-form = 'TOP_OF_PAGE'.
APPEND wa_events TO it_events.
CLEAR wa_events.
*** field catalog
wa_fcat-tabname = 'it_ekko'.
wa_fcat-fieldname = 'EBELN'.
wa_fcat-seltext_m = 'PO NO'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'it_ekko'.
wa_fcat-fieldname = 'BUKRS'.
wa_fcat-seltext_m = 'Comp.Code'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'it_ekko'.
wa_fcat-fieldname = 'BSTYP'.
wa_fcat-seltext_m = 'Purc. doc.Typ'.
APPEND wa_fcat TO it_fcat. CLEAR wa_fcat.
perform display.
**** end of selection end-of-selection. PERFORM display.
*&---------------------------------------------------------------------*
*& Form TOP_OF_PAGE
*&---------------------------------------------------------------------*
* text *----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM top_of_page .
CLEAR wa_listheader.
CLEAR it_listheader.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Royal Softee Tech'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. " TOP_OF_PAGE
*&---------------------------------------------------------------------*
*&FORM display
*&---------------------------------------------------------------------*
* text *----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
* i_structure_name = 'ekko'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IT_FIELDCAT = it_fcat
TABLES
t_outtab = it_ekko.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. "display
2009 Jul 30 8:25 AM
REPORT zalv_fieldcatalog_basic_list NO STANDARD PAGE HEADING LINE-SIZE 650 LINE-COUNT 100.
DATA : v_repid TYPE sy-repid.
TYPE-POOLS : slis.
TYPES : BEGIN OF ty_ekko,
ebeln TYPE ebeln,
bukrs TYPE bukrs,
bstyp TYPE bstyp, " purchasing doc category
END OF ty_ekko.
DATA : wa_ekko TYPE ty_ekko, it_ekko LIKE TABLE OF wa_ekko.
DATA : wa_listheader TYPE slis_listheader,
it_listheader TYPE slis_t_listheader.
DATA : wa_events TYPE slis_alv_event,
it_events TYPE slis_t_event.
DATA: wa_fcat TYPE slis_fieldcat_alv,
it_fcat TYPE slis_t_fieldcat_alv.
START-OF-SELECTION.
SELECT ebeln bukrs bstyp INTO CORRESPONDING FIELDS OF TABLE it_ekko FROM ekko UP TO 10 ROWS.
CLEAR it_events.
wa_events-name = 'TOP_OF_PAGE'.
wa_events-form = 'TOP_OF_PAGE'.
APPEND wa_events TO it_events.
CLEAR wa_events.
wa_fcat-tabname = 'it_ekko'.
wa_fcat-fieldname = 'EBELN'.
wa_fcat-seltext_m = 'PO NO'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'it_ekko'.
wa_fcat-fieldname = 'BUKRS'.
wa_fcat-seltext_m = 'Comp.Code'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'it_ekko'.
wa_fcat-fieldname = 'BSTYP'.
wa_fcat-seltext_m = 'Purc. doc.Typ'.
APPEND wa_fcat TO it_fcat. CLEAR wa_fcat.
perform display.
FORM top_of_page .
CLEAR wa_listheader.
CLEAR it_listheader.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Royal Softee Tech'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. " TOP_OF_PAGE
FORM display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IT_FIELDCAT = it_fcat
TABLES
t_outtab = it_ekko.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
2009 Jul 30 8:04 AM
2009 Jul 30 8:05 AM
Hi,
you are passing v_repid to I_CALLBACK_PROGRAM. But there is no value in that field...move sy-repid to v_repid.
regards,
Bhavana.
2009 Jul 30 8:08 AM
2009 Jul 30 8:09 AM
do these things and test.
in quotes put things in CAPITAL letters as 'IT_EKKO' in place of 'it_ekko'. where ever you have used.
and pass sy-repid to the call back program.
2009 Jul 30 8:10 AM
Hii Jyotsna,
Provide Table name and field Name in CAPITALS under FIELDCATALOG
place a debugger on FM and check whether the variables, you are passing to FM hv appropriate values or not.
Regards,
Apoorv
2009 Jul 30 8:14 AM
Hi,
Please comment or remove stmt wa_fcat-tabname = 'it_ekko'. in fieldcatlog
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |