How we can sort subtotal results value in abap alv report
Hi, How we can sort subtotal results value in abap alv report
Thanks a lot for your code
but i am still getting double and weird results.
Subtotal IN PARTY KGS TOTAL VALUE
1 40008 3,141.20 192,799.00
1 40008 16,681.06 1,908,659.00
Subtotal 1 19,822.25 2,101,458.00
10 40022 4,590.60 531,228.00
10 40022 3,448.27 377,173.00
Subtotal 10 8,038.87 908,401.00
100 40010 270.172 19,852.00
Subtotal 100 270.172 19,852.00
101 40036 752.898 61,051.00
101 40036 207.586 19,431.00
Subtotal 101 960.484 80,482.00
102 40048 325.936 32,154.00
102 40048 264.32 19,364.00
Subtotal 102 590.256 51,518.00
103 40066 216.134 18,088.00
Subtotal 103 216.134 18,088.00
104 40001 231.96 16,986.00
Subtotal 104 231.96 16,986.00
105 40021 585.918 65,461.00
105 40021 108.683 15,825.00
Subtotal 105 694.601 81,286.00
106 40046 209.777 15,341.00
Subtotal 106 209.777 15,341.00
107 40043 167.353 14,755.00
Subtotal 107 167.353 14,755.00
108 40046 153.023 14,343.00
108 40046 342.348 32,223.00
Subtotal 108 495.371 46,566.00
109 40008 184.085 13,483.00
Subtotal 109 184.085 13,483.00
11 40011 5,275.63 524,232.69
11 40011 6,723.28 643,911.82
Subtotal 11 11,998.90 1,168,144.51
110 40067 142.113 13,333.00
110 40067 492.883 44,428.00
Subtotal 110 634.996 57,761.00
111 40040 118.961 13,190.00
111 40040 492.433 60,029.00
Subtotal 111 611.394 73,219.00
Edited by: Timaji Sawant on Feb 16, 2012 12:16 PM
Edited by: Timaji Sawant on Feb 17, 2012 9:27 AM
Similar Messages
-
I have audiobook of abt.500 files, all titles are the name of the book. iPhone music player does not understand sorting by file names, but by title, hterfore it plays files chaotic. So, how I can sort audiobook files in music player by file name, not by title name?
I have the same problem.
I've went through the pains of merging all chapters into one big file for each and every audiobook, so that at least the chapters don't get played in random order. Month and month of work….. In iTunes 12.01. I can now order my audiobooks by title or by author.
But once they're uploaded to my blo*dy expensive iPhone 6Plus 128 (which I bought especially to have all my music and my audiobooks on one device) my audiobooks are NOT sorted by author, but by Title.
So, let's say I have 15 books by Ken Follet, they don't appear as Ken Follet > Title of the book but they are sorted alphabetically with all the other titles of other authors.
iPods where originally designed for music and audiobooks, but each and every version of iOS makes handling your music and especially your audiobooks harder and harder….
I am very disappointed and after so many years of using apple, I am considering to move on to android devices. -
Hi iam using IPHONE4 , when i coonect it to my PC , itunes get hang and don't detect my iphone , how i can sort out this issue plz help me
iPhone, iPad, or iPod touch not appearing in iTunes
-
How I can sort all columns alphabetically? in Itunes
How I can sort all columns alphabetically? in Itunes
I have the same problem.
I've went through the pains of merging all chapters into one big file for each and every audiobook, so that at least the chapters don't get played in random order. Month and month of work….. In iTunes 12.01. I can now order my audiobooks by title or by author.
But once they're uploaded to my blo*dy expensive iPhone 6Plus 128 (which I bought especially to have all my music and my audiobooks on one device) my audiobooks are NOT sorted by author, but by Title.
So, let's say I have 15 books by Ken Follet, they don't appear as Ken Follet > Title of the book but they are sorted alphabetically with all the other titles of other authors.
iPods where originally designed for music and audiobooks, but each and every version of iOS makes handling your music and especially your audiobooks harder and harder….
I am very disappointed and after so many years of using apple, I am considering to move on to android devices. -
How can we place a push button in ALV report
hi
could anybody inform me
how can we place a push button in ALV report
thanx
regards
kals.Hi kals.
please have a look at demoprogram
SALV_DEMO_TABLE_FUNCTIONS
BCALV_GRID_05
Regards
Bernd -
How to give no of lines per page in alv report
hi
could anybody tell me
how to give no of lines per page in alv report
i need bottom of page too
if possible plz send the code too
it ll be very helpful to me
thanx
kals.Hi,
This is possible, using some of the events in the ALV.
You could use AFTER_LINE_OUTPUT event and call you form after say, a certain line count is reached on the list output.
MOVE 'AFTER_LINE_OUTPUT' TO gw_event-name.
MOVE 'AFTER_LINE_OUTPUT' TO gw_event-form.
APPEND gw_event TO gt_events.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_events = gt_events[]
and define the form for each event as follows - this would be a dynamic call by the ALV.
*& Form after_line_output
* Form for the After Line Output Event in the internal table
* --> rs_lineinfo
FORM after_line_output USING rs_lineinfo TYPE slis_lineinfo.
IF sy-linno eq v_linno. "Defaulted value for line count
perform write_footer.
NEW-PAGE.
ENDIF.
ENDFORM. " after_line_output
For lines per page:
rs_lineinfo-tabindex would give you the index of the current line in the list, which you could use to read the t_outtab table, and reduce the line count of items displayed on the earlier page.
There are a few other events too, like BEFORE_LINE_OUTPUT and END_OF_LIST which you can use as required and print the data.
Regards,
Anil. -
How to get sum for each currency's in ALV Report
Hi,
A column has amounts with various currency's.
May I know how to get sum quantity for each currency in ALV Report?
Thanks in advance.Hi,
Currency value column should have reference to currency code column.
Regards,
Wojciech -
How to save data in ztable after editing in alv report
how to save data in ztable after editing in alv report?
Hi,
Please find the attachment below.This may be usefull to you.
[http://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database%28OOPS%29]
Regards,
Ramakrishna Yella. -
How to display the Overall result value at the top of work book
Hi,
How can i display the value of Overall result(Sum of the Total) column at the top of the work book in Text field.
Thanks
SreadharGo to Query Global properties in Query designer and you can find a setting to show result rows on top. This setting will show overall result as first row in the report. But I don't think you can show it in Text field in WB.
-
How I can displsy the results in a nice readable format
I have this query in a cursor
I is displaying the data like this
Major/Minor RestrictionEnglish English and Theater Envir St-English
How I can make it to display something like this
Must be enrolled in one of the following Majors:
English, English and Theater, Envir St-English
looks easy but the descripton come from the union (cllumn stvmAjr_desc)
SELECT
DISTINCT
ssrrmaj_major_ind,
DECODE (
ssrrmaj_major_ind,
'I', g$_nls.get ('BWCKSCH1-0088',
'SQL',
'Must be enrolled in one of the following Majors:' ,'<BR />'
'E', g$_nls.get ('BWCKSCH1-0089',
'SQL',
'May not be enrolled in one of the following Majors:','<BR />'
indicator1
FROM ssrrmaj,
scbcrse,
ssbsect
WHERE scbcrse_subj_code = ssbsect_subj_code
AND SCBCRSE_CRSE_NUMB = ssbsect_crse_numb
AND ssrrmaj_crn = ssbsect_CRN
--- AND ssrrmaj_majr_code = stvmajr_code
AND ssrrmaj_term_code = ssbsect_term_code
AND ssrrmaj_major_ind IS NOT NULL
and SSRRMAJ_TERM_CODE = term
and ssbsect_subj_code = subj
and ssbsect_crse_numb = crse_numb
UNION
SELECT
DISTINCT
stvmajr_code,
stvmAjr_desc
FROM ssrrmaj,
scbcrse,
ssbsect,
stvmajr
WHERE scbcrse_subj_code = ssbsect_subj_code
AND SCBCRSE_CRSE_NUMB = ssbsect_crse_numb
AND ssrrmaj_crn = ssbsect_CRN
AND ssrrmaj_majr_code = stvmajr_code
AND ssrrmaj_term_code = ssbsect_term_code
and SSRRMAJ_TERM_CODE = term
and ssbsect_subj_code = subj
and ssbsect_crse_numb =crse_numb
ORDER BY ssrrmaj_major_ind DESC;
the second query display the data after the union
like this
1250 Earth and Oceanographic Sci
1310 English and Theater
1300 English
1450 Envir St-English
I guess I can deal with the dis play like
this I only need the desc not the code
Earth and Oceanographic Sci
English and Theater
English
Envir St-English
This is how I am displaying the results, the results are correct, I just need to diaplay the data in a more friendly format
HTP.p ('<h4>Major/Minor Restriction</h4>');
FOR ssrrmaj_major_REC IN ssrrmaj_major_c (term_in,ssbsect_rec.ssbsect_subj_code,ssbsect_rec.ssbsect_crse_numb)
LOOP
IF ssrrmaj_major_REC.ssrrmaj_major_ind IS NOT NULL
THEN
----HTP.p ('<h4>Major/Minor Restriction</h4>');
twbkfrmt.p_printtext (ssrrmaj_major_REC.indicator1); HTP.p ('<BR />') ;
ELSE
HTP.p ('<h4>Major/Minor Restriction N/A</h4>');
END IF;
END LOOP ;Just a thought...I suggest to use XSLT for doing these type of formatting. Its more flexible to get XML for te query columns and then define the formatting at XSLT level. This way you dont have to keep changing the procedure or query. Just XSL change will do the job..
-
How to give range value and different value in headerof alv report
Hi All,
If User is giving range value 10 to 20 and also wants 25 28 30 and these all values should be displayed in Alv header.How is it possible.I have tried by using if variable-option eq 'BT'
elseif variable-option eq 'EQ'.then individually it is running fine but if user is giving both the option then differnt code is to be executed.
Can you please suggest me how it can be possible.
in header it should display as
Values: 10-20,25,28,30.
Edited by: RahulP5 on Dec 27, 2011 2:57 PMHi Rahul,
define the ALV grid for the maximum possible columns. Populate internal table as per selection requirements. Before displaying, set all empty columns to TECHNICAL = 'X'.
You may use this routine to do it as fast as possible:
*& Form alv_fcat_tech_initial
* mark initial columns as tech
FORM alv_fcat_tech_initial
USING pt_list TYPE table
CHANGING pt_fieldcat TYPE slis_t_fieldcat_alv.
FIELD-SYMBOLS:
<rec> TYPE ANY,
<fld> TYPE ANY,
<fcat> TYPE LINE OF slis_t_fieldcat_alv,
<name> TYPE fieldname.
DATA:
lt_fieldname TYPE SORTED TABLE OF fieldname
WITH UNIQUE KEY table_line.
* get fields
LOOP AT pt_fieldcat ASSIGNING <fcat>.
INSERT <fcat>-fieldname INTO TABLE lt_fieldname.
ENDLOOP." at pt_fieldcat assigning <fcat>.
* scan table
LOOP AT pt_list ASSIGNING <rec>.
LOOP AT lt_fieldname ASSIGNING <name>.
ASSIGN COMPONENT <name> OF STRUCTURE <rec> TO <fld>.
CHECK NOT <fld> IS INITIAL.
DELETE lt_fieldname.
ENDLOOP." at lt_fieldname assigning <name>.
ENDLOOP." at pt_list assigning <rec>.
LOOP AT pt_fieldcat ASSIGNING <fcat>.
READ TABLE lt_fieldname TRANSPORTING NO FIELDS
WITH TABLE KEY table_line = <fcat>-fieldname.
CHECK sy-subrc = 0.
<fcat>-tech = gc_true.
ENDLOOP." at pt_fieldcat assigning <fcat>.
ENDFORM. "alv_fcat_tech_initial
Regards,
Clemens -
How to separate debit and credit values in gl statement report (daywise)
hi
experts,
i have report.
selection criteria is
chars of account.
gl account
date .
how to separate debit and credit values in gl statement?.(i know there is a indicator shkzg).
but send me code.
op
date, total credit,total debit , balances.
also calculate opening and closing balance.
u created such type of report then plz help me.
thanks®ards.\
ajay.Hi,
Usually it can be determined using the field shkzg. If it contain 'S' its debit and if it contains 'H' then its credit.
Before showing the amount you need to do like;
IF wa_gl-shkzg = 'H'.
wa_gl-dmbtr = wa_gl-dmbtr * (-1). " dbmtr - amount
ENDIF.
This will solve your problem.
Regards
Karthik D
Edited by: Karthik D on Jun 3, 2009 12:29 PM -
How can give the user defined parameter in alv report
Hi experts
I have created one alv report for Sale Order statement.In this alv report have different input parameters
My problem is in this alv i have two input field Sales Orgaization and Plant.When I set this parameter value in user details it snot affected in my alv report.But it is affected in the standard alv report.How can
i rectify this
Regards
Manojhi
i think don't use set parameter value, use there SUBMIT & RETURN statement and write in USER_COMMAND function.
FORM USER_COMMAND USING P_UCOMM LIKE SY-UCOMM
P_SELFIELD TYPE SLIS_SELFIELD.
SUBMIT program name AND RETURN
WITH <selection-screen field> IN <selection-screen field>
WITH WERKS IN WERKS .
ENDFORM .
Regards,
Abhi -
How to disable sorting for some columns in a ALV GRID?
Hi i have requirement where I have to disable sorting for some columns in a ALV GRID. i am using REUSE_ALV_GRID_DISPLAY function module.
Can anybody help me. how to acieve this? Any code snippets will really be appreciated.Hi,
I have tried this but not completely successful. I think this can be done using the OOPS method.
DATA: it_event_exit TYPE slis_t_event_exit.
DATA: w_exit TYPE slis_event_exit.
w_exit-ucomm = '&ODN'.
w_exit-before = 'X'.
CLEAR w_exit-after.
APPEND w_exit TO it_event_exit.
w_exit-ucomm = '&OUP'.
w_exit-before = 'X'.
CLEAR w_exit-after.
APPEND w_exit TO it_event_exit.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_callback_top_of_page = 'ALV_TOP_OF_PAGE'
i_callback_html_top_of_page = 'ALV_HTML_TOP_OF_PAGE'
i_callback_user_command = 'USER_COMMAND' <- User command form
is_layout = wm_layout
it_fieldcat = wt_fieldcat
it_events = i_events
it_event_exit = it_event_exit <- Need to fill
it_sort = wt_sort
i_default = 'X'
Now you can capture this events in the user command
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF r_ucomm = '&OUP' and rs_selfield-SEL_TAB_FIELD = 'Your field name'.
ENDIF.
ENDFORM. "user_command
In this form you will get the function code in 'r_ucomm' and the field selected for sorting in 'rs_selfield-SEL_TAB_FIELD'. But reseting 'r_ucomm' will not work.
May be somebody else can give some help on this.
But this will work if you follow the oop method.
Please see this document for more info.
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf
Thanks
Vinod -
How to read Filter selection variable values into ABAP code
HI IP Gurus,
Requierement: In my filter characterstics, i have assigned variables, which use will enter when running th e planning sequence.
so variable values entered by user , i would like to get those values into ABAP code and pass them to some function module.
SO please give me step by step detail how to achive this.
MY understanding use the below method . but not sure how to proceed.Please let me know abap code to get values.
GET_TAB_PARAM_DATA_SEL and GET_PARAM_DATA_SEL.
Please help me.
Thanks in advance.Will Assign points
SaniaHi Srinivas,
So In RSPLF1 , in paramters tab, Do i have create structure(str1) and then create component Data selection (Dtsel1) under str1(what setting i have to do here, where should i enter variable value and do i need to give info object name and how do it in code.i tried to following example, not able to get any values in tab_sel .
It will be great, if you could explain in detail.
other thing i found out is in Initialization method i can read i_t_data_charsel table values , where it contains filter slected values.but could not pass these values to execute method
Is there is any way that i can pass values from init method to execute method.
A tabular structured parameter with name "MY_TABSTRUC" is defined for the function type. "MY_TABSTRUC" consists of the two parameter components "MY_ELEM" and "MY_DATASEL". You access the parameter values as follows:
DATA: TAB_PARAM_STRUC TYPE RSPLFA_T_PARAM_STRUC,
REF_PARAM_STRUC TYPE REF TO IF_RSPLFA_PARAM_STRUC,
REF_PARAM_ELEM TYPE REF TO IF_RSPLFA_PARAM_ELEM,
REF_PARAM_DATASEL TYPE REF TO IF_RSPLFA_PARAM_DATESEL,
L_VAL(20) TYPE C,
TAB_SEL TYPE RSPLF_T_CHARSEL.
get table of parameter MY_TABSTRUC:
TAB_PARAM_STRUC = I_R_PARAM_SET->GET_TAB_PARAM_STRUC( 'MY_TABSTRUC' ).
process all lines:
LOOP AT TAB_PARAM_STRUC into REF_PARAM_STRUC.
get component MY_ELEM:
REF_PARAM_ELEM = REF_PARAM_STRUC->GET_COMP_ELEM( 'MY_ELEM' ).
get internal value of MY_ELEM:
REF_PARAM_ELEM->GET_VALUE( IMPORTING E_VALUE = L_VAL ).
get component MY_DATASEL:
REF_PARAM_DATASEL = REF_PARAM_STRUC->GET_COMP_DATA_SEL( 'MY_DATASEL' ).
get data selection table of MY_DATASEL:
TAB_SEL = REF_PARAM_DATASEL->GET_T_SEL( ).
ENDLOOP.
Thanks in Advance..please help me
Maybe you are looking for
-
Cannot post new thread in Calendar forum
I have a question about Oracle Calendar, and I'm trying to post my question in the Calendar forum. But when I click the "Post New Thread" link, I get an error page that says "Error: you do not have permission to view the requested forum or category."
-
FREE check box in PO should be selected by default for specific material
Hi All, We have a check box FREE in PO creation - ME21N in the item row which is selected when ever we want the vendor to supply those items as free. - I have a list ot items which are supplied freely by the vendor which I have to mention in the PO
-
Installing Tiger - a question for you...
When i install Tiger, using the 'Archive and Install' option - will my Photoshop CS, Illustrator CS, Itunes Music, VLC etc still be there when the machine boots up with the new OS? I have backed up all my personal files, but just want to make sure I
-
Runtime.getRuntime(). Passing parameters
Hello, is it possible to pass input to a console application called by Runtime.getRuntime()? Concretely: I want to call "ij" of the Java/Derby DB system and make it process a command/script file. The following code run under WinXP returns 0 (success)
-
hi all we are usin Oracle Apex 3.1 I have to import the Workspace users to another Server with Apex 3.1, the Workspace is created with the same name any Help please