Application Development 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: 

Displaying logo in ALV

Former Member
0 Kudos
187

hi experts,

can i display LOGO in ALV using REUSE_ALV_LIST_DISPLAY, as LOGO can be displayed in ALV grid, so can it be displayed in ALV list ? if yes how?

10 REPLIES 10

Former Member
0 Kudos
71

search on sdn.

>logo in alv list

This set of keywords gave 249 results check the first and second result u'll get ur answers.

I355602
Product and Topic Expert
Product and Topic Expert
0 Kudos
71

Hi Raman,

Try this out, its working:-


call function 'REUSE_ALV_COMMENTARY_WRITE'
  exporting
    it_list_commentary = header
    i_logo             = 'ENJOYSAP_LOGO'.

Each image in OAOR has a property Object ID (To see image properties press F2 after selecting particular object). You have to pass Object ID (in upper case) as an actual parameter for i_logo

of function module REUSE_ALV_COMMENTARY_WRITE.

Hope this solves your problem.

Thanks & Regards,

Tarun Gambhir

Former Member
0 Kudos
71

Hi,

Yes, its possible to display the LOGO in ALV...(only when u upload the logo in SAP)

for uploading presentation to SAP use 'OAER' txcn...

after the LOGO available in SAP, just call FM REUSE_ALV_COMMENTARY_WRITE and pass the logo name to 'I_LOGO' Parameter in FM...

Hope it helps!!

Regards,

Pavan

Former Member
0 Kudos
71

This message was moderated.

0 Kudos
71

Ho joan,

Did u read the question? it is clearly mentioned that he wants to display logo using 'REUSE_ALV_LIST_DISPLAY' but then u gave the code for 'REUSE_ALV_GRID_DISPLAY', please post the answre only when u know the answer.

Former Member
0 Kudos
71

Hi ,

I think it is not possible to dispaly the LOGO using the REUSE_ALV_COMMENTARY_WRITE function module in LIST dispaly

The logo does not appear in the LIST display.

When tried to display using the grid display the logo was dispalyed.

But in the list dispaly using the same procedure the LOGO is not displayed.

Regards,

Radhika.

Former Member
0 Kudos
71

Hi Raman sharma,

See here all the threads related LOGO in ALV https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=logoinalv&adv=false&sortby=cm_rnd_rankvalue

Cheers,

Pravin s

Former Member
0 Kudos
71

hi raman,

check this thread

hope it helps you.

thanks

Sachin

Former Member
0 Kudos
71

Hi experts,

i want to display logo in ALV list, the code is given below but its not display the logo in list but when i call GRID logo is displaying.

&----


*& Report ZALVLISTINTERACTIVE *

*& *

&----


*& *

*& *

&----


REPORT ZALVLISTINTERACTIVE .

.

TYPE-POOLS: SLIS.

TABLES: EKKO, EKPO.

SELECT-OPTIONS: ORDER FOR EKKO-EBELN.

PARAMETERS: M TYPE I,

N TYPE I.

DATA: BEGIN OF IT_EKKO OCCURS 0,

LINE_COLOUR(4),

EBELN LIKE EKKO-EBELN,

BUKRS LIKE EKKO-BUKRS,

AEDAT LIKE EKKO-AEDAT,

ERNAM LIKE EKKO-ERNAM,

END OF IT_EKKO.

DATA: WA_EKKO LIKE IT_EKKO.

DATA: BEGIN OF IT_EKPO OCCURS 0,

EBELN LIKE EKPO-EBELN,

EBELP LIKE EKPO-EBELP,

MATNR LIKE EKPO-MATNR,

END OF IT_EKPO.

DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

DATA: GD_REPID LIKE SY-REPID.

DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER,

WA_LISTHEADER TYPE SLIS_LISTHEADER.

DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.

DATA: TITLE1(70) VALUE 'FIRST PAGE',

TITLE2(70) VALUE 'SECOND PAGE'.

DATA LD_COLOUR.

DATA: V_EVENT TYPE SLIS_T_EVENT,

WA_EVENT TYPE SLIS_ALV_EVENT.

INITIALIZATION.

GD_REPID = SY-REPID.

PERFORM BUILD_FIELDCAT.

PERFORM GET_EVENT.

PERFORM POPULATE_EVENT.

START-OF-SELECTION.

PERFORM GET_DATA.

PERFORM GET_LAYOUT.

PERFORM LISTHEADER.

PERFORM DISPLAY.

FORM GET_EVENT.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

  • EXPORTING

  • I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = V_EVENT

  • EXCEPTIONS

  • LIST_TYPE_WRONG = 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.

ENDFORM.

FORM POPULATE_EVENT.

READ TABLE V_EVENT INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.

IF SY-SUBRC EQ 0.

