2006 Aug 23 3:40 PM
hi friends,
how to put subtotal text in alv output.
regards,
krishna.
2006 Aug 23 3:42 PM
Hi,
Check these links :
Also go through the link,
http://help.sap.com/saphelp_47x200/helpdata/en/ee/c8e056d52611d2b468006094192fe3/frameset.htm
Regards
Appana
hi friends,
how to put subtotal text in alv output.
regards,
krishna.
2006 Aug 23 3:42 PM
Hi,
Check these links :
Also go through the link,
http://help.sap.com/saphelp_47x200/helpdata/en/ee/c8e056d52611d2b468006094192fe3/frameset.htm
Regards
Appana
2006 Aug 23 3:43 PM
2006 Aug 23 3:44 PM
hi Krishna,
Check this out
<b>x_layout-subtotals_text = 'Account Subtotal'(t23).</b>
x_layout-totals_text = 'Grand Total'(t24).
* Detail Report Display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = it_fieldcat
it_events = it_event
is_layout = x_layout
it_sort = it_sort[]
TABLES
t_outtab = it_detail
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.
2006 Aug 23 4:17 PM
dear friend,
this is not working in alv subtotal text.
regards,
kathir.
2006 Aug 23 5:43 PM
Hi Krishna,
For getting subtotals text you have to do two things.
1. While building fieldcatalog you need to pass DO_SUM='X' to the field which you want to make sum.
2.While building layout you need to pass this subtotals text.
<b>
PSEUDO CODE.
1.Populate fieldcatalog with DO_SUM='X'.</b>
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'PRICE'.
LS_FIELDCAT-DO_SUM = 'X'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
<b>
2.Populate layout with subtotals text.</b>
WA_LAYOUT-TOTALS_TEXT = 'Krishna'.
WA_LAYOUT-SUBTOTALS_TEXT = 'PRASAD'. ;-)
* Call ABAP List Viewer
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
I_CALLBACK_PROGRAM = G_REPID
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[].........
Regards,
Raghav
2006 Aug 23 3:44 PM
2006 Aug 23 3:44 PM
2006 Aug 23 3:44 PM
Check out this link and have a look at the thread which gives details about displaying Subtotal text.
http://help.sap.com/saphelp_47x200/helpdata/en/ee/c8e056d52611d2b468006094192fe3/frameset.htm
ashish
2006 Aug 23 3:44 PM
hi for this we need to use the following code
DATA: LAYOUT TYPE SLIS_LAYOUT_ALV. "LAYOUT
FORM DEFINE_LAYOUT.
LAYOUT-ZEBRA = 'X'.
<b> LAYOUT-SUBTOTALS_TEXT = 'SUBTOTAL SUM'.</b> LAYOUT-WINDOW_TITLEBAR = 'EXERCISE 2'.
LAYOUT-TOTALS_TEXT = 'TOTAL'.
ENDFORM. "DEFINE_LAYOUT
2006 Aug 23 3:48 PM
Hi Krishna,
For doing sub total follow two steps.
1. while building field catalog give do_sum = 'X' for the amount or quantity field.
2. Build a sort catalog to sort by the field by which you want sub total.
regards..
jaison
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |