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

Function module: REUSE_ALV_COMMENTARY_WRITE

Former Member
0 Likes
832

Hello,

the importparameter IT_LIST_COMMENTARY is filled like that:

slis_listheader-type = 'S'

slis_listheader-key = space

slis_listheader-info = space.

With that coding we got a blank line in the header above of the list.

Now it doesn't work not any longer.

We fixed the problem with delivering an '.', at the field slis_listheader-info, but that is not the right intention, because we se points in the output-list.

Thank you for your answers,

Melanie

5 REPLIES 5
Read only

Former Member
0 Likes
722

space works fine with me..

just now tested..

Read only

rainer_hbenthal
Active Contributor
0 Likes
722

Works for me fine, too.

Did you deleted the corresponding append slis_lisheader to it_listheader by accident?

Read only

venkat_o
Active Contributor
0 Likes
722

Try this way.


"&---------------------------------------------------------------------*
"&      Form  top_of_page
"&---------------------------------------------------------------------*
FORM top_of_page.
  DATA :li_header TYPE slis_t_listheader,
        w_header  LIKE LINE OF li_header,
        l_date TYPE char10.

  w_header-typ  = 'S'.
  w_header-info = space.
  APPEND w_header TO li_header.
  CLEAR w_header.

  WRITE sy-datum TO l_date.
  w_header-typ  = 'H'.
  CONCATENATE sy-repid ':' 'From Date' l_date INTO w_header-info SEPARATED BY space.
  APPEND w_header TO li_header.
  CLEAR w_header.

  w_header-typ  = 'S'.
  w_header-info = space.
  APPEND w_header TO li_header.
  CLEAR w_header.

  w_header-typ  = 'S'.
  w_header-info = sy-title.
  APPEND w_header TO li_header.
  CLEAR w_header.

  w_header-typ  = 'A'.
  w_header-info = sy-uname.
  APPEND w_header TO li_header.
  CLEAR w_header.

  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = li_header.

ENDFORM.                    "top_of_page
Thanks Venkat.O

Read only

Former Member
0 Likes
722

Hi,

Try doing like the Sample code mentioned below:



FORM TOP.

WA_HEADER-TYP = 'S'.
WA_HEADER-KEY = TEXT-001.
WA_HEADER-INFO = SY-REPID.
APPEND WA_HEADER TO IT_HEADER.
CLEAR WA_HEADER.

WA_HEADER-TYP = 'S'.
WA_HEADER-KEY = TEXT-002.
WA_HEADER-INFO = SY-UNAME.
APPEND WA_HEADER TO IT_HEADER.
CLEAR WA_HEADER.

WA_HEADER-TYP = 'S'.
WA_HEADER-KEY = TEXT-003.
WA_HEADER-INFO = SY-DATUM.
APPEND WA_HEADER TO IT_HEADER.
CLEAR WA_HEADER.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
  EXPORTING
    it_list_commentary       = IT_HEADER
*   I_LOGO                   =
*   I_END_OF_LIST_GRID       =
*   I_ALV_FORM               =
          .
ENDFORM.

Hope it helps

Regards

Mansi

Read only

Former Member
0 Likes
722

hai,

try this code

WA_EVENT-NAME = 'TOP_OF_LIST'.

WA_EVENT-FORM = 'TOP-OF-LIST'.

APPEND WA_EVENT TO TB_EVENT.

FORM TOP-OF-LIST.

REFRESH ITAB.

WA_ITAB-TYP = 'H'.

WA_ITAB-INFO = 'MY LIST'.

APPEND WA_ITAB TO ITAB.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = ITAB

I_LOGO = 'MYTEC'.

  • I_END_OF_LIST_GRID =

  • I_ALV_FORM =

.

ENDFORM.