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

Write Statement in ALV List output

Former Member
0 Likes
751

Hi Experts,

In my requirement i have output in alv list format.

for eg:

this is my output

vendor no. vendor name material no ............................................

above this output i need to add one field which should be in writable mode(top of page)

now my output should be

new basic price: ouput(writeable mode)

vendor no. vendor name material no ............................................

Hi Experts,

In my requirement i have output in alv list format.

for eg:

this is my output

vendor no. vendor name material no ............................................

above this output i need to add one field which should be in writable mode(top of page)

now my output should be

new basic price: ouput(writeable mode)

vendor no. vendor name material no ............................................

2 REPLIES 2
Read only

Former Member
0 Likes
480
FORM top_routine.

****
** In this form we define what will
** be output on top.
** You should only change the marked 
** lines with what will be
** actually output
****

* { Local
  DATA:
    l_line TYPE slis_entry,
    lh_top TYPE slis_listheader,
    lt_top TYPE slis_t_listheader.
* }

  DEFINE top_line.
    clear lh_top.
    lh_top-typ = &1.
    lh_top-key = &2.
    lh_top-info = &3.
    append lh_top to lt_top.
  END-OF-DEFINITION.

  WRITE sy-datum TO l_line. " need to be changed
  top_line 'S' 'Date:' l_line. " need to be changed

  WRITE sy-uname TO l_line. " need to be changed
  top_line 'S' 'User:' l_line. " need to be changed


  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
            it_list_commentary = lt_top.

ENDFORM.                    " top_routine
Read only

Former Member
0 Likes
480

Hi Sharmila,

If you are using REUSE_ALV_LIST_DISPLAY, you dont have (I_CALLBACK_TOP_OF_PAGE) as you have in GRID ALV.

just pass

g_r_events-name = 'TOP_OF_PAGE'.

g_r_events-form = 'F_TOP_OF_PAGE'.

append g_r_events to g_t_events.

pass the events table to the it_events parameter in ERUSE_ALV_LIST_DISPLAY

it_events = g_t_events

and wtie a form

F_TOP_OF_PAGE.

You can write the write staments to diplay as header

WRITE: DATE: Sy-datum.

skip.

write: sy-uzeit.

ENDFORM.

There is no need of reuse_alv_commentry_write for LIST display, instead you can just have write statement for top of page.

regards,

NZR