Error in ALV
Hi all, pls help me its urgent,
i'm displaying one internal table in alv gri .
i used 'REUSE_ALV_GRID_DISPALY' .
it gives me alv output . but when i'm clicking on 'LOCAL_FILE' button on application tool bar then it gives dump error .
the dump error is as follows ,
' Field symbol has not yet been assigned'.
ASSIGNED
Date and Time 21.05.2008 15:26:41
ShrtText
Field symbol has not yet been assigned.
What happened?
Error in ABAP application program.
The current ABAP program "SAPLKKBL" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
is especially useful if you want to keep a particular message.
Error analysis
You attempted to access an unassigned field symbol
(data segment 107).
This error may occur for any of the following reasons:
- You address a typed field symbol before it is set using ASSIGN
- You address a field symbol that points to a line in an internal table
that has been deleted
- You address a field symbol that had previously been reset using
UNASSIGN, or that pointed to a local field that no longer exists
- You address a global function interface parameter, even
though the relevant function module is not active,
that is it is not in the list of active calls. You can get the list
of active calls from the this short dump.
How to correct the error
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"GETWA_NOT_ASSIGNED" C
"SAPLKKBL" or "LKKBLF99"
"GEN_FIELD_OUT2"
If you cannot solve the problem yourself and you wish to send
an error message to SAP, include the following documents:
1. A printout of the problem description (short dump)
To obtain this, select in the current display "System->List->
Save->Local File (unconverted)".
2. A suitable printout of the system log
To obtain this, call the system log through transaction SM21.
Limit the time interval to 10 minutes before and 5 minutes
after the short dump. In the display, then select the function
"System->List->Save->Local File (unconverted)".
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, select the Editor function "Further Utilities->
Upload/Download->Download".
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
System environment
SAP Release.............. "640"
Application server....... "production"
Network address.......... "192.168.0.27"
Operating system......... "Windows NT"
Release.................. "5.2"
Hardware type............ "2x Intel 80686"
Character length......... 16 Bits
Pointer length........... 32 Bits
Work process number...... 1
Short dump setting....... "full"
Database server.......... "PRODUCTION"
Database type............ "ORACLE"
Database name............ "P50"
Database owner........... "SAPP50"
Character set............ "C"
SAP kernel............... "640"
Created on............... "Nov 26 2007 00:46:41"
Created in............... "NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10"
Database version......... "OCI_920_SHARE "
Patch level.............. "210"
Patch text............... " "
Supported environment....
Database................. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE
10.2.0.."
SAP database version..... "640"
Operating system......... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2,
Windows NT 6.0"
Memory usage.............
Roll..................... 8176
EM....................... 27176032
Heap..................... 0
Page..................... 163840
MM Used.................. 15995976
MM Free.................. 724656
SAP Release.............. "640"
User and Transaction
Client.............. 610
User................ "DEVUSER"
Language key........ "E"
Transaction......... "ZSB "
Program............. "SAPLKKBL"
Screen.............. "SAPLKKBL 0500"
Screen line......... 3
Information on where terminated
The termination occurred in the ABAP program "SAPLKKBL" in "GEN_FIELD_OUT2".
The main program was "ZSCOREBOARD_MANUAL ".
The termination occurred in line 2916 of the source code of the (Include)
program "LKKBLF99"
of the source code of program "LKKBLF99" (when calling the editor 29160).
Source Code Extract
Line SourceCde
2886 else.
2887 assign <fs12> to <field>.
2888 gs_fc = gs_sfc12.
2889 endif.
2890 when 013.
2891 if gs_out_flags-slave ne 'X'.
2892 assign <fm13> to <field>.
2893 gs_fc = gs_mfc13.
2894 else.
2895 assign <fs13> to <field>.
2896 gs_fc = gs_sfc13.
2897 endif.
2898 when 014.
2899 if gs_out_flags-slave ne 'X'.
2900 assign <fm14> to <field>.
2901 gs_fc = gs_mfc14.
2902 else.
2903 assign <fs14> to <field>.
2904 gs_fc = gs_sfc14.
2905 endif.
2906 when 015.
2907 if gs_out_flags-slave ne 'X'.
2908 assign <fm15> to <field>.
2909 gs_fc = gs_mfc15.
2910 else.
2911 assign <fs15> to <field>.
2912 gs_fc = gs_sfc15.
2913 endif.
2914 when 016.
2915 if gs_out_flags-slave ne 'X'.
>>>>> assign <fm16> to <field>.
2917 gs_fc = gs_mfc16.
2918 else.
2919 assign <fs16> to <field>.
2920 gs_fc = gs_sfc16.
2921 endif.
2922 when 017.
2923 if gs_out_flags-slave ne 'X'.
2924 assign <fm17> to <field>.
Hi,
check this program as reference..
TABLES: ekko.
type-pools slis.
data my type SLIS_T_FIELDCAT_ALV with header line.
selection-screen begin of block b1 with frame title text-001.
select-options: pur for ekko-ekorg obligatory,
ord1 for ekko-ebeln,
date1 for ekko-aedat obligatory.
selection-screen end of block b1.
DATA: begin of details occurs 10,
ord like EKKO-EBELN,
org like EKKO-EKORG,
date like EKKO-AEDAT,
ven like EKKO-LLIEF,
nam like LFA1-NAME1,
item like EKPO-EBELP,
mat like EKPO-MATNR,
plant like EKPO-WERKS,
text like EKPO-TXZ01,
qty like EKPO-MENGE,
end of details.
SELECT EKKOEBELN EKKOEKORG EKKOAEDAT EKKOLLIEF LFA1NAME1 EKPOEBELP
EKPOMATNR EKPOWERKS EKPOTXZ01 EKPOMENGE into table details FROM
EKKO INNER JOIN EKPO ON EKPOebeln = EKKOEBELN INNER JOIN LFA1 ON
EKKOLIFRE = LFA1NAME1.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'DETAILS'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = sy-repid
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = my[].
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 = 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_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = my[]
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 = details[]
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.
hope this will help..
reward if useful.
with regards,
Syed
Similar Messages
-
Runtime Error in ALV Totaling.
Dear Friends
i am getting run time error in ALV while pressing sum button.
my alv code as follows
FIELDCATALOG-FIELDNAME = 'DMBTR'.
FIELDCATALOG-SELTEXT_M = 'Amount'.
FIELDCATALOG-COL_POS = 1.
FIELDCATALOG-ref_fieldname = 'WAERS'.
FIELDCATALOG-DO_SUM = 'X'. "Display column total
FIELDCATALOG-ref_tabname = 'BKPF'.
FIELDCATALOG-DATATYPE = 'CURR'.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
I have tried all possibilities but did not get the solution...
if anything left let me know
thank you
Avirat PatelDear Ravi
Thank you .. i am able to trace out my problem
the problem with this code
FIELDCATALOG-FIELDNAME = 'AUGBL'.
FIELDCATALOG-SELTEXT_M = 'Clearing Doc.No'.
FIELDCATALOG-COL_POS = 1.
FIELDCATALOG-DO_SUM = 'X'. "Display column total
FIELDCATALOG-DATATYPE = 'CURR'.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
i am getting an error with this code
how can i able to display this field in alv column.?
- Avirat Patel
*SORRY FRIENDS I HAVE NOT DECLARED MENTIONED VARIABLE IN INTERNAL TABLE ITSELF SO THAT
I AM GETTING ERROR.*
problem has been resolved..
thank you.
Edited by: Corrtech on Dec 19, 2011 1:05 PM -
Error in ALV : Field Does not exists in Output table .
Hi All,
In my ALV report, program get dumped and showing error when i tried to put a col named Distribution channel ion the alv.
I have put the Distribution cannel field in the IT_FInal table , but still getting folwong errors :
Error : Field Symbol is not been assigned.
As Instructed i have passed I_INTERFACE_CHECK = 'X'.
By this i am getting detail error that :
Field Distribution channel does not exists in Output table & Heading for List is missing .
But i have maintained the distribition channel in IT_Final table
Please suggest wheather we have to define dis channel in any other place.
Thanks in advance.
Can any one help me regrarding this.
Thanks in advance.Hello,
You have to populate the same in the fieldcatalog as well, i think you have not maintained this field there.
BR,
Suhas
PS: Also make it a point to follow-up on your previous post: [Error in ALV : Field Symbol not been assigned.|Error in ALV : Field Symbol not been assigned.] -
Hi Experts,
can anyone suggest me that Hw can i display the errors in alv?
proper answer will be rewarded.
with regards.
sunil.Hello Sunil
You may have a look at my Wiki posting:
[ Message Handling - Finding the Needle in the Haystack|https://wiki.sdn.sap.com/wiki/display/profile/2007/07/09/MessageHandling-FindingtheNeedleintheHaystack]
There I describe how to use the interface IF_RECA_MESSAGE_LIST in order to present application messages in a very user-friendly way (tree & ALV list).
Regards,
Uwe -
Hello,
I am tring to run my first ALV report and I am getting a dump when I run it. it is dumping at
<b> Program SAPLSLVC
Include LSLVCF36
Row 3,221
Module type (FORM)
Module Name FILL_DATA_TABLE
macro_cell_data_get
<ls_fcat>
<ls_data>
<l_field_value>
ls_lvc_data-value. </b>
I searched the forum for the "macro_cell_data_get" and I found 1 response that gave a response of
<i>field symbol errors in ALV are usually down to fieldcat columns incorrectly defined. Check your internal table fields of the table you pass to the alv FM against the columns defined in the fieldcat</i>
I am not sure what I should be checking. I am looked at the structure that I have created for the ALV and the internal tables and I am not sure what to look for.
any help would be greatly appreciated.I hope this is what you are looking for.
FORM create_fieldcatalog USING value(p1_repid) TYPE sy-repid
CHANGING p_it_fieldcat TYPE slis_t_fieldcat_alv.
Local data declarations
DATA: wa_fieldcat TYPE slis_fieldcat_alv.
CONSTANTS: c_l TYPE c VALUE 'L'.
Call the FM to build the required field catalog.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = p1_repid
i_internal_tabname = 'IT_OUTDATA'
i_structure_name = 'zfi_ap_unpln_dlvry_csts_STRUCT'
CHANGING
ct_fieldcat = p_it_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 0.
LOOP AT p_it_fieldcat INTO wa_fieldcat.
wa_fieldcat-ddictxt = c_l.
Update the fieldcatalog parameters
CASE wa_fieldcat-fieldname.
WHEN 'BUKRS'.
wa_fieldcat-key = c_check.
WHEN OTHERS.
ENDCASE.
MODIFY p_it_fieldcat FROM wa_fieldcat INDEX sy-tabix.
ENDLOOP.
ENDIF.
ENDFORM. " FORM CREATE_FIELDCATALOG
$$----
$$ Form display_report
$$----
FORM display_alv CHANGING p_it_outdata TYPE ty_t_outdata
p_it_fieldcat TYPE slis_t_fieldcat_alv
p_it_alv_sort TYPE ty_t_sort_alv
p1_layout TYPE slis_layout_alv
value(p1_repid) TYPE sy-repid
value(p1_var) TYPE disvariant.
Call the FM to generate the ALV in grid format.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = p1_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = p1_layout
i_structure_name = 'ZFI_AP_UNPLN_DLVRY_CSTS_STRUCT'
it_fieldcat = p_it_fieldcat
it_sort = p_it_alv_sort
i_save = 'A'
is_variant = p1_var
TABLES
t_outtab = p_it_outdata
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
FREE: p_it_outdata.
ENDIF.
ENDFORM. "display_alv
also I checked all of the entries and they seemed to match. I am using the field BELNR which looks like it is a combination of two fields. I am not sure if this is causing my problem or not -
Runtime Error in ALV Tree Output
Dear All, I am trying to create a ALV Tree using Class cl_gui_alv_tree. The Report Shows the Output with the first Node but when i try to expand it is dumping with a runtime error GETWA_NOT_ASSIGNED in class CL_ALV_TREE_BASE and method SET_ITEMS_FOR_COLUMN. The Reason being the data which was copied in the initial node display to mt_outtab is getting refreshed.
Can any one of you help me the reason for the table getting refreshed. Do i need to pass any data.
I am doing the following steps.
1. Create Container,
2. Create Tree Class object
3. Generate the Field Catalog.
4. Set table for first display " With empty internal table
5. Generate the Hierarchy
6. Call the Method Frontend Update.
Let me know if i had missed any steps in the process.
Thank you,
Regards,
Swaroop PatriOne reason for getting this error is using local defined tables for it_outtab parameter in the below code:
To get rid of the dump, define two distinct output tables globally: one is an empty table which you will pass to the below method, other one is your real output table whose size increases dependently.
CALL METHOD go_tree->set_table_for_first_display
EXPORTING
is_hierarchy_header = ls_hier_header
CHANGING
it_outtab = gt_data_e "Empty table
it_fieldcatalog = gt_fcat_tree. -
hi expert i have created alv report ... it is giving runtime error .. in CALL FUNCTION 'REUSE_ALV_EVENTS_GET' how to solve this plz help ....
*& Report ZALVTRIAL *
REPORT ZALVTRIAL .
tables : vbak,vbap.
type-pools: slis.
types : begin of scr1,
vbeln type VBELN_VA,
erdat type erdat,
ernam type ernam,
end of scr1.
data : i_vbak type standard table of scr1,
wa_vbak type scr1.
types : begin of scr2,
vbeln type VBELN_VA,
matnr type matnr,
posnr type posnr_va,
end of scr2.
data : i_vbap type standard table of scr2,
wa_vbap type scr2.
types : begin of scr_final,
vbeln type VBELN_VA,
erdat type erdat,
ernam type ernam,
matnr type matnr,
posnr type posnr_va,
end of scr_final.
data : i_final type standard table of scr_final,
wa_final type scr_final.
**START OF DATA DECLERATION FOR ALV
*DATA FOR CATLOG
DATA: wa_fldcat TYPE slis_fieldcat_alv,
i_fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE .
*DATA FOR EVENT
DATA : wa_event TYPE slis_alv_event,
i_event TYPE slis_t_event WITH HEADER LINE.
*DATA FOR HEADER
DATA: wa_head TYPE slis_listheader,
i_head TYPE slis_t_listheader WITH HEADER LINE.
*data for layout
DATA: wa_layout TYPE slis_layout_alv.
selection-screen: begin of block b1 with frame title text-001.
select-options: s_vbeln for vbak-vbeln .
SELECTION-SCREEN: END OF BLOCK B1.
start-of-selection.
select vbeln erdat ernam
from vbak
into table i_vbak where vbeln in s_vbeln.
if sy-subrc <> 0.
leave list-processing.
else.
sort i_vbak by vbeln.
endif.
if i_vbak[] is not initial.
select vbeln matnr posnr
from vbap
into table i_vbap
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
loop at i_vbak into wa_vbak.
wa_final-vbeln = wa_vbak-vbeln.
wa_final-erdat = wa_vbak-erdat .
wa_final-ernam = wa_vbak-ernam .
append wa_final to i_final.
endloop.
if sy-subrc = 0.
loop at i_final into wa_final.
read table i_vbap into wa_vbap
with key vbeln = wa_vbak-vbeln binary search.
if sy-subrc = 0.
wa_final-matnr = wa_vbap-matnr.
wa_final-posnr = wa_vbap-posnr.
modify i_final from wa_final transporting matnr posnr.
endif.
clear : wa_vbap , wa_final.
endloop.
endif.
**WRITE:/1 sy-uline(63).
**WRITE:/1'|', 2 'Sales Document' COLOR 4 ON ,11'|',12 'Date' COLOR 5
**ON
**,21'|',22 'Name' COLOR 4 ON,35'|',
36 'Material Number' COLOR 5 ON, 55'|',56 'line no' COLOR 4 ON
**63'|'.
**WRITE:/1 sy-uline(63).
**LOOP AT i_final INTO wa_final.
WRITE:/1'|', 2 wa_final-vbeln,11'|',12 wa_final-erdat,21'|',22
wa_final-ernam,35'|',
36 wa_final-matnr, 55'|',56 wa_final-posnr,63'|'.
**endloop.
perform builtcatalog.
perform event.
perform listheader.
perform layout.
perform display.
*& Form builtcatalog
text
form builtcatalog.
wa_fldcat-col_pos = '1'.
wa_fldcat-fieldname = 'vbeln'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Sales Document'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '2'.
wa_fldcat-fieldname = 'erdat'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Date'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '3'.
wa_fldcat-fieldname = 'ernam'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Name'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '4'.
wa_fldcat-fieldname = 'matnr'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Material Number'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '5'.
wa_fldcat-fieldname = 'posnr'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Sales Document Item'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
endform. "builtcatalog
*& Form event
text
form event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = i_final[].
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF sy-subrc = 0.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_top_of_page.
IF sy-subrc = 0.
wa_event-form = slis_ev_top_of_page.
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_pf_status_set .
IF sy-subrc = 0.
wa_event-form = slis_ev_pf_status_set .
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_user_command.
IF sy-subrc = 0.
wa_event-form = slis_ev_user_command .
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. "event
*& Form
text
form listheader.
wa_head-typ = 'H'.
wa_head-info = 'ALV PROGRAM AUTHOR jessy'
APPEND wa_head TO i_head.
endform. "listheader
*& Form layout
text
form layout.
wa_layout-zebra = 'X'.
wa_layout-f2code = 'DUB'.
endform. "layout
*& Form display
text
form display.
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_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = wa_layout
IT_FIELDCAT = i_fldcat[]
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 = i_event[]
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. "displayHi,
The error has been corrected.
Copy the following code and execute. You won't get any runtime errors.
*& Report ZALVTRIAL *
REPORT ZALVTRIAL .
tables : vbak,vbap.
type-pools: slis.
types : begin of scr1,
vbeln type VBELN_VA,
erdat type erdat,
ernam type ernam,
end of scr1.
data : i_vbak type standard table of scr1,
wa_vbak type scr1.
types : begin of scr2,
vbeln type VBELN_VA,
matnr type matnr,
posnr type posnr_va,
end of scr2.
data : i_vbap type standard table of scr2,
wa_vbap type scr2.
types : begin of scr_final,
vbeln type VBELN_VA,
erdat type erdat,
ernam type ernam,
matnr type matnr,
posnr type posnr_va,
end of scr_final.
data : i_final type standard table of scr_final,
wa_final type scr_final.
**START OF DATA DECLERATION FOR ALV
*DATA FOR CATLOG
DATA: wa_fldcat TYPE slis_fieldcat_alv,
i_fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE .
*DATA FOR EVENT
DATA : wa_event TYPE slis_alv_event,
i_event TYPE SLIS_T_EVENT." WITH HEADER LINE. "-----> correction done here
*DATA FOR HEADER
DATA: wa_head TYPE slis_listheader,
i_head TYPE slis_t_listheader WITH HEADER LINE.
*data for layout
DATA: wa_layout TYPE slis_layout_alv.
selection-screen: begin of block b1 with frame title text-001.
select-options: s_vbeln for vbak-vbeln .
SELECTION-SCREEN: END OF BLOCK B1.
start-of-selection.
select vbeln erdat ernam
from vbak
into table i_vbak where vbeln in s_vbeln.
if sy-subrc = 0.
leave list-processing.
else.
sort i_vbak by vbeln.
endif.
if i_vbak[] is not initial.
select vbeln matnr posnr
from vbap
into table i_vbap
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
loop at i_vbak into wa_vbak.
wa_final-vbeln = wa_vbak-vbeln.
wa_final-erdat = wa_vbak-erdat .
wa_final-ernam = wa_vbak-ernam .
append wa_final to i_final.
endloop.
if sy-subrc = 0.
loop at i_final into wa_final.
read table i_vbap into wa_vbap
with key vbeln = wa_vbak-vbeln binary search.
if sy-subrc = 0.
wa_final-matnr = wa_vbap-matnr.
wa_final-posnr = wa_vbap-posnr.
modify i_final from wa_final transporting matnr posnr.
endif.
clear : wa_vbap , wa_final.
endloop.
endif.
**WRITE:/1 sy-uline(63).
**WRITE:/1'|', 2 'Sales Document' COLOR 4 ON ,11'|',12 'Date' COLOR 5
**ON
**,21'|',22 'Name' COLOR 4 ON,35'|',
*36 'Material Number' COLOR 5 ON, 55'|',56 'line no' COLOR 4 ON
**63'|'.
**WRITE:/1 sy-uline(63).
**LOOP AT i_final INTO wa_final.
WRITE:/1'|', 2 wa_final-vbeln,11'|',12 wa_final-erdat,21'|',22
wa_final-ernam,35'|',
36 wa_final-matnr, 55'|',56 wa_final-posnr,63'|'.
**endloop.
perform builtcatalog.
perform event.
perform listheader.
perform layout.
perform display.
**& Form builtcatalog
*text
form builtcatalog.
wa_fldcat-col_pos = '1'.
wa_fldcat-fieldname = 'vbeln'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Sales Document'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '2'.
wa_fldcat-fieldname = 'erdat'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Date'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '3'.
wa_fldcat-fieldname = 'ernam'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Name'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '4'.
wa_fldcat-fieldname = 'matnr'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Material Number'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '5'.
wa_fldcat-fieldname = 'posnr'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Sales Document Item'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
endform. "builtcatalog
**& Form event
*text
form event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = i_event "-----> correction done here
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF sy-subrc = 0.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_top_of_page.
IF sy-subrc = 0.
wa_event-form = slis_ev_top_of_page.
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_pf_status_set .
IF sy-subrc = 0.
wa_event-form = slis_ev_pf_status_set .
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_user_command.
IF sy-subrc = 0.
wa_event-form = slis_ev_user_command .
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. "event
**& Form
*text
form listheader.
wa_head-typ = 'H'.
wa_head-info = 'ALV PROGRAM AUTHOR jessy'
APPEND wa_head TO i_head.
endform. "listheader
**& Form layout
*text
form layout.
wa_layout-zebra = 'X'.
wa_layout-f2code = 'DUB'.
endform. "layout
**& Form display
*text
form display.
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_BACKGROUND_ID = ' '
*I_GRID_TITLE =
*I_GRID_SETTINGS =
IS_LAYOUT = wa_layout
IT_FIELDCAT = i_fldcat[]
*IT_EXCLUDING =
*IT_SPECIAL_GROUPS =
*IT_SORT =
*IT_FILTER =
*IS_SEL_HIDE =
*I_DEFAULT = 'X'
*I_SAVE = ' '
*IS_VARIANT =
IT_EVENTS = i_event[] "-----> correction done here
*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 = i_final "-----> correction done here
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
You need to check the TYPE before passing the internal tables or workareas to the PARAMETERS of a Function Module.
Regards,
Ravi Kiran.. -
Error in alv report (fieldcatlog is not found)
Hai Genious
i am a new of the sap-abap, i have a one problem in my alv report, now i am using the reuse_alv_ fieldcatlog_merge,
i declared with my internal table with type,
my error is :- fieldcatlog not found
for example
types: begin of ty_mara,
matnr type matnr,
meins type meins,
ersda type ersda,
ernam type ernam,
end of ty_mara.
data: wa_mara type ty_mara,
it_mara like table of wa_mara.
select matnr meins ersda ernam from mara into table it_mara.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'IT_MARA'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = SY-REPID
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_list_display'Hi,
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'IT_MARA'
I_STRUCTURE_NAME = 'TY_MARA'-->give it
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = SY-REPID
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
also use...
CHANGING
ct_fieldcat = i_fieldtab
data :i_fieldtab TYPE slis_t_fieldcat_alv,
s_fieldtab_body TYPE slis_fieldcat_alv.
fill i_fieldtab like this...
CASE s_fieldtab_body-fieldname.
WHEN 'OA_NO'.
s_fieldtab_body-seltext_l = 'Order Accep. No.'.
MODIFY i_fieldtab FROM s_fieldtab_body INDEX sy-tabix.
CLEAR s_fieldtab_body.
WHEN 'KTEXT'.
s_fieldtab_body-seltext_l = 'Ramco Order No.'.
MODIFY i_fieldtab FROM s_fieldtab_body INDEX sy-tabix.
CLEAR s_fieldtab_body.
and so on -
Hi guys,
I am executing an alv grid report.i m getting a run time error and i m gettig a dump.In the below i pasted the error.any suggestions where i m going wrong in the code.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
Information on where terminated?
Termination occurred in the ABAP program "SAPLSLVC" - in "FILL_DATA_TABLE"
The main program was "ZRPP1353 ".
In the source code you have the termination point in line 2735
of the (Include) program "LSLVCF36".
Source code where the error occured?
Column per Fieldcat Entry
ls_lvc_data-value = space.
clear ls_lvc_data-style.
loop at it_fcat_local assigning <ls_fcat>
where tech ne 'X' and no_out ne 'X'.
if l_invisible eq 'X'.
clear l_invisible.
if <ls_fcat>-do_sum is initial.
continue.
else.
clear ls_lvc_data-col_pos.
endif.
endif.
add 1 to ls_lvc_data-col_pos.
assign component <ls_fcat>-fieldname
of structure <ls_data> to <l_field_value>.
if sy-subrc ne 0.
message x000(0k).
endif.Hi Dinesh,
This is because of some problem with the field catalog you have defined. Please give the field catalog so that we can identify the problem easily. -
Regarding Runtime error in ALV List Display.
am using following to display data in ALV List.
but after executing of program am getting runtime error called 'Field Symbol has Not been assigned' .
please tell me how to correct the error.
Very urgent
Suitable answers rewarded with Maximum Ponits...
REPORT zmatrix.
TYPE-POOLS: slis.
TABLES: agr_define, sza5_d0700.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-006.
SELECT-OPTIONS: s_role FOR agr_define-agr_name OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
D A T A *
TYPES: BEGIN OF ty_agr_1251_inf,
agr_name TYPE agr_1251-agr_name,
object TYPE agr_1251-object,
field TYPE agr_1251-field,
low(20) TYPE c,
high TYPE agr_1251-high,
infty TYPE t582s-infty,
itext TYPE t582s-itext,
END OF ty_agr_1251_inf.
TYPES: BEGIN OF ty_agr_1251_tcode,
agr_name TYPE agr_1251-agr_name,
object TYPE agr_1251-object,
field TYPE agr_1251-field,
low(20) TYPE c,
high TYPE agr_1251-high,
tcode TYPE tstct-tcode,
ttext TYPE tstct-ttext,
END OF ty_agr_1251_tcode.
TYPES: BEGIN OF ty_t582s,
infty TYPE agval,
itext TYPE t582s-itext,
END OF ty_t582s.
TYPES: BEGIN OF ty_code,
tcode TYPE tstct-tcode,
ttext TYPE ttext_stct,
END OF ty_code.
TYPES: BEGIN OF ty_inf,
infty TYPE t582s-infty,
itext TYPE t582s-itext,
END OF ty_inf.
TYPES: BEGIN OF ty_role,
agr_name TYPE agr_1251-agr_name,
END OF ty_role.
TYPES: BEGIN OF tys_role_dtls,
agr_name TYPE agr_name,
value TYPE c,
property TYPE c,
END OF tys_role_dtls.
TYPES: BEGIN OF tys_infotype_final,
text(60),
text1(60),
value(4),
END OF tys_infotype_final.
I N T E R N A L T A B L E S *
DATA: wa_infotyp_final TYPE tys_infotype_final.
DATA: t_infotyp_final TYPE TABLE OF tys_infotype_final.
DATA: BEGIN OF wa_infotyp_dtls,
infty TYPE infty,
itext TYPE intxt,
role_dtls TYPE TABLE OF tys_role_dtls,
END OF wa_infotyp_dtls.
DATA: BEGIN OF wa_tcode_dtls,
tcode TYPE tcode,
ttext TYPE ttext_stct,
role_dtls TYPE TABLE OF tys_role_dtls,
END OF wa_tcode_dtls.
DATA: t_infotyp_dtls LIKE TABLE OF wa_infotyp_dtls,
t_tcode_dtls LIKE TABLE OF wa_tcode_dtls,
t_role_dtls TYPE TABLE OF tys_role_dtls,
wa_role_dtls TYPE tys_role_dtls.
DATA: wa_inf TYPE ty_inf,
t_inf TYPE STANDARD TABLE OF ty_inf.
DATA: wa_role TYPE ty_role,
t_role TYPE STANDARD TABLE OF ty_role.
DATA: wa_tcode TYPE ty_code,
t_tcode TYPE TABLE OF ty_code.
DATA: wa_agr_1251_inf TYPE ty_agr_1251_inf.
DATA: wa_agr_1251_tcode TYPE ty_agr_1251_tcode.
DATA: t_agr_1251_inf TYPE STANDARD TABLE OF ty_agr_1251_inf.
DATA: t_agr_1251_tc TYPE STANDARD TABLE OF ty_agr_1251_tcode.
DATA: wa_582s TYPE ty_t582s.
DATA: t_582s TYPE STANDARD TABLE OF ty_t582s.
DATA: t_range_tcode TYPE RANGE OF tcode.
DATA: t_range_inf TYPE RANGE OF infotyp.
DATA: wa_range_inf LIKE LINE OF t_range_inf.
DATA: wa_range_tcode LIKE LINE OF t_range_tcode.
DATA: wa_field TYPE slis_fieldcat_alv.
DATA: t_field TYPE slis_t_fieldcat_alv.
VARIABLES FOR OLE *
DATA: text(20),
count(20).
DATA: text1(30).
DATA: agr_name TYPE agr_1251-agr_name.
DATA: flag TYPE i VALUE '0'.
DATA: string1 TYPE string.
DATA: str TYPE string VALUE 'SAP%'.
DATA: count1 TYPE i VALUE '0'.
*& Event START-OF-SELECTION
START-OF-SELECTION.
PERFORM f100_get_inf_data.
PERFORM f200_process_inf_data.
count1 = 1.
PERFORM f300_prepare_field_catalog.
PERFORM f110_main_data.
PERFORM f400_display_data.
PERFORM f100_get_trans_data.
*& Form f110_main_data
text
FORM f110_main_data.
wa_infotyp_final-text = 'Access to Infotypes'.
APPEND wa_infotyp_final TO t_infotyp_final.
wa_infotyp_final-text = 'Infotype'.
wa_infotyp_final-text1 = 'Description'.
APPEND wa_infotyp_final TO t_infotyp_final.
wa_infotyp_final-text = '*'.
wa_infotyp_final-text1 = 'Acess to all Infotypes'.
LOOP AT t_role INTO wa_role WHERE agr_name <> ' '.
READ TABLE t_agr_1251_inf INTO wa_agr_1251_inf
WITH KEY agr_name = wa_role-agr_name field = 'INFTY' low = '*'.
IF syst-subrc = 0.
wa_infotyp_final-value = 'X'.
ENDIF.
ENDLOOP.
APPEND wa_infotyp_final TO t_infotyp_final.
LOOP AT t_inf INTO wa_inf WHERE infty <> ' '.
wa_infotyp_final-text = wa_inf-infty.
wa_infotyp_final-text1 = wa_inf-itext.
LOOP AT t_role INTO wa_role WHERE agr_name <> ' '.
Role Name
CLEAR wa_role_dtls.
flag = 1.
wa_role_dtls-agr_name = wa_role-agr_name.
For Value D & F
READ TABLE t_agr_1251_inf INTO wa_agr_1251_inf
WITH KEY agr_name = wa_role-agr_name field = 'AUTHC'..
IF syst-subrc EQ 0.
IF wa_agr_1251_inf-low = 'R'.
wa_infotyp_final-value = 'D'.
ELSE.
wa_infotyp_final-value = 'F'.
ENDIF.
ENDIF.
APPEND wa_role_dtls TO t_role_dtls.
APPEND wa_infotyp_final TO t_infotyp_final.
ENDLOOP.
ENDLOOP.
ENDFORM. "f110_main_data
*& Form f100_get_inf_data
text
FORM f100_get_inf_data.
Logic for Infotypes *
SELECT aagr_name aobject
afield alow a~high
INTO TABLE t_agr_1251_inf
FROM agr_1251 AS a INNER JOIN agr_define AS b
ON aagr_name EQ bagr_name
WHERE ( ( aobject EQ 'P_ORGIN' OR aobject EQ 'P_PERNR' )
AND ( aagr_name IN s_role ) AND ( bagr_name NOT LIKE str ) ).
ENDFORM. "f100_get_inf_data
*& Form f200_get_inf_process_data
text
FORM f200_process_inf_data.
LOOP AT t_agr_1251_inf INTO wa_agr_1251_inf.
IF wa_agr_1251_inf-high IS INITIAL.
CLEAR wa_range_inf.
wa_range_inf-sign = 'I'.
wa_range_inf-option = 'EQ'.
wa_range_inf-low = wa_agr_1251_inf-low.
APPEND wa_range_inf TO t_range_inf.
ELSE.
CLEAR wa_range_inf.
wa_range_inf-sign = 'I'.
wa_range_inf-option = 'BT'.
wa_range_inf-low = wa_agr_1251_inf-low.
wa_range_inf-high = wa_agr_1251_inf-high.
APPEND wa_range_inf TO t_range_inf.
ENDIF.
ENDLOOP.
SORT t_range_inf.
DELETE ADJACENT DUPLICATES FROM t_range_inf.
IF t_range_inf IS NOT INITIAL.
SELECT infty itext FROM t582s
INTO TABLE t_582s
WHERE sprsl = 'EN' AND infty IN t_range_inf.
IF syst-subrc EQ 0.
ENDIF.
ENDIF.
LOOP AT t_agr_1251_inf INTO wa_agr_1251_inf.
IF wa_agr_1251_inf-high IS INITIAL.
READ TABLE t_582s INTO wa_582s
WITH KEY infty = wa_agr_1251_inf-low.
IF syst-subrc EQ 0.
wa_agr_1251_inf-infty = wa_582s-infty.
wa_agr_1251_inf-itext = wa_582s-itext.
MODIFY t_agr_1251_inf FROM wa_agr_1251_inf
TRANSPORTING infty itext.
IF syst-subrc EQ 0.
ENDIF.
ENDIF.
ELSE.
CLEAR count.
LOOP AT t_582s INTO wa_582s
WHERE infty GE wa_agr_1251_inf-low
AND infty LE wa_agr_1251_inf-high.
IF count LE 1.
wa_agr_1251_inf-high = space.
wa_agr_1251_inf-infty = wa_582s-infty.
wa_agr_1251_inf-itext = wa_582s-itext.
MODIFY t_agr_1251_inf FROM wa_agr_1251_inf
TRANSPORTING infty itext.
IF syst-subrc EQ 0.
CLEAR wa_582s.
ENDIF.
ELSE.
wa_agr_1251_inf-high = space.
wa_agr_1251_inf-infty = wa_582s-infty.
wa_agr_1251_inf-itext = wa_582s-itext.
APPEND wa_agr_1251_inf TO t_agr_1251_inf.
ENDIF.
CLEAR wa_agr_1251_inf.
count = count + 1.
ENDLOOP.
ENDIF.
ENDLOOP.
wa_role-agr_name = ' '.
APPEND wa_role TO t_role.
wa_role-agr_name = ' '.
APPEND wa_role TO t_role.
LOOP AT t_agr_1251_inf INTO wa_agr_1251_inf.
IF wa_agr_1251_inf IS NOT INITIAL.
wa_role-agr_name = wa_agr_1251_inf-agr_name.
wa_inf-infty = wa_agr_1251_inf-infty.
wa_inf-itext = wa_agr_1251_inf-itext.
APPEND wa_role TO t_role.
APPEND wa_inf TO t_inf.
ENDIF.
ENDLOOP.
SORT t_role BY agr_name.
DELETE ADJACENT DUPLICATES FROM t_role.
SORT t_inf BY infty.
DELETE ADJACENT DUPLICATES FROM t_inf.
ENDFORM. "f200_get_process_inf_data
*& Form f100_get_trans_data
text
FORM f100_get_trans_data.
Logic for Transaction Codes *
SELECT aagr_name aobject
afield alow a~high
INTO CORRESPONDING FIELDS OF TABLE t_agr_1251_tc
FROM agr_1251 AS a
INNER JOIN agr_define AS b ON aagr_name EQ bagr_name
WHERE a~agr_name IN s_role
AND a~object EQ 'S_TCODE'.
ENDFORM. "f100_get_trans_data
*& Form f200_process_trans_data
text
FORM f200_process_trans_data.
LOOP AT t_agr_1251_tc INTO wa_agr_1251_tcode.
IF wa_agr_1251_tcode-high IS INITIAL.
CLEAR wa_range_tcode.
wa_range_tcode-sign = 'I'.
wa_range_tcode-option = 'EQ'.
wa_range_tcode-low = wa_agr_1251_tcode-low.
APPEND wa_range_tcode TO t_range_tcode.
ELSE.
CLEAR wa_range_tcode.
wa_range_tcode-sign = 'I'.
wa_range_tcode-option = 'BT'.
wa_range_tcode-low = wa_agr_1251_tcode-low.
wa_range_tcode-high = wa_agr_1251_tcode-high.
APPEND wa_range_tcode TO t_range_tcode.
ENDIF.
ENDLOOP.
SORT t_range_tcode.
DELETE ADJACENT DUPLICATES FROM t_range_tcode.
IF t_range_tcode IS NOT INITIAL.
SELECT tcode
ttext
FROM tstct
INTO TABLE t_tcode
WHERE sprsl EQ 'E'
AND tcode IN t_range_tcode.
IF sy-subrc EQ 0.
ENDIF.
ENDIF.
SORT t_agr_1251_tc BY agr_name.
LOOP AT t_agr_1251_tc INTO wa_agr_1251_tcode.
IF wa_agr_1251_tcode-high IS INITIAL.
READ TABLE t_tcode INTO wa_tcode
WITH KEY tcode = wa_agr_1251_tcode-low.
IF syst-subrc EQ 0.
wa_agr_1251_tcode-tcode = wa_tcode-tcode.
wa_agr_1251_tcode-ttext = wa_tcode-ttext.
MODIFY t_agr_1251_tc FROM wa_agr_1251_tcode
TRANSPORTING tcode ttext.
IF syst-subrc EQ 0.
ENDIF.
ENDIF.
ELSE.
CLEAR count.
LOOP AT t_tcode INTO wa_tcode
WHERE tcode GE wa_agr_1251_tcode-low
AND tcode LE wa_agr_1251_tcode-high.
IF count LE 1.
agr_name = wa_agr_1251_tcode-agr_name.
wa_agr_1251_tcode-high = space.
wa_agr_1251_tcode-tcode = wa_tcode-tcode.
wa_agr_1251_tcode-ttext = wa_tcode-ttext.
MODIFY t_agr_1251_tc FROM wa_agr_1251_tcode
TRANSPORTING tcode ttext high.
IF syst-subrc EQ 0.
CLEAR wa_tcode.
ENDIF.
count = 1.
ELSE.
wa_agr_1251_tcode-high = space.
wa_agr_1251_tcode-agr_name = agr_name.
wa_agr_1251_tcode-low = wa_tcode-tcode.
wa_agr_1251_tcode-tcode = wa_tcode-tcode.
wa_agr_1251_tcode-ttext = wa_tcode-ttext.
APPEND wa_agr_1251_tcode TO t_agr_1251_tc.
ENDIF.
CLEAR wa_agr_1251_tcode.
count = count + 1.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT t_agr_1251_tc INTO wa_agr_1251_tcode.
wa_role-agr_name = wa_agr_1251_tcode-agr_name.
APPEND wa_role TO t_role.
ENDLOOP.
SORT t_role BY agr_name.
DELETE ADJACENT DUPLICATES FROM t_role.
SORT t_tcode BY tcode.
DELETE ADJACENT DUPLICATES FROM t_tcode.
ENDFORM. "f200_process_trans_data
*& Form f100_prepare_field_catalog
text
FORM f300_prepare_field_catalog.
LOOP AT t_role INTO wa_role.
wa_field-col_pos = count1.
wa_field-fieldname = wa_role-agr_name.
APPEND wa_field TO t_field.
count1 = count1 + 1.
ENDLOOP.
ENDFORM. "f100_prepare_field_catalog
*& Form f100_display_data
text
FORM f400_display_data.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-cprog
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT =
it_fieldcat = t_field[]
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 = t_infotyp_final[]
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. "f100_display_datathis are the wasy u can build a field catalog...
1.----
FORM fill_fieldcat .
DATA: fld(30),
idx(2) TYPE n.
DEFINE no_output.
fieldcatalog-fieldname = &1.
fieldcatalog-no_out = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
END-OF-DEFINITION.
DEFINE catalog.
fieldcatalog-fieldname = &1.
fieldcatalog-seltext_s = &2.
if not &3 is initial.
fieldcatalog-seltext_m = &3.
else.
fieldcatalog-seltext_m = fieldcatalog-seltext_s.
endif.
if not &4 is initial.
fieldcatalog-seltext_l = &4.
else.
fieldcatalog-seltext_l = fieldcatalog-seltext_m.
endif.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
END-OF-DEFINITION.
catalog 'AVAIL_BASE'
'Base Qty.'
'Base Qty. Available'
'Base Quantity Available'.
catalog 'AVAIL_SALES'
'Sales Qty.'
'Sales Qty. Available'
'Sales Quantity Available'.
LOOP AT t_char_data.
idx = sy-tabix.
CONCATENATE 'CHR' idx INTO fld.
catalog fld
t_char_data-atbez
t_char_data-atbez
t_char_data-atbez.
ENDLOOP.
ADD 1 TO idx.
WHILE idx LE 15.
CONCATENATE 'CHR' idx INTO fld.
no_output fld.
ADD 1 TO idx.
ENDWHILE..
fieldcatalog-fieldname = 'EXACT'.
fieldcatalog-checkbox = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
2.----
FORM fieldcatalog.
REFRESH fc. CLEAR fc.
fc-tabname = 'HEADER'.
fc-fieldname = 'KUNNR'.
fc-ref_tabname = 'MSKU'.
APPEND fc. CLEAR fc.
fc-tabname = 'HEADER'.
fc-fieldname = 'NAME1_K'.
fc-ref_tabname = 'KNA1'.
fc-ref_fieldname = 'NAME1'.
APPEND fc. CLEAR fc.
fc-tabname = 'HEADER'.
fc-fieldname = 'TOTAL'.
fc-ref_tabname = 'MBEW'.
fc-ref_fieldname = 'SALK3'.
APPEND fc. CLEAR fc.
fc-tabname = 'LIST'.
fc-fieldname = 'MATNR'.
fc-ref_tabname = 'MSKU'.
APPEND fc. CLEAR fc.
fc-tabname = 'LIST'.
fc-fieldname = 'MAKTX'.
fc-ref_tabname = 'MAKT'.
fc-no_out = 'X'.
APPEND fc. CLEAR fc.
fc-tabname = 'LIST'.
fc-fieldname = 'CHARG'.
fc-ref_tabname = 'MSKU'.
APPEND fc. CLEAR fc.
fc-tabname = 'LIST'.
fc-fieldname = 'WERKS'.
fc-ref_tabname = 'MSKU'.
fc-no_out = 'X'.
APPEND fc. CLEAR fc.
fc-tabname = 'LIST'.
fc-fieldname = 'NAME1_W'.
fc-ref_tabname = 'T001W'.
fc-ref_fieldname = 'NAME1'.
fc-no_out = 'X'.
APPEND fc. CLEAR fc. -
Time Limit exceeded error in ALV report
I am gettting error "Time Limit Exceeded" when i execute ALV report. Can i run the program in background and how to do that?. I had already optimized my query in the program but even then i am facing the same issue.
You can process the alv in background by pressing F9...I guess that the output would be available as a spool in SP01.
You may need to re-check your query...And also, review the alv catalog and any events you are using....
Greetings,
Blag. -
Hi All,
I am getting a runtime error in output while i try to do sum in ALV output.
In my ouput table i want to do sum for below feilds those are defined in output table :
CURR TYPE P DECIMALS 2,
B30 TYPE P DECIMALS 2,
B60 TYPE P DECIMALS 2,
B90 TYPE P DECIMALS 2,
B120 TYPE P DECIMALS 2,
BG121 TYPE P DECIMALS 2,
i defined feildcatalog as below:
WA_FIELDCAT-FIELDNAME = 'B60'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-033.
WA_FIELDCAT-DO_SUM = 'X' .
WA_FIELDCAT-OUTPUTLEN = 17.
WA_FIELDCAT-DATATYPE = 'DEC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
even if i try to download the ouput feilds in file,then also i am getting a run time error as field symbols are not assign,
Please help.
Thanks and Regards,
MohitHi,
I am getting a dump that cause of by a message type (X).Same i get if i try to download the file.
My ouput internal table is as below:
data:BEGIN OF IT_FINAL occurs 0,
BUKRS TYPE BUKRS, "Company code
KUNNR TYPE KUNNR, "Customer number
NAME1 TYPE NAME1, "Name
BILL_TO TYPE KUNNR, "Bill To
BILL_NAME TYPE NAME1, "Bill To Name
BRANCH TYPE FILKD, "Branch
BRANCH_NAME TYPE NAME1, "Branch Name
BRANCH_REGION TYPE REGIO, "Region
BRANCH_CITY TYPE ORT01, "City
BELNR TYPE BELNR, "Accounting Document Number
ACC_CLK_SOLD TYPE BUSAB, "A/C Clerk Sold To
ACC_CLK_SOLD_NAME TYPE SNAME, "A/C Name
ACC_CLK_PAYER TYPE BUSAB, "A/C Payer
ACC_CLK_PAYER_NAME TYPE BUSAB, "A/C Payer Name
ASM_PART TYPE KUNN2, "ASM Partner
ASM_NAME TYPE NAME1, "ASM Name
DUNNING TYPE BUSAB, "Dunning Clerk
KATR4 TYPE KATR4, "Local /National Account
ZUONR TYPE DZUONR, "Assingment Number
REFERENCE TYPE XBLNR, "Reference
XREF1 TYPE XREF1, "Ref Key1
XREF2 TYPE XREF2, "Ref Key2
XREF3 TYPE XREF3, "Ref Key3,
SGTXT TYPE SGTXT, "Item Text
DUE_DATE TYPE SY-DATUM, "Due Date
DOC_DATE TYPE BLDAT, "Doc Date
BILL_DOC_NO TYPE VBELN, "Billing Doc Number
ZTERM TYPE DZTERM, "Terms
HKONT TYPE HKONT, "Gl Account
CURR TYPE P DECIMALS 2, "Current Balance
B30 TYPE P DECIMALS 2, "1-30
B60 TYPE P DECIMALS 2, "32-60
B90 TYPE P DECIMALS 2, "61-90
B120 TYPE P DECIMALS 2, "91-120
BG121 TYPE P DECIMALS 2, " >121
BAL TYPE p DECIMALS 2, "Balance
P_CURR TYPE CHAR10, "Current Percentage
PB30 TYPE CHAR10, "1-30 %
PB60 TYPE CHAR10, "32-60 Percentage
PB90 TYPE CHAR10, "61-90 Percentage
PB120 TYPE CHAR10, "91-120 Percentage
PBG121 TYPE CHAR10, ">121 %
END OF it_final..
My fieldcatalog is below:
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-004.
WA_FIELDCAT-OUTPUTLEN = 12.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'KUNNR'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-005.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'NAME1'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-006.
WA_FIELDCAT-OUTPUTLEN = 30.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'BILL_TO'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-007.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'BILL_NAME'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-008.
WA_FIELDCAT-OUTPUTLEN = 30.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'BRANCH' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-009.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'BRANCH_NAME' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-043.
WA_FIELDCAT-OUTPUTLEN = 30.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'BRANCH_REGION'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-010.
WA_FIELDCAT-OUTPUTLEN = 8.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'BRANCH_CITY'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-011.
WA_FIELDCAT-OUTPUTLEN = 12.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'BELNR' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-012.
WA_FIELDCAT-OUTPUTLEN = 11.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'ACC_CLK_SOLD' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-013.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'ACC_CLK_SOLD_NAME'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-014.
WA_FIELDCAT-OUTPUTLEN = 30.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'ACC_CLK_PAYER' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-015.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'ACC_CLK_PAYER_NAME'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-016.
WA_FIELDCAT-OUTPUTLEN = 30.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'ASM_PART'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-017.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'ASM_NAME'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-018.
WA_FIELDCAT-OUTPUTLEN = 30.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'DUNNING' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-019.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'KATR4'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-020.
WA_FIELDCAT-OUTPUTLEN = 2.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'ZUONR'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-044.
WA_FIELDCAT-OUTPUTLEN = 18.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'REFERENCE'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-021.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'XREF1' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-022.
WA_FIELDCAT-OUTPUTLEN = 12.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'XREF2' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-023.
WA_FIELDCAT-OUTPUTLEN = 12.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'XREF3' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-024.
WA_FIELDCAT-OUTPUTLEN = 12.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'SGTXT'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-025.
WA_FIELDCAT-OUTPUTLEN = 50.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'DUE_DATE'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-026.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'DOC_DATE'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-027.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'BILL_DOC_NO'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-028.
WA_FIELDCAT-OUTPUTLEN = 15.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'ZTERM'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-029.
WA_FIELDCAT-OUTPUTLEN = 5.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'HKONT'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-030.
WA_FIELDCAT-OUTPUTLEN = 11.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'CURR'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-031.
WA_FIELDCAT-OUTPUTLEN = 17.
WA_FIELDCAT-DO_SUM = 'X' .
WA_FIELDCAT-DATATYPE = 'DEC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'B30'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-032.
WA_FIELDCAT-DO_SUM = 'X' .
WA_FIELDCAT-OUTPUTLEN = 17.
WA_FIELDCAT-DATATYPE = 'DEC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'B60'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-033.
WA_FIELDCAT-DO_SUM = 'X' .
WA_FIELDCAT-OUTPUTLEN = 17.
WA_FIELDCAT-DATATYPE = 'DEC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'B90'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-034.
WA_FIELDCAT-DO_SUM = 'X' .
WA_FIELDCAT-OUTPUTLEN = 17.
WA_FIELDCAT-DATATYPE = 'DEC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'B120'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-035.
WA_FIELDCAT-DO_SUM = 'X' .
WA_FIELDCAT-OUTPUTLEN = 17.
WA_FIELDCAT-DATATYPE = 'DEC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'BG121'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-036.
WA_FIELDCAT-DO_SUM = 'X' .
WA_FIELDCAT-OUTPUTLEN = 17.
WA_FIELDCAT-DATATYPE = 'DEC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'BAL'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-045.
WA_FIELDCAT-DO_SUM = 'X' .
WA_FIELDCAT-OUTPUTLEN = 17.
WA_FIELDCAT-DATATYPE = 'DEC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'P_CURR'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-037.
WA_FIELDCAT-OUTPUTLEN = 17.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'PB30'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-038.
WA_FIELDCAT-OUTPUTLEN = 17.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'PB60'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-039.
WA_FIELDCAT-OUTPUTLEN = 17.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'PB90'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-040.
WA_FIELDCAT-OUTPUTLEN = 17.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'PB120' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-041.
WA_FIELDCAT-OUTPUTLEN = 17.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'PBG120' .
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-SELTEXT_L = TEXT-042.
WA_FIELDCAT-OUTPUTLEN = 17.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
Please help.
Thanks
Mohit -
Getting runtime error in ALV ...
Hi,
I am calling function REUSE_ALV_GRID_DISPLAY to display my data in an ALV grid... this code was working fine and so I used it for a different set of data but now it is throwing a runtime error saying ..
GETWA_NOT_ASSIGNED
Field symbol has not yet been assigned.
I dont understand why I am getting this and how to resolve this...my sample code is pasted below..
REPORT ZFB12TEST.
TABLES: BKPF.
TYPE-POOLS: slis.
DATA: BEGIN OF bkpf_rec OCCURS 0,
bukrs LIKE BKPF-BUKRS,
blart LIKE BKPF-BLART,
cpudt LIKE BKPF-CPUDT,
budat LIKE BKPF-budat,
belnr LIKE BKPF-BELNR,
gjahr LIKE BKPF-GJAHR,
END OF bkpf_rec.
DATA migo_data LIKE bkpf_rec occurs 0 with header line.
DATA: it_cat TYPE slis_t_fieldcat_alv,
wa_lay TYPE slis_layout_alv.
FIELD-SYMBOLS: <fs_cat> LIKE LINE OF it_cat.
SELECT-OPTIONS: so_bukrs FOR BKPF-BUKRS,
so_blart FOR BKPF-BLART,
so_cpudt FOR BKPF-CPUDT,
so_budat FOR BKPF-budat,
so_belnr FOR BKPF-BELNR,
so_gjahr FOR BKPF-GJAHR.
*include bdcrecx1.
start-of-selection.
SELECT bukrs blart cpudt budat belnr gjahr into table bkpf_rec from bkpf
where bukrs IN
so_bukrs and blart in so_blart and cpudt in so_cpudt and budat in
so_budat and belnr in so_belnr and gjahr in so_gjahr.
loop at bkpf_rec.
move-corresponding bkpf_rec to migo_data.
append migo_data.
endloop.
DATA: it_sortcat type slis_sortinfo_alv occurs 1,
wa_sort like line of it_sortcat.
wa_sort-spos = 1.
wa_sort-fieldname = 'bukrs'.
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sortcat.
wa_sort-spos = 2.
wa_sort-fieldname = 'belnr'.
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sortcat.
wa_lay-zebra = 'X'.
data: tmp_fc type slis_fieldcat_alv .
tmp_fc-reptext_ddic = 'CC'.
tmp_fc-fieldname = 'bukrs'.
tmp_fc-tabname = 'migo_data'.
tmp_fc-outputlen = 10.
tmp_fc-do_sum = space.
append tmp_fc to it_cat.
tmp_fc-reptext_ddic = 'Document number'.
tmp_fc-fieldname = 'belnr'.
tmp_fc-tabname = 'migo_data'.
tmp_fc-outputlen = 20.
tmp_fc-do_sum = space.
append tmp_fc to it_cat.
tmp_fc-reptext_ddic = 'Entry date'.
tmp_fc-fieldname = 'cpudt'.
tmp_fc-tabname = 'migo_data'.
tmp_fc-outputlen = 20.
tmp_fc-do_sum = space.
append tmp_fc to it_cat.
tmp_fc-reptext_ddic = 'Posting date'.
tmp_fc-fieldname = 'budat'.
tmp_fc-tabname = 'migo_data'.
tmp_fc-outputlen = 20.
tmp_fc-do_sum = space.
append tmp_fc to it_cat.
tmp_fc-reptext_ddic = 'Doc type'.
tmp_fc-fieldname = 'blart'.
tmp_fc-tabname = 'migo_data'.
tmp_fc-outputlen = 10.
tmp_fc-do_sum = space.
append tmp_fc to it_cat.
tmp_fc-reptext_ddic = 'Fiscal year'.
tmp_fc-fieldname = 'gjahr'.
tmp_fc-tabname = 'migo_data'.
tmp_fc-outputlen = 10.
tmp_fc-do_sum = space.
append tmp_fc to it_cat.
LOOP AT it_cat ASSIGNING <fs_cat>.
CLEAR <fs_cat>-key.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_grid_title = 'Invoice selected'
is_layout = wa_lay
it_fieldcat = it_cat
it_sort = it_sortcat
TABLES
t_outtab = MIGO_DATA
EXCEPTIONS
program_error = 1
OTHERS = 2.When building your sort catalog, make sure to include the tabname.
wa_sort-spos = 1.
wa_sort-fieldname = 'BUKRS'.
<b> wa_sort-tabname = 'MIGO_DATA'.</b>
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
append wa_sort to it_sortcat.
wa_sort-spos = 2.
wa_sort-fieldname = 'BELNR'.
<b> wa_sort-tabname = 'MIGO_DATA'.</b>
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
append wa_sort to it_sortcat.
Please make sure to award points and mark your post as solved. Thanks.
REgards,
Rich HEilman
Message was edited by: Rich Heilman
Message was edited by: Rich Heilman -
Hi,
I have a report to display in ALV list display, It give a runtime error when i run the report ,
error message : in INCLUDE LKKBLF99 - Field symbol not assigned.
I am not usning any field symbols in my report, can anyone suggest what could be the problem.Hi,
While creating fieldcatalog table you should give the fieldname and the tabname in capital letters.
for eg.
fcat-fieldname = 'MATNR'.
regards,
Santosh Thorat. -
Error While ALV Grid is exported to Excel.
Hi Experts,
I get an error OBJECTS_NOT_CHARLIKE , while I try to download an ALV Grid , to an excel file using the standard icon Export present on the ALV Grid.
Regards.
Edited by: sunitha j on May 19, 2009 1:15 PMThis happens when your output list contains qty. or amount fields.
To fix the error use sap table name instead of your internal table name while preparing field catalog.
In case you are forced to use int. table name while preparing field catalog , add "quantity" field for qty figures and "currency" field for amount figures.
Example :
it_catalog-fieldname = 'MENGE'.
it_catalog-quantity = 'NOS'.
it_catalog-tabname = 'i_bseg'.
it_catalog-seltext_s = 'Quantity'.
APPEND it_catalog TO it_fieldcat.
it_catalog-fieldname = 'DMBTR'.
it_catalog-tabname = 'i_bseg'.
it_catalog-seltext_s = 'Amount'.
it_catalog-currency = 'INR'.
APPEND it_catalog TO it_fieldcat.
Maybe you are looking for
-
Newbie ? Recording real instruments
I have recorded an audio file (background music). I now want to record an instrument while the background music is playing. How do I do this? Do I need an audio interface? Bronko Powerbook G4 Mac OS X (10.4.7)
-
Are TreePaths only valid in the TreeModel they originate from?
I've got a JTree that lists our warehouse inventory, grouped by primary and secondary invenotry categories. (IE. "Printers" / "Laser" / "SomeLaserPrinter". ) The tree is populated through a SQL query. I've got a checkbox that, when the value changes,
-
Unable to synch Assets of type Page to webcenter sites.....
Hi All, We have kept repository containing developed source code on SVN and i have checked out the code into my workspace. When i am trying to import Templates to my webcenter sites instance using 'Synch to WebCenterSites' , for some templates i am g
-
Hi, I have a touch wheel firewire 10gb iPod. It has given me excellent service using my iMac DV 400 OS 9.2.2. I have never updated the iPod software its running just as it did the day I bought it. I now have a new iBook G4 12" Tiger. So what I would
-
Adding Custom HyperLink in user Self Service in OIM 11g
Hi My task is to add a hyperlink in self service in oim 11g which can directly lead to resource form for selecting a resource for provisioning user. Any help would be appreciated. Regrads Rajinder Singh