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

error in ALV

Hi all,

i am below giving my code i am getting dump , can anyone tell me whats the error in this.

<code>

*&----


&&----


*

REPORT ZALV LINE-SIZE 110

NO STANDARD PAGE HEADING.

TYPE-POOLS: slis.

*************Data Declaration.

TYPES:BEGIN OF st_vbak,

vbeln TYPE vbak-vbeln,

kunnr TYPE vbak-kunnr,

ernam TYPE vbak-ernam,

erdat TYPE vbak-erdat,

auart TYPE vbak-auart,

vgbel TYPE vbak-vgbel,

END OF st_vbak.

TYPES:BEGIN OF st_vbap,

vbeln TYPE vbap-vbeln,

posnr TYPE vbap-posnr,

matnr TYPE vbap-matnr,

waerk TYPE vbap-waerk,

END OF st_vbap.

TYPES:BEGIN OF st_kna1,

kunnr TYPE kna1-kunnr,

name1 TYPE kna1-name1,

END OF st_kna1.

DATA:it_vbak TYPE STANDARD TABLE OF st_vbak,

it_vbap TYPE STANDARD TABLE OF st_vbap,

it_kna1 TYPE STANDARD TABLE OF st_kna1,

wa_vbak TYPE st_vbak,

wa_vbap TYPE st_vbap,

wa_kna1 TYPE st_kna1.

DATA:v_kunnr TYPE kna1-kunnr,

v_field(30) TYPE c.

DATA :

*it_kna1 TYPE STANDARD TABLE OF st_kna1 ,

  • IT_VBAK TYPE ST_VBAK,

  • IT_VBAP TYPE ST_VBAP ,

it_fcat TYPE slis_t_fieldcat_alv,

it_fcat1 TYPE slis_t_fieldcat_alv ,

it_fcat2 TYPE slis_t_fieldcat_alv,

l_s_keyinfo TYPE slis_keyinfo_alv.

*******************End of declarations.

**************Selection screen Declaration.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: rb1 RADIOBUTTON GROUP g1 DEFAULT 'X'.

SELECTION-SCREEN COMMENT 4(20) text-002 FOR FIELD rb1.

SELECTION-SCREEN END OF LINE.

SELECT-OPTIONS: so_cust FOR v_kunnr.

PARAMETERS: p_hits TYPE i.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: rb2 RADIOBUTTON GROUP g1.

SELECTION-SCREEN COMMENT 4(20) text-004 FOR FIELD rb2.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b1.

***************End of Selection Screen Declaration.

AT SELECTION-SCREEN.

PERFORM validation .

*************Displaying Basic list.

START-OF-SELECTION.

PERFORM displaycust.

PERFORM alv.

***************Validation.

&----


*& Form check

&----


FORM validation .

SELECT kunnr

FROM kna1

INTO TABLE it_kna1

WHERE kunnr IN so_cust.

IF it_kna1[] IS INITIAL.

MESSAGE e000(ybhv).

ENDIF.

ENDFORM. " check

&----


*& Form DISPLAYCUST

&----


FORM displaycust .

SELECT kunnr name1

FROM kna1

UP TO p_hits ROWS

INTO TABLE it_kna1

WHERE kunnr IN so_cust.

IF NOT it_kna1[] IS INITIAL.

SELECT vbeln kunnr ernam erdat auart vgbel

FROM vbak

INTO CORRESPONDING FIELDS OF TABLE it_vbak

FOR ALL ENTRIES IN it_kna1

WHERE kunnr = it_kna1-kunnr.

ENDIF.

IF NOT it_vbak[] IS INITIAL.

SELECT vbeln posnr matnr waerk

FROM vbap

INTO CORRESPONDING FIELDS OF TABLE it_vbap

FOR ALL ENTRIES IN it_vbak

WHERE vbeln = it_vbak-vbeln.

ENDIF.

ENDFORM. " DISPLAYCUST

&----


*& Form ALV

&----


FORM alv .

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = sy-repid

i_internal_tabname = 'IT_VBAK'

i_inclname = sy-repid

CHANGING

ct_fieldcat = it_fcat1

EXCEPTIONS

inconsistent_interface = 1

program_error = 2

OTHERS = 3.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = sy-repid

i_internal_tabname = 'IT_VBAP'

i_inclname = sy-repid

CHANGING

ct_fieldcat = it_fcat2

  • EXCEPTIONS

  • INCONSISTENT_INTERFACE = 1

  • PROGRAM_ERROR = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

APPEND LINES OF it_fcat1 TO it_fcat.

APPEND LINES OF it_fcat2 TO it_fcat.

l_s_keyinfo-header01 = 'VBELN'.

l_s_keyinfo-item01 = 'VBELN'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = sy-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 = I_STRUCTURE_NAME

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE = I_GRID_TITLE

  • I_GRID_SETTINGS = I_GRID_SETTINGS

  • IS_LAYOUT = IS_LAYOUT

IT_FIELDCAT = it_fcat2

  • IT_EXCLUDING = IT_EXCLUDING

  • IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS

  • IT_SORT = IT_SORT

  • IT_FILTER = IT_FILTER

  • IS_SEL_HIDE = IS_SEL_HIDE

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT = IS_VARIANT

  • IT_EVENTS = IT_EVENTS

  • IT_EVENT_EXIT = IT_EVENT_EXIT

  • IS_PRINT = IS_PRINT

  • IS_REPREP_ID = IS_REPREP_ID

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_HTML_HEIGHT_TOP = 0

  • I_HTML_HEIGHT_END = 0

  • IT_ALV_GRAPHICS = IT_ALV_GRAPHICS

  • IT_HYPERLINK = IT_HYPERLINK

  • IT_ADD_FIELDCAT = IT_ADD_FIELDCAT

  • IT_EXCEPT_QINFO = IT_EXCEPT_QINFO

  • IR_SALV_FULLSCREEN_ADAPTER = IR_SALV_FULLSCREEN_ADAPTER

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER

  • ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER

TABLES

t_outtab = IT_VBAP

  • 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. " ALV

<code>

teh dump is : Exception condition "NO_FIELDCATALOG_AVAILABLE" raised.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 04:01 PM

    Is that cant we use types in ALV reports i.e we have to use only ITAB with header line.

    plz clarify.

    Thanks,

    satish

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Make sure the fieldcat does not have any extra fields apart from the ones in table IT_VBAP.

      Also ensure the fieldcat table is not initial.

      For providing structure name you need to have a DDIC structure, but if you are using types, you just need to pass the fieldcat table.

      Hope it helps.

      Lokesh

      Message was edited by:

      Lokesh Aggarwal

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.