2006 Mar 01 5:13 AM
Hi,
if a column in an alv is not a table field like in a table we will have 'Quantity' and 'Price' fields but not the 'TotPrice' field so if we calculate the totprice(Quantity * Price) and add in our internal table, how will i get the name of this column as TotPrice in alv and its subtotals and totals.
Pls do the needful asap.
Regards,
Ravi
Hi Satesh,
Thanks. It is working.
Regards,
Ravi
2006 Mar 01 5:22 AM
u have to give the name in fieldacatalog like below.
fieldcat-fieldname = 'TOTPRICE'
FIELDCAT-SELTEXT_M = 'TOT_PRICE'.
FIELDCAT-COL_POS = COL_POS.
FIELDCAT-OUTPUTLEN = OUTPUTLEN.
APPEND FIELDCAT TO FIELDCAT.
1. THE FIELDCAT IS VERY IMPORTANT. WHAT EVER SELTEXT U GIVE IN FIELDCATALOG APPEARS IN THE O/P OF ALV.
2. U NEED TO BUILD FIELDCAT AND PASS IT TO REUSE_ALV fn module.
3. <b>there is no rule that fieldcat fields should be there in either database table or even internal table.</b>
2006 Mar 01 5:35 AM
2006 Mar 01 5:23 AM
Hi Ravi,
You have to manually set the name of this column as Tot Price, by modifying the fieldcatalog.you have to move the name to SELTEXT_L Of your fieldcatalog.
Regards,
Raghavendra
2006 Mar 01 5:24 AM
hi Ravi,
if the field is present in the itab..
you can use the fieldcatalogue to display these options..
for eg.
tempcat-fieldname = <tot_price>.
*for display of heading
tempcat-seltext_l = 'Total Price'.
tempcat-ddictxt = 'L'.
*for total
tempcat-do_sum = 'X'.
APPEND TEMPCAT TO FIELDCAT .for <b>subtotal use it_sort of type slis_t_sortinfo_ALV.</b>
regards
satesh
2006 Mar 01 5:37 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |