‎2008 Jun 18 3:30 PM
Hi gurus, iam doing a report program,
iam using ALV display for this.
'REUSE_ALV_GRID_DISPLAY'..
Now i have small points to clarify:
1.drill down for any field in the report
2. color for SUB-TOTALS rows(different colors for different sub-total rows).
3.* I have few fields of NUMC type. so while calculation if it is 0. The field is shown as blank in ALV. so can i show 0 instaed of blank for numc fields.*
Hi please dont give any demo programs, i just need to clarify only the above points. please just tell me point wise which fields shud be set .
Points will be rewarded. Thanks in Advance.
urs, Chaitu
‎2008 Jun 18 3:34 PM
1) for dril down u need to write events and call another screen to display.
2) sub total color will be yellow only.
3) in field catelog palce no_zero field as space.
‎2008 Jun 18 3:39 PM
hi ..
1 .drilldown means double clicking on a field will calling a transaction....like interactive report...having more no of screens..
2 . no i think there is no other color for the subtotal texts.
3. you can use the output table with the char field instead of numeric field and you can pass the value at the time of final population.
‎2008 Jun 18 3:41 PM
The output fileld is a standard field of numc type, any other option.
‎2008 Jun 18 3:49 PM
hi i did checked the field with the type n ..it is showing a blank ..i hope there is nothing to do..see this example..
REPORT ztest_alv_perc_13317.
TYPE-POOLS: slis.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv,
it_events TYPE slis_t_event,
wa_events TYPE slis_alv_event,
it_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv,
l_layout TYPE slis_layout_alv.
TYPES: BEGIN OF ty_itab,
field1(10),
qty1 TYPE i,
qty2 TYPE i,
qty3 TYPE n,
END OF ty_itab.
DATA: itab TYPE STANDARD TABLE OF ty_itab WITH HEADER LINE,
itab1 TYPE ty_itab.
START-OF-SELECTION.
itab-field1 = 'FIRST'.
itab-qty1 = 2.
itab-qty2 = 1.
itab-qty3 = 0.
APPEND itab.
itab-field1 = 'FIRST'.
itab-qty1 = 2.
itab-qty2 = 1.
itab-qty3 = 5.
APPEND itab.
itab-field1 = 'FIRST'.
itab-qty1 = 2.
itab-qty2 = 1.
itab-qty3 = 5.
APPEND itab.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'FIELD1'.
wa_fieldcat-reptext_ddic = 'field1'.
APPEND wa_fieldcat TO it_fieldcat.
wa_fieldcat-col_pos = 2.
wa_fieldcat-fieldname = 'QTY1'.
wa_fieldcat-reptext_ddic = 'field2'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
wa_fieldcat-col_pos = 3.
wa_fieldcat-fieldname = 'QTY2'.
wa_fieldcat-reptext_ddic = 'field3'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
wa_fieldcat-col_pos = 4.
wa_fieldcat-fieldname = 'QTY3'.
wa_fieldcat-reptext_ddic = 'field4'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
l_layout-totals_text = 'total text'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = it_fieldcat
TABLES
t_outtab = itab .
‎2008 Jun 18 4:12 PM
For NUMC fields pass datatype = 'N' in the fieldcalalog like
wa_fieldcat-datatype = 'N'.
Now I think u will get '0' in ALV output.
Regards,
Joy.
‎2008 Jun 18 5:12 PM
But this field is also a Subtotal field, so if i give data type = N, then subtotal is missing.
also leading zeros are coming, how can i avoid them, )lzero is not working).
‎2008 Jul 09 6:41 AM