WA_EVENT-FORM = 'TOP_OF_PAGE'.

MODIFY V_EVENT FROM WA_EVENT TRANSPORTING FORM WHERE NAME =

WA_EVENT-FORM.

ENDIF.

  • READ TABLE V_EVENT INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.

  • IF SY-SUBRC EQ 0.

  • WA_EVENT-FORM = 'USER_COMMAND'.

  • MODIFY V_EVENT FROM WA_EVENT TRANSPORTING FORM WHERE NAME =

*WA_EVENT-NAME.

  • ENDIF.

*

ENDFORM.

FORM GET_LAYOUT.

ALV_LAYOUT-NO_INPUT = 'X'.

ALV_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.

ALV_LAYOUT-BOX_FIELDNAME = 'SEL'.

ALV_LAYOUT-INFO_FIELDNAME = 'LINE_COLOUR'.

*ALV_LAYOUT-F2CODE = '&ETA'.

ENDFORM.

FORM BUILD_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'EBELN'.

WA_FIELDCAT-SELTEXT_M = 'PO NO'.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'BUKRS'.

WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'EBELN'.

WA_FIELDCAT-SELTEXT_M = 'DATE'.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'ERNAM'.

WA_FIELDCAT-SELTEXT_M = 'NAME OF PERSON'.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

ENDFORM.

FORM GET_DATA.

SELECT EBELN BUKRS AEDAT ERNAM FROM EKKO INTO CORRESPONDING FIELDS OF

TABLE IT_EKKO WHERE EBELN IN ORDER.

LOOP AT IT_EKKO FROM M TO N.

LD_COLOUR = LD_COLOUR + 1.

IF LD_COLOUR = 8.

LD_COLOUR = 1.

ENDIF.

CONCATENATE 'C' LD_COLOUR '10' INTO IT_EKKO-LINE_COLOUR.

MODIFY IT_EKKO.

ENDLOOP.

ENDFORM.

FORM LISTHEADER.

WA_LISTHEADER-TYP = 'H'.

WA_LISTHEADER-INFO = 'MY FIRST INTERACTIVE ALV'.

APPEND WA_LISTHEADER TO IT_LISTHEADER.

CLEAR WA_LISTHEADER.

WA_LISTHEADER-TYP = 'S'.

WA_LISTHEADER-KEY = 'DATE: '.

CONCATENATE SY-DATUM+6(2) ':' sy-datum(2) ':' SY-DATUM(4) INTO

WA_LISTHEADER-INFO.

APPEND WA_LISTHEADER TO IT_LISTHEADER.

ENDFORM.

FORM DISPLAY.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = GD_REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

  • I_STRUCTURE_NAME =

IS_LAYOUT = ALV_LAYOUT

IT_FIELDCAT = IT_FIELDCAT[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

IT_EVENTS = V_EVENT

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = IT_EKKO

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

ENDFORM.

FORM TOP_OF_PAGE.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = IT_LISTHEADER

I_LOGO = 'VARUN'

  • I_END_OF_LIST_GRID =

.

ENDFORM.

FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE

SLIS_SELFIELD.

CASE R_UCOMM.

WHEN '&IC1'.

READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.

PERFORM BUILDCAT_EKPO.

PERFORM DATA_EKPO.

*PERFORM HEADER_EKPO.

PERFORM DISPLAY_EKPO.

ENDCASE.

ENDFORM.

FORM BUILDCAT_EKPO.

CLEAR IT_FIELDCAT[].

WA_FIELDCAT-TABNAME = 'IT_EKPO'.

WA_FIELDCAT-FIELDNAME = 'EBELN'.

WA_FIELDCAT-SELTEXT_M = 'PO NO'.

WA_FIELDCAT-COL_POS = 0.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKPO'.

WA_FIELDCAT-FIELDNAME = 'EBELP'.

WA_FIELDCAT-SELTEXT_M = 'ITEM NUMBER'.

WA_FIELDCAT-COL_POS = 1.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKPO'.

WA_FIELDCAT-FIELDNAME = 'MATNR'.

WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO'.

WA_FIELDCAT-COL_POS = 2.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

ENDFORM.

FORM DATA_EKPO.

SELECT EBELN EBELP MATNR FROM EKPO INTO CORRESPONDING FIELDS OF TABLE

IT_EKPO WHERE EBELN = WA_EKKO-EBELN.

ENDFORM.

FORM DISPLAY_EKPO.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = GD_REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

I_GRID_TITLE = TITLE2

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

IT_FIELDCAT = IT_FIELDCAT[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS =

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • I_HTML_HEIGHT_TOP =

  • I_HTML_HEIGHT_END =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = IT_EKPO

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

ENDFORM.

Former Member
0 Kudos
71

thnx