‎2007 Sep 13 7:55 AM
hi experts..
i m getting sm problem in my report..... i m new to it!!!!!
i m sending u the code, plz help me out........
short dump is poped up' the ABAP source code lines are longer than the width of internal'.
TABLES: VBAK, VBAP.
TYPE-POOLS: SLIS.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
ERDAT LIKE VBAK-ERDAT,
ERZET LIKE VBAK-ERZET,
MATNR LIKE VBAP-MATNR,
ZMENG LIKE VBAP-ZMENG,
END OF ITAB.
DATA: REPID LIKE SY-REPID.
DATA: IT_FCAT TYPE SLIS_T_FIELDCAT_ALV.
SELECT-OPTIONS: VBELN FOR VBAK-VBELN.
START-OF-SELECTION.
SELECT VBELN ERDAT ERZET FROM VBAK INTO CORRESPONDING FIELDS OF ITAB WHERE VBELN IN VBELN.
SELECT MATNR ZMENG FROM VBAP INTO CORRESPONDING FIELDS OF ITAB WHERE VBELN = ITAB-VBELN.
APPEND ITAB.
ENDSELECT.
ENDSELECT.
END-OF-SELECTION.
REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = REPID
I_INTERNAL_TABNAME = 'ITAB'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = REPID
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = IT_FCAT
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_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = 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_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_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 = 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 SY-MSGV4.
ENDIF.
‎2007 Sep 13 8:01 AM
HI Please pass the values in REUSE ALV GRID DISPLAY and uncomment the exceptions
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPId
I_STRUCTURE_NAME = YOUR ITAB NAME
I_GRID_TITLE = YOUR GRID TITLE
IS_LAYOUT = YOUR LAYOUT NAME
IT_FIELDCAT = IT_FCAT
IT_SORT = YOUR SORT ITAB NAME
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = EVENTS
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 = 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 SY-MSGV4.
ENDIF.
THANKS
REWARD IF HELPFUL
VIEKANAND
‎2007 Sep 13 8:01 AM
HI Please pass the values in REUSE ALV GRID DISPLAY and uncomment the exceptions
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPId
I_STRUCTURE_NAME = YOUR ITAB NAME
I_GRID_TITLE = YOUR GRID TITLE
IS_LAYOUT = YOUR LAYOUT NAME
IT_FIELDCAT = IT_FCAT
IT_SORT = YOUR SORT ITAB NAME
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = EVENTS
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 = 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 SY-MSGV4.
ENDIF.
THANKS
REWARD IF HELPFUL
VIEKANAND
‎2007 Sep 13 8:03 AM
thnks vivekanand for ur concern......
bt i already did that what u said.......
by uncommenting the exceptions i m getting the same problem
‎2007 Sep 13 8:12 AM
Hello Pradeep,
Your code is working perfectly in my system
Arjun
‎2007 Sep 13 8:17 AM
thnks boss..........
u took away my tension......
as i was trying it from last 2 weeks.......
i will try this code in another server....
thanks again for ur concern.......
‎2007 Sep 13 8:01 AM
i think this is becuse of fm 'REUSE_ALV_FIELDCATALOG_MERGE' because it is reading your report and then generate the fieldcatlog for that. Here when it is reading report any line of your coding shoud not exceed 72 char length. Just check in your coding any line is greater than the 72 length or not just split that line and adjust.
regards
shiba dutta
‎2007 Sep 13 8:03 AM
Hi,
Everything declaration is correct but selecting the data use the following select statement..instead of SELECT-ENDSELECT....
SELECT VBELN ERDAT ERZET FROM VBAK INTO TABLE ITAB,
For filling fields no need to pass that 'REUSE_ALV_FIELDCATALOG_MERGE' this function module u need to fill manually, as following way.
fieldcat-col_pos = 1.
fieldcat-fieldname = 'EBELN'.
fieldcat-TABNAME = 'ITAB1'.
fieldcat-seltext_l = 'SALES DOCUMENT NO' .
fieldcat-seltext_s = 'SALES DOCU'.
APPEND FIELDCAT TO FIELDCAT1.
fieldcat-col_pos = 2.
fieldcat-fieldname = 'EBELP'.
fieldcat-TABNAME = 'ITAB1'.
fieldcat-seltext_l = 'LINE ITEM NO' .
fieldcat-seltext_s = 'LINE ITEM'.
APPEND FIELDCAT TO FIELDCAT1.
fieldcat-col_pos = 3.
fieldcat-fieldname = 'WERKS'.
fieldcat-TABNAME = 'ITAB1'.
fieldcat-seltext_l = 'PLANT OF THE DOCU' .
fieldcat-seltext_s = 'PLANT OF THE'.
APPEND FIELDCAT TO FIELDCAT1.
fieldcat-col_pos = 4.
fieldcat-fieldname = 'MATKL'.
fieldcat-TABNAME = 'ITAB1'.
fieldcat-seltext_l = 'MATERIAL DESCRIPTION ' .
fieldcat-seltext_s = 'MAT DESC'.
APPEND FIELDCAT TO FIELDCAT1.
then u call display function module 'REUSE_ALV_GRID_DISPLAY'
in this function module u have to pass field cata log.
try this code then test it i think u won't get that problem...
<b>reward me a points if it use full answer...</b>
praveen