Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV Report - modifications.

Former Member
0 Likes
771

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

7 REPLIES 7
Read only

Former Member
0 Likes
750

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.

Read only

Former Member
0 Likes
750

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.

Read only

0 Likes
750

The output fileld is a standard field of numc type, any other option.

Read only

0 Likes
750

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 .

Read only

0 Likes
750

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.

Read only

0 Likes
750

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).

Read only

Former Member
0 Likes
750

s