2008 Feb 13 5:52 AM
Hello All ,
I have a litle bit problem. I have created one ALV which is showing all the fields including two Quantity Fld. There is one Fld posting Key haveing value 20 21 22 23.
I have taken the sum and make a subtotatal on fld Posting Key.
it is showing to sum of qty for 20 21 22 23.
My problem is My user want to display the subtotal of Only 21. not for all fld value in sub total also and in gross total also. and data will be display for 20 21 22 23.
ALV Subtotal option Give the Sub total of all Value of posting key like 20 21 22 23 , I want the sum of only 21
posting key qty
20 10
20 10
21 10
21 10
22 10
23 10
out put want
p k qty
20 10
20 10
21 10
21 10
#21 20 Sub total
22 10
23 10
20 Gross Total
Can some one tell me how can be match such requirement.
Regards
Swati...
Edited by: Swati Namdev on Feb 13, 2008 11:22 AM
Edited by: Swati Namdev on Feb 13, 2008 11:29 AM
Edited by: Swati Namdev on Feb 13, 2008 11:31 AM
2008 Feb 13 5:57 AM
2008 Feb 13 12:00 PM
Hello Guys ,
Can some one Please Suggest the correct Answer.
Regard
Swati..
2008 Feb 13 6:07 AM
Use this code
FCAT-col_pos = 5.
FCAT-fieldname = 'WRBTR'.
FCAT-tabname = 'I_BSIK'.
FCAT-ref_fieldname = 'WRBTR'.
FCAT-DO_SUM = 'X'.
FCAT-SELTEXT_S = 'NET'.
FCAT-SELTEXT_M = 'NET_P'.
FCAT-SELTEXT_L = 'NET AMOUNT'(010).
FCAT-ref_tabname = 'BSIK'.
APPEND FCAT TO X_FCAT.
Rewards point if useful
2008 Feb 13 6:11 AM
HI.
Check the datatype of field 'TPRC'. It should be either 'QUANT' or 'CURR'. Then only u will get the TOTALS in ALV output.
You have add another statemet as datatype:
fieldcat-tabname = 'ITAB'.
fieldcat-fieldname = 'TPRC'.
fieldcat-seltext_l = 'Total Price'.
fieldcat-do_sum = 'X'.
fieldcat_datatype = 'CURR'
fieldcat-col_pos = 7.
append fieldcat to t_fieldcat.
Reward all helpfull answers.
Jay
2008 Feb 19 5:20 AM
This is not possible for sub total you can take some specific value only.
Regards
Swati