on 01-18-2012 5:33 PM
Hello,
I pass these parameters for printing Subtotals, Eventhough i am not able to print the subtotals ..
And how to print grand totals,,
I hope you understand my problem so pls Give me Exact soln for this problem...
data:
T_FCAT TYPE SLIS_T_FIELDCAT_ALV,
W_FCAT TYPE SLIS_FIELDCAT_ALV,
W_KEYINFO TYPE SLIS_KEYINFO_ALV,
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
W_SORT TYPE SLIS_SORTINFO_ALV,
W_LAYOUT TYPE SLIS_LAYOUT_ALV.
W_FCAT-COL_POS = '1'.
W_FCAT-FIELDNAME = 'MATNR'.
W_FCAT-EMPHASIZE = 'C600'.
W_FCAT-OUTPUTLEN = 30.
W_FCAT-SELTEXT_M = 'MATERIAL NO'.
W_FCAT-TABNAME = 'IT_HEADER'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = '13'.
W_FCAT-FIELDNAME = 'PSQTY'.
W_FCAT-OUTPUTLEN = 20.
W_FCAT-SELTEXT_M = 'Pending So QTY'.
W_FCAT-EMPHASIZE = 'C600'.
W_FCAT-DO_SUM = 'X'.
W_FCAT-EMPHASIZE = 'C500'.
W_FCAT-TABNAME = 'IT_ITEM'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = '17'.
W_FCAT-FIELDNAME = 'SOQTY'.
W_FCAT-OUTPUTLEN = 20.
W_FCAT-SELTEXT_M = ' So Qty'.
W_FCAT-EMPHASIZE = 'C500'.
W_FCAT-DO_SUM = 'X'.
W_FCAT-TABNAME = 'IT_ITEM'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_KEYINFO-HEADER01 = 'MATNR'.
W_KEYINFO-ITEM01 = 'MATNR'.
W_SORT-FIELDNAME = 'MATNR'.
W_SORT-TABNAME = 'IT_HEADER'.
W_SORT-UP = 'X'.
W_SORT-SUBTOT = 'X'.
APPEND W_SORT TO IT_SORT.
CLEAR W_SORT.
W_LAYOUT-TOTALS_TEXT = 'Total'. "TEXT at TOTAL
W_LAYOUT-SUBTOTALS_TEXT = 'Sub'. "TEXT AT SUB Total
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = W_LAYOUT
IT_FIELDCAT = T_FCAT
IT_SORT = IT_SORT
I_TABNAME_HEADER = 'IT_HEADER'
I_TABNAME_ITEM = 'IT_ITEM'
IS_KEYINFO = W_KEYINFO
TABLES
T_OUTTAB_HEADER = INT_HEADER
T_OUTTAB_ITEM = INT_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.
Thanks in Advance...!!!
Regards,
KSReddy
Hi,
Repeat the sam sort catalog for the field you want ot display the subtotals.
Regards,
Vamshi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the datatype of PSQTY and SOQTY.Its should be CHAR.
The subtotal and grandtotal is available for CHAR fields not QUAN fields,
Jshree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Subtotal feature you will get in standard.How you declared the fields.
Regards,
Madhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.