Alv list printing-dump error
hai,
i get following dump error when tryign to print a alv list report.
'Illegal interruption of the event LOAD-OF-PROGRAM.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLSZA12" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
During the flow of the event LOAD-OF-PROGRAM (event for the
initialization of an ABAP program), a condition occurred under which
the event was to be left early. This is not permitted as it would
result in an inconsistent status in the ABAP program.'
the problem resolves for a particular output(when i restrict the list to lesser rows) by changing FORMAT from
X_65_255 to X_90_120 in the print dialog properties option..
anycase i will have to print the output for all conditions.
hi,
did check..
i am using a report program(and directly executing from se38)
it doesnt come under module pool.
however u r link suggests that,when the function module for ALV LIST DISPLAY is called,the error is triggered(LOAD OF PROGRAM)..
hmm checking further in these lines..
thanks for the inputs..
Similar Messages
-
Alv List print printer information in 1st page
Hi,
At the time of alv list printing the following information is printed on 1st page. How to avoid this information when printing.
INITSTRING
Start r_3-Prolog
Drucker : Wipro EX-330+DX
System : RAP (reprdfo)
User : 11BO
End r_3-Prolog
Thanks in advance.Hi GoldMoon,
(edit) Print another basic ABAP list (print anything else) on the same printer to see if that first page is printed. If yes, it's probably either SAP, OS, or Print Server cover page. They are explained in "cover page" SDN wiki, there are explanations how the cover page can be output (and so you can deduce how to remove it).
Best regards,
Sandra
Edited by: Sandra Rossi, 5 minutes later -
Hi
I am trying to print a ALV list that contains Subtotals and Grand Total. I want subtotals and grand total to be bold while printing. i can see the subtotal and grand total are bold in list display but only grand total is printed bold.
can anybody help me where to do the setting to print subtotals in bold.
Thanks
hemhi
ABAP Certification, Smartform, Sapscripts, BAPI, JAVA, Visual Basic Programming Books
A Simple ABAP ALV LIST VIEWER Example
This ALV program have all the basic report requirements such as page heading, page no, sub-total and a grand total.
This is a basic ALV with the followings:-
- Page Heading
- Page No
- Sub-Total
- Grand Total
REPORT ZALV.
TYPE-POOLS: SLIS.
DATA: G_REPID LIKE SY-REPID,
GS_PRINT TYPE SLIS_PRINT_ALV,
GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
GT_EVENTS TYPE SLIS_T_EVENT,
GT_SORT TYPE SLIS_T_SORTINFO_ALV,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
FIELDCAT_LN LIKE LINE OF GT_FIELDCAT,
COL_POS TYPE I.
DATA: BEGIN OF ITAB,
FIELD1(5) TYPE C,
FIELD2(5) TYPE C,
FIELD3(5) TYPE P DECIMALS 2,
END OF ITAB.
DATA: BEGIN OF ITAB1 OCCURS 0.
INCLUDE STRUCTURE ITAB.
DATA: END OF ITAB1.
DATA: BEGIN OF ITAB_FIELDCAT OCCURS 0.
INCLUDE STRUCTURE ITAB.
DATA: END OF ITAB_FIELDCAT.
Print Parameters
PARAMETERS:
P_PRINT AS CHECKBOX DEFAULT ' ', "PRINT IMMEDIATE
P_NOSINF AS CHECKBOX DEFAULT 'X', "NO SELECTION INFO
P_NOCOVE AS CHECKBOX DEFAULT ' ', "NO COVER PAGE
P_NONEWP AS CHECKBOX DEFAULT ' ', "NO NEW PAGE
P_NOLINF AS CHECKBOX DEFAULT 'X', "NO PRINT LIST INFO
P_RESERV TYPE I. "NO OF FOOTER LINE
INITIALIZATION.
G_REPID = SY-REPID.
PERFORM PRINT_BUILD USING GS_PRINT. "Print PARAMETERS
START-OF-SELECTION.
TEST DATA
MOVE 'TEST1' TO ITAB1-FIELD1.
MOVE 'TEST1' TO ITAB1-FIELD2.
MOVE '10.00' TO ITAB1-FIELD3.
APPEND ITAB1.
MOVE 'TEST2' TO ITAB1-FIELD1.
MOVE 'TEST2' TO ITAB1-FIELD2.
MOVE '20.00' TO ITAB1-FIELD3.
APPEND ITAB1.
DO 50 TIMES.
APPEND ITAB1.
ENDDO.
END-OF-SELECTION.
PERFORM BUILD.
PERFORM EVENTTAB_BUILD CHANGING GT_EVENTS.
PERFORM COMMENT_BUILD CHANGING GT_LIST_TOP_OF_PAGE.
PERFORM CALL_ALV.
FORM BUILD.
DATA FIELD CATALOG
Explain Field Description to ALV
DATA: FIELDCAT_IN TYPE SLIS_FIELDCAT_ALV.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'FIELD1'.
FIELDCAT_LN-TABNAME = 'ITAB1'.
*FIELDCAT_LN-NO_OUT = 'X'. "FIELD NOT DISPLAY, CHOOSE FROM LAYOUT
FIELDCAT_LN-KEY = ' '. "SUBTOTAL KEY
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'HEAD1'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'FIELD2'.
FIELDCAT_LN-TABNAME = 'ITAB1'.
FIELDCAT_LN-NO_OUT = 'X'.
FIELDCAT_LN-SELTEXT_L = 'HEAD2'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'FIELD3'.
FIELDCAT_LN-TABNAME = 'ITAB1'.
FIELDCAT_LN-REF_FIELDNAME = 'MENGE'. "<- REF FIELD IN THE DICTIONNARY
FIELDCAT_LN-REF_TABNAME = 'MSEG'. "<- REF TABLE IN THE DICTIONNARY
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-DO_SUM = 'X'. "SUM UPON DISPLAY
APPEND FIELDCAT_LN TO GT_FIELDCAT.
DATA SORTING AND SUBTOTAL
DATA: GS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'FIELD1'.
GS_SORT-SPOS = 1.
GS_SORT-UP = 'X'.
GS_SORT-SUBTOT = 'X'.
APPEND GS_SORT TO GT_SORT.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'FIELD2'.
GS_SORT-SPOS = 2.
GS_SORT-UP = 'X'.
*GS_SORT-SUBTOT = 'X'.
APPEND GS_SORT TO GT_SORT.
ENDFORM.
FORM CALL_ALV.
ABAP List Viewer
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME = 'ITAB1'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = GT_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = GT_EVENTS[]
IT_EVENT_EXIT =
IS_PRINT = GS_PRINT
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ITAB1
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM.
HEADER FORM
FORM EVENTTAB_BUILD CHANGING LT_EVENTS TYPE SLIS_T_EVENT.
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
*GC_FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE'.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = LT_EVENTS.
READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO LT_EVENTS.
ENDIF.
define END_OF_PAGE event
READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_END_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO LT_EVENTS.
ENDIF.
ENDFORM.
FORM COMMENT_BUILD CHANGING GT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: GS_LINE TYPE SLIS_LISTHEADER.
CLEAR GS_LINE.
GS_LINE-TYP = 'H'.
GS_LINE-INFO = 'HEADER 1'.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
CLEAR GS_LINE.
GS_LINE-TYP = 'S'.
GS_LINE-KEY = 'STATUS 1'.
GS_LINE-INFO = 'INFO 1'.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
GS_LINE-KEY = 'STATUS 2'.
GS_LINE-INFO = 'INFO 2'.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
CLEAR GS_LINE.
GS_LINE-TYP = 'A'.
GS_LINE-INFO = 'ACTION'.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
ENDFORM.
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
WRITE: SY-DATUM, 'Page No', SY-PAGNO LEFT-JUSTIFIED.
ENDFORM.
FORM END_OF_PAGE.
WRITE at (sy-linsz) sy-pagno CENTERED.
ENDFORM.
PRINT SETTINGS
FORM PRINT_BUILD USING LS_PRINT TYPE SLIS_PRINT_ALV.
LS_PRINT-PRINT = P_PRINT. "PRINT IMMEDIATE
LS_PRINT-NO_PRINT_SELINFOS = P_NOSINF. "NO SELECTION INFO
LS_PRINT-NO_COVERPAGE = P_NOCOVE. "NO COVER PAGE
LS_PRINT-NO_NEW_PAGE = P_NONEWP.
LS_PRINT-NO_PRINT_LISTINFOS = P_NOLINF. "NO PRINT LIST INFO
LS_PRINT-RESERVE_LINES = P_RESERV.
ENDFORM.
*END OF ZALV PROGRAM
i copied the program from the below link
http://www.sap-basis-abap.com/sapalv.htm
hope it will help you
Regards
Sreelatha Gullapalli -
Problem in Printing the ALV list
Hi,
I have one problem with printing the ALV list. While printing the ALV list(thro Print Icon on application Tool bar) ,Fist page of my print out contains some other inforamtion.
inforamtions included two tables
first table contains Sort Criteria, Ascdg, Descnd, Subtotal columns.
And second table contains Data statistics , number of
columns.
But from Second page onwards , my alv list printed correctly .
How can i avoid the First page inforamtion and
what is the Reason of coming like this?
Thanks,
Neptune.MI assume you are using function module Reuse_alv_grid_display or reuse_alv_list_display for ALV.
If this is the case, there is a parameter called IS_PRINT that you need to supply while calling the function module.
you can for exapmle declare
data:
printstruc type SLIS_PRINT_ALV.
printstruc-NO_PRINT_LISTINFOS = 'X'.
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_PRINT = printstruc
There are many other flags in is_print structures that you can use to manipulate the printing.
Cheers! -
Display Page number in ALV List.
Dear Friends,
I want to display page numbers in ALV list print output. But I dont know how to do that without using objects.
Please suggest.
Regards,
Madan.TRY LIKE THIS
data : ifieldcat type slis_t_fieldcat_alv,
wfieldcat type slis_fieldcat_alv,
IEVENT TYPE SLIS_T_EVENT,
WEVENT TYPE SLIS_ALV_EVENT..
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IEVENT
EXCEPTIONS
LIST_TYPE_WRONG = 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.
READ TABLE IEVENT INTO WEVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WEVENT-FORM = 'TOP_OF_PAGE'.
MODIFY IEVENT FROM WEVENT INDEX SY-TABIX.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_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 = 'TOPOFPAGE'
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 = IFIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = IEVENT
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_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
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.
FORM TOP_OF_PAGE.
WRITE : /10 'HeadinG OF ALV'.
WRITE : 100 SY-PAGNO.
ENDFORM.
ONE THING IS THERE YOU CAN USE WRITE FOR ONLY LIST DISPLAY NOT FOR GRID DISPALY.
REGARDS
SHIBA DUTTA -
Down loading ALV List to local file /print
hi ,
We have a program that displays data on an ALV list. Then, when you click on the 'Print' icon, or try to download to a local file, it gives a short dump with a message 'OBJECTS_NOT_CHARLIKE'.
Any solutions on the same ....
thanksHi,
i hope you have all your data in and internal table.
If this is so use the following code,
*--- Down load the file
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
filename = lv_file
filetype = 'DAT'
TABLES
data_tab = gt_excel1
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
IF sy-subrc = 0.
MESSAGE i000(zf) WITH text-017.
ELSE.
MESSAGE e939(zf) WITH lv_file. "Errors while downloading.
ENDIF.
Following should be passed,
v_file --> file path with file name (provide filename with '.xls' extension)
gt_excel --> Internal table which has to be downloaded to excel.
thanks
vijay
reward points if helpful. -
Alv list report-problems while printing
hai,
i get following dump error when tryign to print a alv list report.
'Illegal interruption of the event LOAD-OF-PROGRAM.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLSZA12" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
During the flow of the event LOAD-OF-PROGRAM (event for the
initialization of an ABAP program), a condition occurred under which
the event was to be left early. This is not permitted as it would
result in an inconsistent status in the ABAP program.'
the problem resolves for a particular output(when i restrict the list to lesser rows) by changing FORMAT from
X_65_255 to X_90_120 in the print dialog properties option..
however this restricts the coloumn width..
anycase i will have to print the output for all conditions.
the problem seems to be centred around number of rows in the list output..is somethign wrong with the values in this internal table gt_comtypes_tab...
this is where the dump is pointing..at LAOD OF PROGRAM EVENT
1 FUNCTION addr_get_conversion_table.
2 *"----
3 ""Lokale Schnittstelle:
4 *" EXPORTING
5 *" VALUE(COMTYPES_TAB) TYPE ADCOMTYPES_TAB
6 *" EXCEPTIONS
7 *" INTERNAL_ERROR
8 *"----
9
10 comtypes_tab = gt_comtypes_tab.
11
12 ENDFUNCTION.
values of gt_comtypes_tab.
2 TEL ADTEL
3 FAX ADFAX
4 TTX ADTTX
5 TLX ADTLX
6 INT ADSMTP
7 RML ADRML
8 X40 ADX400
9 RFC ADRFC
10 PRT ADPRT
11 SSF ADSSF
12 URI ADURI
13 PAG ADPAG -
ALV list -Runtime error using the Spreadsheet button(CTRL+SHIFT+F7)
Hi,
We are on ECC6.0.When ever I try to use the button 'Spreadsheet' (CTRLSHIFTF7) it gives me the following runtime error.It works fine if I use the export button.Also it works for ALV grid.Issue is only with ALV list.
Can you pelase advise waht could be the issue.
Thanks
Venkat
Runtime Errors GETWA_NOT_ASSIGNED
Date and Time 08.06.2009 16:02:22
Short text
Field symbol has not yet been assigned.
What happened?
Error in the ABAP Application Program
The current ABAP program "CL_SALV_BS_TT_RESULT_TABLE====CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
You attempted to access an unassigned field symbol
(data segment 32781).
This error may occur if
- You address a typed field symbol before it has been set with
ASSIGN
- You address a field symbol that pointed to the line of an
internal table that was deleted
- You address a field symbol that was previously reset using
UNASSIGN or that pointed to a local field that no
longer exists
- You address a global function interface, although the
respective function module is not active - that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
Trigger Location of Runtime Error
Program CL_SALV_BS_TT_RESULT_TABLE====CP
Include CL_SALV_BS_TT_RESULT_TABLE====CM00L
Row 165
Module type (METHOD)
Module Name GET_CELL_VALUE
Source Code Extract
Line
SourceCde
135
call method cl_alv_xslt_transform=>get_days_since_1900
136
exporting
137
i_date = l_date
138
receiving
139
e_num = attribute01.
140
141
elseif ls_attribute-s_dfies-inttype eq cl_abap_typedescr=>typekind_time. "Time
142
data:
143
l_time type t.
144
145
l_time = <l_data>.
146
147
call method cl_alv_xslt_transform=>get_isotime_from_inttime
148
exporting
149
i_value = l_time
150
receiving
151
e_value = value.
152
153
*... fill attribute01 with percent value of actual day
154
call method cl_alv_xslt_transform=>get_percent_of_act_day
155
exporting
156
i_time = l_time
157
receiving
158
e_num = attribute01.
159
160
elseif ls_attribute-s_dfies-inttype ca if_salv_bs_log_exp_operand=>c_numeric and
161
ls_attribute-s_dfies-convexit is initial.
162
case ls_attribute-s_dfies-reference_field_type.
163
when if_salv_bs_c_data=>reffieldtype_curr.
164
*... get iso value for currency value
>>>>>
call method cl_alv_xslt_transform=>get_isonum_from_intnum
166
exporting
167
i_value = <l_data>
168
i_currency = <l_reference>
169
i_decimals = ls_attribute-s_dfies-decimals
170
importing
171
e_value = l_isovalue.
172
173
when if_salv_bs_c_data=>reffieldtype_quan.
174
*... get iso value for quantity value
175
call method cl_alv_xslt_transform=>get_isonum_from_intnum
176
exporting
177
i_value = <l_data>
178
i_unit = <l_reference>
179
i_decimals = ls_attribute-s_dfies-decimals
180
importing
181
e_value = l_isovalue.
182
183
when others.
184
*... get iso value for valueHi Pinaki,
Thanks for your reply.
below is my code.
data: t_fieldcat type slis_t_fieldcat_alv,
w_fieldcat like line of t_fieldcat,
w_layout type slis_layout_alv,
t_sort type slis_t_sortinfo_alv,
w_sort like line of t_sort,
t_events type slis_t_event,
w_events like line of t_events.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'ZSD_ORDERS'
i_bypassing_buffer = 'X'
changing
ct_fieldcat = t_fieldcat.
data: l_lines_fieldcat type i.
describe table t_fieldcat lines l_lines_fieldcat.
clear: w_fieldcat.:
w_fieldcat-col_pos = l_lines_fieldcat + 1.
w_fieldcat-datatype = 'QUAN'.
w_fieldcat-just = ' '.
w_fieldcat-do_sum = ' '.
w_fieldcat-fieldname = 'ZZSCLQTY'.
w_fieldcat-tabname = 'T_DATA'.
w_fieldcat-qfieldname = 'VRKME'.
w_fieldcat-seltext_s = text-a01.
w_fieldcat-seltext_m = text-a01.
w_fieldcat-seltext_l = text-a01.
append w_fieldcat to t_fieldcat.
Modify column headings
loop at t_fieldcat into w_fieldcat.
case w_fieldcat-fieldname.
when 'MATNR'.
w_fieldcat-no_zero = 'X'.
when 'ZZPRICECHECK'.
w_fieldcat-reptext_ddic = text-l01.
when 'KZWI5'.
w_fieldcat-reptext_ddic = text-l02.
when 'VBELN'.
w_fieldcat-hotspot = 'X'.
when 'BMENG'.
w_fieldcat-do_sum = 'X'.
when 'COUNTER'.
w_fieldcat-do_sum = 'X'.
w_fieldcat-reptext_ddic = text-l03.
when 'OBJDE'.
w_fieldcat-reptext_ddic = 'Obj ID'.
endcase.
modify t_fieldcat from w_fieldcat.
endloop.
Format output options
clear w_layout.
w_layout-colwidth_optimize = 'X'.
w_layout-zebra = 'X'.
w_layout-get_selinfos = 'X'.
w_layout-detail_initial_lines = 'X'.
w_layout-group_change_edit = 'X'.
Specify list processing events
w_events-name = 'TOP_OF_PAGE'.
w_events-form = 'TOP_OF_PAGE'.
append w_events to t_events.
Fit Add List Variant from Selection Screen "003
clear: w_variant.
w_variant-report = sy-repid.
w_variant-variant = sp_vari.
end Fit02
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = w_repid
is_layout = w_layout
it_sort = t_sort
i_callback_user_command = 'USER_COMMAND'
is_variant = w_variant
i_save = 'A'
it_fieldcat = t_fieldcat[]
it_events = t_events[]
tables
t_outtab = t_data.
endform. -
Display error protocol in an alv list
Hi!
I have in my program an alv list.Two of its fields are editable. For one of this field I want to control the value key by the user. So , i used ADD_PROTOCOL_ENTRY from class CL_ALV_CHANGED_DATA_PROTOCOL like in report BCALV_EDIT_04. The control works very well when the user key a wrong value.
But, here is my problem. I add a button to allow user to change value for several line with one click (mass change) and i would like to control entry too.
Since when i call method CHECK_CHANGED_DATA after my mass changes nothing appends, in PAI module i add this code.
DATA WT_CHANGED TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL. CREATE OBJECT WT_CHANGED EXPORTING I_CALLING_ALV = GRID1.
PERFORM MASS_CHANGE.
CALL METHOD G_VERIFIER->HANDLE_DATA_CHANGED( WT_CHANGED ).
In perform mass_change i had this code :
WT_CELLS-ROW_ID = WT_INDEX2-ROW_ID.
WT_CELLS-FIELDNAME = '/BIC/ZC_SIPROD'.
WT_CELLS-VALUE = P_SIPROD.
WT_CELLS-TABIX = W_TABIX.
APPEND WT_CELLS.
APPEND WT_CELLS TO WT_CHANGED->MT_GOOD_CELLS.
The protocol windows appears. When i click on an error message the cell witch contains the error is selected but the fiels <i>name of the columns</i> is empty in the protocol windows and the incorrect value is not deleted.
NB : when i do manual change (i.e line by line) this columns isn't empty and the incorrect value is deleted.
can you help me in order to solve my problem?
Thanks by advance,
LB.
Message was edited by:
Laurent BOUDARTHi,
you can have a look in BCALV_GRID_EDIT.
Look in the perform data_changed.
Edited by: Mario Schmidt on Jun 21, 2010 5:05 AM -
How to print text on container using oop on alv list
Hello Guru's,
pl guide me how to print text on container using alv list-display which have interactive events using oop classes/methods ...
I want to print hard coded text on coantainer , on double clicking it will call another screen.
Pl Help..
Message was edited by:
paresh sonavaneHi Paresh,
1. Go to the Layout and Create One custom container box and give name it.
2. Custom Container is the one type of tool and its used for Displaying the Reports
with the use of ABAP Objects.
3. Go to se38 and Write The Following Code.
tables ZTEAM_GD.
DATA : OBJ TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
OBJ1 TYPE REF TO CL_GUI_ALV_GRID.
DATA IT_TEAM LIKE TABLE OF ZPLAYER_BAT_DET .
SELECT * FROM ZPLAYER_BAT_DET INTO TABLE IT_TEAM.
CREATE OBJECT OBJ
EXPORTING
CONTAINER_NAME = 'ALV'. -
> Give ur Container Name
CREATE OBJECT OBJ1
EXPORTING
I_PARENT = OBJ.
CALL METHOD OBJ1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'ZPLAYER_BAT_DET'
CHANGING
IT_OUTTAB = IT_TEAM.
*CALL METHOD OBJ1->SET_DROP_DOWN_TABLE
EXPORTING
I_STRUCTURE_NAME = 'ZTEAM_GD'
CHANGING
IT_OUTTAB = IT_TEAM.
CALL SCREEN 9000.
*& Module USER_COMMAND_9000 INPUT
text
MODULE USER_COMMAND_9000 INPUT.
CASE SY-UCOMM.
WHEN 'EXT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPU
Thanks.
Reward If Helpful. -
Getting a program Dump Error in Herarchial ALV
Hello All,
I am getting a dump error when I am executing the below program. Kindly help as I am not getting the output. However all the subroutines are getting properly populated with data. Getting a dump error while calling the function : REUSE_ALV_HIERSEQ_LIST_DISPLAY
Pasted below are both the question and solution. Copy the solution in SE38 and execute it to check out the dump error.
Kindly help.
Thanks,
Vinod.
QUESTION :-
Objective
Hierarchical ALV for displaying Sales documents per customer
Design
Create a program that will allow the user to display all customers that have placed Sales Orders in the given date range. The user will have an ability to drill-down to see the sales order items per customer.
Selection screen fields
Sales order creation date (range)
Customer number (range)
Output
Header
Customer Number
Customer Name
Total Order value (sum of order values from items below)
Details
Sales order number
Material number
Order quantity
Order value
Reference
Tables: KNA1, VBAK, VBAP
Transaction VA03 (Sales order)
SOLUTION :-
*& Report Z_HALV_32722 *
REPORT Z_HALV_32722 .
TYPE-POOLS: slis.
TABLES : kna1,
vbak.
SELECT-OPTIONS: s_cst_no FOR kna1-kunnr.
SELECT-OPTIONS: s_cr_dt FOR vbak-erdat.
DATA : BEGIN of ty_hdr,
kunnr TYPE vbak-kunnr,
name1 TYPE kna1-name1,
netwr TYPE vbak-netwr,
END of ty_hdr,
gt_hdr LIKE TABLE OF ty_hdr,
gs_hdr LIKE LINE OF gt_hdr.
DATA : BEGIN of ty_ln,
kunnr TYPE vbak-kunnr,
vbeln TYPE vbap-vbeln,
matnr TYPE vbap-matnr,
kwmeng TYPE vbap-kwmeng,
netwr TYPE vbap-netwr,
END of ty_ln,
gt_ln LIKE TABLE OF ty_ln,
gs_ln LIKE LINE OF gt_ln.
DATA : BEGIN of ty_hdr1,
kunnr TYPE vbak-kunnr,
END of ty_hdr1,
gt_hdr1 LIKE TABLE OF ty_hdr1,
gs_hdr1 LIKE LINE OF gt_hdr1.
DATA : gt_fc TYPE slis_t_fieldcat_alv,
gs_fc LIKE LINE OF gt_fc,
gs_k_fld TYPE slis_keyinfo_alv,
gt_layout TYPE slis_layout_alv,
gv_repid TYPE sy-repid.
START-OF-SELECTION.
gv_repid = sy-repid.
perform fetch_data.
perform prepare_fc.
perform prepare_layout.
perform show_output.
*& Form fetch_data
text
--> p1 text
<-- p2 text
form fetch_data .
SELECT kunnr
INTO CORRESPONDING FIELDS OF TABLE gt_hdr1
FROM vbak
WHERE vbak~kunnr IN s_cst_no
AND vbak~erdat IN s_cr_dt.
DELETE ADJACENT DUPLICATES FROM gt_hdr1 COMPARING kunnr.
LOOP AT gt_hdr1 INTO gs_hdr1.
SELECT SINGLE vbakkunnr kna1name1 SUM( vbak~netwr )
INTO (gs_hdr-kunnr, gs_hdr-name1, gs_hdr-netwr)
FROM vbak INNER JOIN kna1
ON vbakkunnr = kna1kunnr
WHERE vbak~kunnr = gs_hdr1-kunnr
GROUP BY vbakkunnr kna1name1.
APPEND gs_hdr TO gt_hdr.
SELECT vbakkunnr vbapvbeln vbapmatnr vbapkwmeng vbap~netwr
INTO CORRESPONDING FIELDS OF TABLE gt_ln
FROM vbap INNER JOIN vbak
ON vbapvbeln = vbakvbeln
WHERE vbak~kunnr = gs_hdr1-kunnr.
ENDLOOP.
endform. " fetch_data
*& Form prepare_fc
text
--> p1 text
<-- p2 text
form prepare_fc .
CLEAR gs_k_fld.
gs_k_fld-header01 = 'KUNNR'.
gs_k_fld-item01 = 'KUNNR'.
CLEAR gs_fc.
gs_fc-fieldname = 'KUNNR'.
gs_fc-tabname = 'GT_HDR'.
gs_fc-seltext_l = text-001.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'NAME1'.
gs_fc-tabname = 'GT_HDR'.
gs_fc-seltext_l = text-002.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'NETWR'.
gs_fc-tabname = 'GT_HDR'.
gs_fc-seltext_l = text-003.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'VBELN'.
gs_fc-tabname = 'GT_LN'.
gs_fc-seltext_l = text-004.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'MATNR'.
gs_fc-tabname = 'GT_LN'.
gs_fc-seltext_l = text-005.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'KWMENG'.
gs_fc-tabname = 'GT_LN'.
gs_fc-seltext_l = text-006.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'NETWR'.
gs_fc-tabname = 'GT_LN'.
gs_fc-seltext_l = text-007.
APPEND gs_fc TO gt_fc.
endform. " prepare_fc
*& Form prepare_layout
text
--> p1 text
<-- p2 text
form prepare_layout .
gt_layout-colwidth_optimize = 'X'.
gt_layout-expand_fieldname = 'TST'.
endform. " prepare_layout
*& Form show_output
text
--> p1 text
<-- p2 text
form show_output .
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = gv_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
IS_LAYOUT = gt_layout
IT_FIELDCAT = gt_fc
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
i_tabname_header = 'GT_HDR'
i_tabname_item = 'GT_LN'
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = gs_k_fld
IS_PRINT =
IS_REPREP_ID =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab_header = GT_HDR[]
t_outtab_item = GT_LN[]
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. " show_outputEverything looks fine with the gt_layout, it is not an internal table, so no need to append to it, it is simply a structure, but you do tell it that TST is the expand field, but there is no field of this name in your internal for the header, so add it like this.
DATA : BEGIN of ty_hdr,
kunnr TYPE vbak-kunnr,
name1 TYPE kna1-name1,
netwr TYPE vbak-netwr,
<b>TST type c,</b>
END of ty_hdr,
Doing so should make you program work correctly.
Regards,
Rich Heilman
Message was edited by:
Rich Heilman -
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. -
Problem with printing ALV lists
Hey Guys,
I have a problem with printing ALV lists ,
I created a report with several ALV lists (not grids) on the same screen but when i attempt to print the report
it prints each alv list on a different page..so if i have 3 alv lists in the same report it will print the report on 3 pages
How can i print them all in one page?
Thanks in advance
Noha Salah.Hey Max,
I tried setting the Layout-list_append before my block_list_append function call
And setting the is_print-NO_NEW_PAGE , it printed the 3 lists on one page the only problem i have
is that the lists are truncated and the list formats has totally been messed up..how can i restore them back
to their original format? -
Printing ALV list with ADS (pdf printer) in non-english charset
Hello!
I have an issue about printing alv list with pdf printer in non-english charset. We have two printers. One for alv lists (SWINCF: Casc.Fonts SAPWIN Unicode) and one for pdf forms(adobe document service). I want to use one printer for any documents. But PDF printer prints non-english charset like ########.
What can I do ?Hi, Roman!
I want to use PDF printer for both types of output. I have a dedicated java instance for ADS.
There is a device type for our Kyocera Printer. My pdf printer prints ALV list good exept russian charset.
It prints like ##### -
Couldn't print header of ALV list
Hi All,
I couldn't print header for the alv list. Code is below.
REPORT ztest123456 .
TYPE-POOLS: slis.
DATA: wa_fieldcat TYPE slis_fieldcat_alv,
g_t_tfieldcat TYPE slis_t_fieldcat_alv,
itab1 TYPE STANDARD TABLE OF cdhdr,
g_t_event TYPE slis_t_event,
wa_event TYPE slis_alv_event,
g_pos TYPE i VALUE 1,
head TYPE slis_t_listheader,
wa_head TYPE slis_listheader.
START-OF-SELECTION.
SELECT * FROM cdhdr INTO TABLE itab1
WHERE objectclas = 'COND_A'
AND tcode = 'VK12'.
SORT itab1 BY objectclas.
wa_head-typ = 'H'.
wa_head-info = 'Records in cdhdr table'.
APPEND wa_head TO head.
PERFORM sub_fldctlg USING: 'OBJECTCLAS' 'ITAB1' 13 'Object class'.
FORM sub_fldctlg *
FORM sub_fldctlg USING u_fname TYPE slis_fieldcat_alv-fieldname
u_tname TYPE slis_fieldcat_alv-tabname
u_outlen TYPE slis_fieldcat_alv-outputlen
u_seltext TYPE slis_fieldcat_alv-seltext_l.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = g_pos. "Column Position
wa_fieldcat-fieldname = u_fname. "Field Name
wa_fieldcat-tabname = u_tname. "Table Name
wa_fieldcat-outputlen = u_outlen. "Output column Length
wa_fieldcat-seltext_l = u_seltext. "Column Header
g_pos = g_pos + 1. "Incrementing column position
APPEND wa_fieldcat TO g_t_tfieldcat. "Appending field Catalog
ENDFORM.
*& Form sub_top
FORM sub_top.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = head.
ENDFORM. " sub_top
END-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
IMPORTING
et_events = g_t_event.
READ TABLE g_t_event INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
IF sy-subrc EQ 0.
wa_event-form = 'SUB_TOP'.
MODIFY g_t_event FROM wa_event INDEX sy-tabix.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = g_t_tfieldcat
it_events = g_t_event
TABLES
t_outtab = itab1.
Thanks in advance.Hi,
The issue is resolved. I just pass the program name (SY-REPID) through a variable to the function module that displays list/grid. I came to know that these system variable behavior is UN-predictable in SAP and hence passed program name through a global variable instead of using a system variable value.
Thanks..
Maybe you are looking for
-
Body text appearing as TNR, not the default font
I'm having a problem with the font settings with mail sent from Mail. I've set the default font to Arial, but all emails sent to other people (using Outlook under WinXP) see it as Times New Roman. I've even specifically selected Arial from the Font P
-
How do i generate the TTL pulse from PCI 6024E DAQ card
Hi, I'm trying to write a program which generates a single TTL pulse when it is run. My goal is to generate the pulse, send it to the output channel of my PCI 6024E DAQ card, and then use a BNC cable, to display the signal on the oscilloscope. I have
-
BB Curve - homescreen data/calendar view - nothing shows up!
Hello - I have the BB Curve. I have my front screen set so that I can see the calendar and my appointments. I have been putting my appointments in, but they are not showing on the front page! I know I Have multiple calendars because I have multipl
-
Calculated key figures in manual planning
I'm trying to set up a Material Planning system using BPS. One of the requirements my customer wants is that in the manual planning he can both modify a multiplier as well as one of the resulting amount key figures. The multiplier is used to calculat
-
Hi All, I have been trying to set 3 decimal places in prices in sales documents. I got the reference to Note # 38881. This is what I did: 1. Create a new currency US$ and set the decimal places to 3 2. Maintained the prices using VK11. 3. Changed the