Problem in Grouping the ALV output
Hi Experts
I want to group the ALV Grid output Division wise
for that I have written following code
wa_sort-spos = '1'.
wa_sort-fieldname = 'REGIOAREA' .
wa_sort-tabname = 'IT_FINAL' .
wa_sort-up = 'X'.
wa_sort-group = '*'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO it_sort .
CLEAR wa_sort.
I m passing it_sort table in the FM for sorting but output is not getting grouped can you please
tell me what is the problem ?
How to group the report ?
Helpful answers will be highly rewarded
Regards
Bikas
Hi ,
I also have the similar way coded .
DATA: s_sort TYPE slis_sortinfo_alv.
CLEAR s_sort.
s_sort-fieldname = rv_fieldname.
s_sort-spos = rv_spos.
s_sort-up = c_x.
s_sort-group = c_underline.
APPEND s_sort TO rt_sort.
CLEAR s_sort.
I don't have a subtotal for that fiels .
It works for me .
Similar Messages
-
Problem while downloading the alv output to excel file.
Hii,
While downloading the alv output to an excel file i am facing a problem. Either the output comes as 1.23456E+11 or the values get cut .
Cant put in txt file as the users require to calculate directy and i have even tried to increase the output length .But both doesnt help.
So what are the other ways to do so.
Edited by: mansi_v27 on Mar 24, 2010 12:35 PMHi,
Welcome to SCN!!!.
Please go through the forum rules. This has been discussed many times. You can search in the forum for this.
Infact there is no problem. Just expand that excel cell. You can see the full value. This is standard excel property.
Thanks,
Vinod. -
How to extract in the ALV output the old data using EXTRACT
Dear Friends,
I have requiremnt where the user executes the report -
using REUSE_ALV_GRID_DISPLAY FM. On the output
i have given an option to user to edit values on the output. So user will edit the values and updating to the data base this
the functionality which we have given to the custom report till now . Now the user came back and asking to provide a SAVE
option on the ALv output so that before updating the total records to the database he can re edit the values which he
has entered previous day . To do this functionality i have read in ALV documentation using the EXTRACT- INCLUDE vex01top.
I have added this but iam not getting exactly how to do this option when the user saves on the ALV output how can he retrive back the saved data on to the output again( i.e on the ouput screen) using the Extract functionality . If any body has done this
do help me . I would like to know should we maintain any custom table for this,for saving the records when user press
save button? .
Thanks & Regards
Madhuri.> i have read in ALV documentation using the EXTRACT- INCLUDE vex01top.
I don't know where you got that. You have to define your own GUI status (first, copy it from standard status STANDARD_FULLSCREEN of function group SLVC_FULLSCREEN) with your button, and define as follows:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'USER_STATUS' EXCLUDING rt_extab.
ENDFORM. "set_pf_status
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF r_ucomm = 'SAVE'.
ENDIF.
ENDFORM.
> I would like to know should we maintain any custom table
Of course. Create your own custom table. Where else do you want to store data? -
New column in the ALV output of transaction phap_admin_pa
Hello All,
I want to display a new column in the ALV output of transaction phap_admin_pa. Is this possible? If so, could anyone please give some guidance how to proceed. The new column willl contain the elements from appraisal catalog. Do u think there will be any BADi's to achieve this or I am not sure if a custom program need to be created?
Thank you very much,
RushHi
I had same problem of adding felds from additional data into the ALV and when I asked SAP they told me to implement BADI HRHAP00_REPORTING.
I am still trying to get some info on how to implement it if you find any documentation of someone who has implemented appreciate you tell me.
regards
Pravin -
Total is not getting displayed in the ALV output.
Hi,
Total is not getting displayed in the ALV output.
I m using :REUSE_ALV_BLOCK_LIST_APPEND & REUSE_ALV_BLOCK_LIST_DISPLAY
Are there any issues with it as the same settings are working fine with REUSE_ALV_LIST_DISPLAY
source code:
DATA: layout TYPE slis_layout_alv,
IT_eventS TYPE slis_t_event,
fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
rec_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
TYPES: BEGIN OF ty_tab,
belnr TYPE dberchz-belnr,
belzart TYPE dberchz-belzart,
net TYPE dberchz-nettobtr,
END OF ty_tab.
DATA: lt_tab TYPE STANDARD TABLE OF ty_tab.
SELECT belnr belzart nettobtr
FROM dberchz
INTO TABLE lt_tab[]
WHERE belnr eq '000000000001'.
if sy-subrc ne 0.
ENDIF.
* defining layout
layout-colwidth_optimize = 'X'.
layout-def_status = 'X'.
*defning event
*event
*defining field catalog
fcat-col_pos = 1.
fcat-fieldname = 'BELNR'.
fcat-tabname = 'LT_TAB'.
APPEND fcat.
fcat-col_pos = 2.
fcat-fieldname = 'BELZART'.
fcat-tabname = 'LT_TAB'.
APPEND fcat.
fcat-col_pos = 3.
fcat-fieldname = 'NET'.
fcat-tabname = 'LT_TAB'.
fcat-do_sum = 'X'.
APPEND fcat.
*calling alv
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = 'YZ_PLR'
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* IT_EXCLUDING =
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = layout
it_fieldcat = fcat[]
i_tabname = 'LT_TAB'
it_events = IT_EVENTS[]
* IT_SORT =
* I_TEXT = ' '
tables
t_outtab = lt_tab[]
* EXCEPTIONS
* PROGRAM_ERROR = 1
* MAXIMUM_OF_APPENDS_REACHED = 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_BLOCK_LIST_DISPLAY'
Thanks,
GauravHi
No I don't think, this is my code (based on your code) and it works fine:
TYPE-POOLS SLIS.
DATA: BEGIN OF LT_TAB OCCURS 0,
BELNR LIKE BSEG-BELNR,
GJAHR LIKE BSEG-GJAHR,
WRBTR LIKE BSEG-WRBTR,
WAERS LIKE BKPF-WAERS,
END OF LT_TAB.
DATA: LAYOUT TYPE SLIS_LAYOUT_ALV,
IT_EVENTS TYPE SLIS_T_EVENT,
FCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
REC_FCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
START-OF-SELECTION.
FCAT-COL_POS = 1.
FCAT-FIELDNAME = 'BELNR'.
FCAT-TABNAME = 'LT_TAB'.
FCAT-REF_FIELDNAME = 'BELNR'.
FCAT-REF_TABNAME = 'BSEG'.
APPEND FCAT.
FCAT-COL_POS = 2.
FCAT-FIELDNAME = 'GJAHR'.
FCAT-TABNAME = 'LT_TAB'.
FCAT-REF_FIELDNAME = 'GJAHR'.
FCAT-REF_TABNAME = 'BSEG'.
APPEND FCAT.
FCAT-COL_POS = 3.
FCAT-FIELDNAME = 'WRBTR'.
FCAT-TABNAME = 'LT_TAB'.
FCAT-CFIELDNAME = 'WAERS'.
FCAT-REF_FIELDNAME = 'WRBTR'.
FCAT-REF_TABNAME = 'BSEG'.
FCAT-DO_SUM = 'X'.
APPEND FCAT.
FCAT-COL_POS = 4.
FCAT-FIELDNAME = 'WAERS'.
FCAT-TABNAME = 'LT_TAB'.
FCAT-REF_FIELDNAME = 'WAERS'.
FCAT-REF_TABNAME = 'BKPF'.
FCAT-DO_SUM = SPACE.
APPEND FCAT.
SELECT * FROM BSEG INTO CORRESPONDING FIELDS OF TABLE LT_TAB
WHERE BUKRS = 'MAAB'
AND BELNR = '0000000001'.
LT_TAB-WAERS = 'EUR'.
MODIFY LT_TAB FROM LT_TAB TRANSPORTING WAERS WHERE WAERS = SPACE.
*CALLING ALV
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = 'ZPROVAMAX5'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FCAT[]
I_TABNAME = 'LT_TAB'
IT_EVENTS = IT_EVENTS[]
TABLES
T_OUTTAB = LT_TAB[].
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
I've also inserted a currency field
Max -
Some fields are missing in the ALV output
Hi ,
I have created a normal ALV report using REUSE_ALV_GRID_DISPLAY . It shows the output correctly. But when I take the prin out or download to an excel sheet some fields are not there. Can I know how to solve this issue ?
Regards,
Beenahi Beena,
If you are downloading the ALV output to excel, please make sure that the DDIC structure is passed as a parameter to the REUSE_ALV. I doubt you are creating field catalog from the program and that DDIC structure is not used.
Hope this helps,
Sajan Joseph. -
Is it possible to create the ALV output with dropdown list for the columns
Hi forum experts,
Could the ALV output contain the dropdown list for the column names? if yes, then how we can acheive this to happen.
Thanks in advance,
Regards,
Samad.
Edited by: Samad arif on Aug 21, 2009 4:40 PMHi Arif,
Yes we can .FOr the codding check the article,
[dropdowns in ALV|https://wiki.sdn.sap.com/wiki/display/Snippets/DropdownsinALV]
regards,
Archana
Edited by: Archana Kumari on Aug 21, 2009 1:22 PM -
How to put the alv output into the spool request?
Hi guys,
How to put the alv output into the spool request?
Thanks!Hi
Sending an ALV List screen output to SPOOL
Convert ALV list to PDF and send mails to respective persons
Regards
Pavan -
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! -
Want to save the alv output in local file
Hi,
i want to save the alv output to local file throuh menu.
in out put
system>LIst>save
using oops alv
Regards
Jagadeeshwar.BHi,
I get the following dump when i try to download alv output to local file.Please suggest what is to be done:-
Runtime Errors PERFORM_NOT_FOUND
Except. CX_SY_DYN_CALL_ILLEGAL_FORM
Date and Time 09/23/2008 22:09:28
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_FORM', was
not caught in
procedure "METHOD_PRINT_TOP_OF_PAGE" "(FORM)", nor was it propagated by a
RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The program "SAPLSLVC_FULLSCREEN" is meant to execute an external PERFORM,
namely the routine "TOP_OF_PAGE_BATCH " of the program "ZRTCLT06_ALV ", but
this routine does not exist.
Line SourceCde
133 endif.
134
135 export alv_form_html from abap_false
136 to memory id 'ALV_FORM_HTML'.
137
138 endform. " METHOD_END_OF_LIST
139 &----
140 *& Form METHOD_PRINT_TOP_OF_PAGE
141 &----
142 * text
143 ----
144 * --> p1 text
145 * <-- p2 text
146 ----
147 form method_print_top_of_page using value(i_table_index) type syindex.
148
149 if gt_grid-r_salv_fullscreen_adapter is bound.
150 if not gt_grid-i_callback_top_of_page is initial and
151 not i_callback_program is initial.
152 perform (gt_grid-i_callback_top_of_page)
153 in program (i_callback_program) using i_table_index.
154 endif.
155 else.
156 if not gt_grid-i_callback_top_of_page is initial and
157 not i_callback_program is initial.
158 perform (gt_grid-i_callback_top_of_page)
159 in program (i_callback_program).
160 endif.
161 endif.
162
>>>> endform. " METHOD_PRINT_TOP_OF_PAGE
164 ----
165 * FORM METHOD_PRINT_END_OF_LIST *
166 ----
167 * ........ *
168 ----
169 form method_print_end_of_list.
170 if not gt_grid-i_callback_end_of_list is initial and
171 not i_callback_program is initial.
172 perform (gt_grid-i_callback_end_of_list)
173 in program (i_callback_program).
174 endif.
175
176 endform. " METHOD_PRINT_END_OF_LIST
177 &----
178 *& Form METHOD_DOUBLE_CLICK
179 &----
180 * text
181 ----
182 * --> p1 text -
hi friends,
Here is my query on a Alv Report output display
I have two internal tables i_vbak and i_vbap
i_vbak contains the fields and value as
vbeln kunnr auart audat bstnk vkorg
1000066 1000071 ze0r 20070918 Itest1 PA11
1000067 1000072 ze0r 20070919 SLA-Test1 PA11
i_vbap contains the field and value as
VBELN MATNR ARKTX
1000066 SAMPLE MATERIAL1 Sample Material for reports
1000066 SAMPLE MATERIAL Sample Material for reports
1000066 TEST MATERIAL Test Material for reports
1000067 SAMPLE MATERIAL Sample Material for reports
1000067 TEST MATERIAL Test Material for reports
1000067 SAMPLE MATERIAL1 Sample Material for reports
I have a another internal table called inv_final which contain all these fields and respective values to display in the alv output.Here i am giving only two field how it whould come in alv output.
Sold to Patry(kunnr) Sales Doc No(vbap-vbeln) Material Name(matnr)
1000071 1000066 Sample Material1
1000071 1000066 Sample Material
1000071 1000066 Test Material
1000072 1000067 Sample Material
1000072 1000067 Test Material
1000072 1000067 Sample Material1
If anybody have done similay kind of repore than help me with the code,or else if anybody having any idea to solve this out than help me.I have only prob with the logic bofore the final table display in the alv output.
Helpful answer will be rewardad generously.
Thanks a lot
mrutyun^Hi
Put all the fields in to an internal table and disply only your required fields.
Kuntal -
How to insert blank lines in the ALV output.
Hi Friends,
Could any body help me out How to insert blank lines in the ALV output.?? Any Code pls...
Thank you,
Vikram.Chi vikram
do like this
In the fieldcatalog table all the fields should be in editable mode
ie lw_fcat-edit = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
is_layout = lv_layout
it_fieldcat = lt_fcat[]
i_save = 'A'
is_variant = lv_variant
TABLES
t_outtab = lt_license[]
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_data
*& Form user_command
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'ADD'. "
data: lv_ind type i.
data: lv_line type i.
describe table lt_license lines lv_line.
loop at lt_license into lw_license.
lv_ind = sy-tabix.
if lv_ind = lv_line.
append initial line to lt_license.
endif.
endloop.
ENDCASE.
ENDFORM. "user_command
reward points if useful
Rohan -
Function Module to edit the ALV Output
Hi,
I have an ALV report output.I need the edit values based on some conditions in the ALV output and
save the changes. Is there any function module to edit the output and proceed further.
Thanks in advance.
Regards,
NavasFirst create the field catalog of the field that you want to edit in this way
WA_fieldcat-fieldname = 'MENGE'.
WA_fieldcat-qfieldname = 'MEINS'.
WA_fieldcat-seltext_m = 'PO Quan.'
WA_fieldcat-edit = 'X' .
Secondly you keep a custom button like 'SAVE' in the toolbar and also try to keep a checkbox in your ALV.
for checkbox you have to keep a following code snippet in your finallly displayed interanal table:
chk(1) TYPE c, and in the fieldcatalog you have to write following piece of code
WA_fieldcat-fieldname = 'CHK'.
WA_fieldcat-seltext_m = 'CheckBox'.
WA_fieldcat-checkbox = 'X'.
WA_fieldcat-edit = 'X' .
WA_fieldcat-input = 'X'.
WA_fieldcat-tabname = 'IT_FINAL'.
WA_fieldcat-col_pos = 1.
then you have to set the parameter i_callback_user_command = 'USER_COMMAND'
of FM REUSE_ALV_GRID_DISPLAY.
Then write a subroutine like the following one to handle the SAVE operation
FORM user_command USING I_r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA:l_cntr TYPE i.
CASE I_r_ucomm.
WHEN '&ZXZ'.
CLEAR l_cntr.
CLEAR WA_final.
LOOP AT IT_final INTO WA_final.
IF WA_final-chk = 'X'.
l_cntr = l_cntr + 1.
ENDIF.
ENDLOOP.
IF l_cntr GT 1.
MESSAGE i011.
ELSEIF l_cntr = 1.
READ TABLE IT_final INTO WA_final WITH KEY chk = 'X'.
MODIFY IT_final FROM WA_final TRANSPORTING menge
WHERE chk = 'X'.
CLEAR WA_final.
PERFORM disp_alv. <<<This is to display the refreshed alv after saving your data
endif.
ENDCASE.
ENDFORM. -
Dump while downloding the ALV output
Hi,
My requirement is to Develop an ALV report with new Function Keys in the Application Toolbar of the ALV.
For that I have copied the Status of the program 'SAPLSLVC_FULLSCREEN' Status - 'STANDARD_FULLSCREEN' and added few more Function Key's on the Application Toolbar. The new Key's added are working fine but when I try to download the ALV Output using the Download file option on the application toolbar its giving and dump saying 'Field symbol has not yet been assigned'
Runtime Errors GETWA_NOT_ASSIGNED.
Regards,
Ramu N.Hi, Add this code to the alv report. the report will get downlaoded as an excel sheet to ur hard drive.
FORM DOWNLOAD .
DFILENAME = 'D:\log.xls'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = DFILENAME
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ','
TABLES
DATA_TAB = IT_MDKP
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " DOWNLOAD
REWARD POINTS IF USEFUL -
How to display the ALV output in a Group format
Hello Experts,
I have my current ALV report output like this:
GROUP DESCRIPTION
group1 adsfadsfadsfa
group1 lkjadsfjlajdsfla
group1 adsfadsfadsf
group1 adsfadsfadfa
group2 adsfadsfafaa
group2 oiueworuowe
group2 zxvzcxvzvcsd
group2 oiuqoewruqw
And I need to display the output of my ALV report in a group format like this:
GROUP DESCRIPTION
group1 adsfadsfadsfa
lkjadsfjlajdsfla
adsfadsfadsf
adsfadsfadfa
group2 adsfadsfafaa
oiueworuowe
zxvzcxvzvcsd
oiuqoewruqw
Can anybody please let me know if there is any sample program/thread/help etc.
I grealty appreciate your help.
Thanks.Hi Rainer,
Thanks for the reply. I am using container for the ALV Display.
So I wrote my code lie this:
sort t_data by zgroup zdesc ( t_data is my output internal table) .
I have my ALV layout delcared like this:
data: alv_layout type lvc_s_layo.
So I have modified my code like this:
alv_layout-NO_MERGING = 'X'.
But it did'nt work. Please let me know if I need make any other changes.
Thanks again.
Maybe you are looking for
-
How do I facetime with the same email address on the Apple product?
-
In Forms 10g, Item Prompts don't appear completely inside frames
I have created a data block and a form layout by using the assistants. If I open the layout editor inside Forms Developer, I can see that the item prompts are completely contained inside the frame. However, when I run the form, some of the item promp
-
BootCamp Problem - Windows 8 On Macmini3,1
Good day to you all I have Macmini3,1 with 4Gb Ram and i want to install windows 8. i went to find a manual in the web and found out this one : http://www.pocket-lint.com/news/45898/how-to-install-windows-8-on-a-mac first of all i don't have this scr
-
Non-compressed aggregates data lost after Delete Overlapping Requests?
Hi, I am going to setup the following scenario: The cube is receiving the delta load from infosource 1and full load from infosource 2. Aggregates are created and initially filled for the cube. Now, the flow in the process chain should be: Delete inde
-
1280x720 video on screen getting squished on top and bottom
Premiere CS4. I exported a 1280x720 video to play on a LCD TV with the following settings in the attached. The TV is set to play 16:9. I have it set to square pixels since the zip file with the video is playing the video file, not a dvd player. Bu