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: 

alv gives dump on f3

Former Member
0 Kudos

please help , i have an alv which is giving dump when user press back button or f3 key can anybody tell me why please.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I think that is because of

p_layout-box_fieldname = 'BOX'.

here you have declare box_fieldname and probably you did not define it in your final_int itab.

just declare like this..

data : begin of final_int occurs 0,

box,

<rest of the field>

end of final_int.

and one more thing p_layout-box_tabname = 'final_int'.

here use caps within quotes i.e. p_layout-box_tabname = 'FINAL_INT'.

regards

shiba dutta

5 REPLIES 5

Former Member
0 Kudos

hi,

give ur code.

0 Kudos

hi ,

i m providing you the code i have written for alv

Type-pools : slis.

data : fieldcat type slis_t_fieldcat_alv with header line,

layout type slis_layout_alv,

IT_PRINT type slis_print_alv.

data : v_repid like sy-repid.

start-of-selection.

v_repid = sy-repid.

      • FOR LAYOUT ***

perform fill_layout using layout.

      • For Fieldcatalog Preparation

perform fill_fieldcatalog tables fieldcat.

perform display.

*&----


*& Form fill_layout

*&----


  • text

*----


  • -->P_LAYOUT text

*----


FORM fill_layout USING P_LAYOUT structure layout.

p_layout-zebra = 'X'.

  • p_layout-f2code = '&IC1'.

p_layout-detail_titlebar = 'Detail of Titlebar'.

p_layout-box_fieldname = 'BOX'.

p_layout-box_tabname = 'final_int'.

ENDFORM. " fill_layout

*&----


*& Form fill_fieldcatalog

*&----


  • text

*----


  • -->P_FIELDCAT text

*----


FORM fill_fieldcatalog TABLES P_FIELDCAT STRUCTURE fieldcat .

refresh p_fieldcat.

p_fieldcat-fieldname = 'MATNR'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'material'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'PLNMG'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'plannedquant.'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'FKIMG'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'totdis.'.

  • p_fieldcat-key = 'X'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'FKIMG1'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'predis.'.

  • p_fieldcat-key = 'X'.

  • p_fieldcat-key_sel = 'X'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'BAL'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'bal.'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'PLAN'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'plan'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'PDC'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'pdc'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'MC'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'mc'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'PAINT'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'paint'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'FGQUANT'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'fgquant'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'PDCPORD'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'pdcpord'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'MCPORD'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'mcpord'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'PAINTPORD'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'paintpord'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

p_fieldcat-fieldname = 'FGPORD'.

p_fieldcat-tabname = 'final_int'.

p_fieldcat-seltext_m = 'fgpord'.

append p_fieldcat to fieldcat.

clear p_fieldcat.

ENDFORM. " BUILD_FCAT_ITEM

*&----


*& 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 = 'USER_COMMAND'

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

IS_LAYOUT = layout

IT_FIELDCAT = fieldcat[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS = it_group[]

  • IT_SORT = it_sort[]

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

I_SAVE = 'A'

  • IS_VARIANT =

  • IT_EVENTS =

  • IT_EVENT_EXIT =

IS_PRINT = it_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 = final_int[]

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

this is the code for alv only my output tab is final_int .can you plz helpme in this regards.

0 Kudos

Hi,

thanks but havent u declare table <b>final_int</b> ?

and it should b in capital between quotes in <b>fill_fieldcatalog</b>

and r u making interactive report?

y u have write this?

<b>I_CALLBACK_USER_COMMAND = 'USER_COMMAND'</b>

Former Member
0 Kudos

I think that is because of

p_layout-box_fieldname = 'BOX'.

here you have declare box_fieldname and probably you did not define it in your final_int itab.

just declare like this..

data : begin of final_int occurs 0,

box,

<rest of the field>

end of final_int.

and one more thing p_layout-box_tabname = 'final_int'.

here use caps within quotes i.e. p_layout-box_tabname = 'FINAL_INT'.

regards

shiba dutta

0 Kudos

thanx a lot shiba and dhawni i worked on your suggesstions and now it is fine

,points have been rewarded

thank you a lot to both of you