Skip to Content
0
Former Member
Jan 21, 2008 at 07:33 AM

CODE

11 Views

Hi,

I want to display BSIK-DMBTR field contents using ALV also

I want to display total = bsik-dmbtr + 1 using alv..

my final output list should contain

DMBTR TOTAL

______ ___________

100 101

200 201

. .

. .

. .

. .

pls let me know how to display the above...

the following is the same program without logic..

________________________________________

report zalv.

tables : bsik.

type-pools : slis.

DATA: it_fldcat TYPE slis_t_fieldcat_alv.

DATA: wa_fldcat TYPE slis_fieldcat_alv.

DATA : it_sort TYPE slis_t_sortinfo_alv.

DATA : wa_sort TYPE slis_sortinfo_alv.

data : begin of itab occurs 0,

dmbtr like bsik-dmbtr.

total type i,

end of itab.

bld_fcat 1 'DMBTR' 13 'Amt Document Curr' 'L'.

bld_fcat 2 'TOTAL' 20 'Total amount' 'L'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' "Displaying data in grid format

EXPORTING

i_callback_program = sy-repid

it_fieldcat = it_fldcat "fieldcatalog

  • it_sort = it_sort[] "Sort

  • it_events = it_events

TABLES

t_outtab = itab "internal table to output

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.