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: 

Logo's

0 Kudos

Hi,

Can any one sen me the codeing for diaplaying the log in Report Program through ALV

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

check the code in this thread

15 REPLIES 15

Former Member
0 Kudos

Hi,

check this code..


TYPE-POOLS:SLIS.
 
DATA:IT_FCAT TYPE SLIS_T_FIELDCAT_ALV.
 
DATA:WA_FCAT TYPE SLIS_FIELDCAT_ALV.
 
DATA:WA_LAYO TYPE SLIS_LAYOUT_ALV.
 
TABLES:MARA.
 
SELECT-OPTIONS:S_MATNR FOR MARA-MATNR DEFAULT '1' TO '1000'.
 
DATA:BEGIN OF ITAB1 OCCURS 0,
 
     MATNR LIKE MARA-MATNR,
     NTGEW LIKE MARA-NTGEW,
 
     END OF ITAB1.
 
DATA:BEGIN OF ITAB2 OCCURS 0,
 
     MATNR LIKE MARC-MATNR,
     WERKS LIKE MARC-WERKS,
 
     END OF ITAB2.
 
DATA:BEGIN OF ITAB3 OCCURS 0,
 
     MATNR LIKE MARD-MATNR,
     LGORT LIKE MARD-LGORT,
 
     END OF ITAB3.
 
DATA:BEGIN OF IT_FINAL OCCURS 0,
 
     MATNR LIKE MARA-MATNR,
     NTGEW LIKE MARA-NTGEW,
     WERKS LIKE MARC-WERKS,
     LGORT LIKE MARD-LGORT,
 
     END OF IT_FINAL.
 
 
START-OF-SELECTION.
 
  SELECT MATNR
         NTGEW FROM MARA INTO TABLE ITAB1 WHERE MATNR IN S_MATNR.
 
  IF NOT ITAB1[] IS INITIAL.
 
    SELECT MATNR
           WERKS FROM MARC INTO TABLE ITAB2 FOR ALL ENTRIES IN ITAB1
    WHERE MATNR EQ ITAB1-MATNR.
 
  ENDIF.
 
  IF NOT ITAB1[] IS INITIAL.
 
    SELECT MATNR
           LGORT FROM MARD INTO TABLE ITAB3 FOR ALL ENTRIES IN ITAB1
    WHERE MATNR EQ ITAB1-MATNR.
 
  ENDIF.
 
 
  LOOP AT ITAB1.
 
    READ TABLE ITAB2 WITH KEY MATNR = ITAB1-MATNR.
 
    READ TABLE ITAB3 WITH KEY MATNR = ITAB1-MATNR.
 
 
    MOVE ITAB1-MATNR TO IT_FINAL-MATNR.
 
    MOVE ITAB1-NTGEW TO IT_FINAL-NTGEW.
 
    MOVE ITAB2-WERKS TO IT_FINAL-WERKS.
 
    MOVE ITAB3-LGORT TO IT_FINAL-LGORT.
 
    APPEND IT_FINAL.
 
  ENDLOOP.
 
 
************For Field Catalogue*****************
 
  WA_FCAT-COL_POS = '1'.
  WA_FCAT-FIELDNAME = 'MATNR'.
  WA_FCAT-SELTEXT_M = 'Material Number'.
  APPEND WA_FCAT TO IT_FCAT.
 
  WA_FCAT-COL_POS = '2'.
  WA_FCAT-FIELDNAME = 'NTGEW'.
*WA_FCAT-DATATYPE = 'QUAN'.
  WA_FCAT-DO_SUM = 'X'.
  WA_FCAT-SELTEXT_M = 'Netweight'.
  APPEND WA_FCAT TO IT_FCAT.
 
  WA_FCAT-COL_POS = '3'.
  WA_FCAT-FIELDNAME = 'WERKS'.
  WA_FCAT-SELTEXT_M = 'PLANT NUMBER'.
  APPEND WA_FCAT TO IT_FCAT.
 
  WA_FCAT-COL_POS = '4'.
  WA_FCAT-FIELDNAME = 'LGORT'.
  WA_FCAT-SELTEXT_M = 'STORAGE LOCation'.
  APPEND WA_FCAT TO IT_FCAT.
 
*********For Layout***********************
 
  WA_LAYO-ZEBRA = 'X'.
  WA_LAYO-EDIT = 'X'.
 
 
*************Grid Display******************
 
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
*   I_INTERFACE_CHECK                 = ' '
*   I_BYPASSING_BUFFER                = ' '
*   I_BUFFER_ACTIVE                   = ' '
     I_CALLBACK_PROGRAM                = SY-REPID
*   I_CALLBACK_PF_STATUS_SET          = ' '
*   I_CALLBACK_USER_COMMAND           = ' '
     I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
*   I_CALLBACK_HTML_TOP_OF_PAGE       = TOP_OF_PAGE
*   I_CALLBACK_HTML_END_OF_LIST       = ' '
*   I_STRUCTURE_NAME                  =
*   I_BACKGROUND_ID                   = ' '
     I_GRID_TITLE                      = 'DETAILS'
*   I_GRID_SETTINGS                   =
     IS_LAYOUT                         = WA_LAYO
     IT_FIELDCAT                       = IT_FCAT
*   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_FINAL
   EXCEPTIONS
     PROGRAM_ERROR                     = 1
     OTHERS                            = 2
            .
  IF SY-SUBRC ne 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
 
*&--------------------------------------------------------------------*
*&      Form  top_of_page
*&--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
FORM TOP_OF_PAGE.
 
  DATA:IT_LISTHEAD TYPE SLIS_T_LISTHEADER.
  DATA:WA_LISTHEAD TYPE SLIS_LISTHEADER.
 
  WA_LISTHEAD-TYP = 'H'.
  WA_LISTHEAD-INFO = 'HEADING'.
  APPEND WA_LISTHEAD TO IT_LISTHEAD.
 
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      IT_LIST_COMMENTARY = IT_LISTHEAD
      I_LOGO             = 'ENJOYSAP_LOGO'.
 
ENDFORM.                    "top_of_page

Regards,

Omkaram.

0 Kudos

Program is working fine , but logo is not displaying in the Heading

0 Kudos

Hi

Which logo?

The logo should be loaded by trx OAER and not by SE78

Max

0 Kudos

Thanks a lot Maxi it's working fine.

0 Kudos

the logo which is displaying is very big, how can I decrease it size in the heading

0 Kudos

Omkaram,

You copy&pasted someone else's work, pretending it to be your own without giving them credit for it.

I have removed points from you and rejected enough of your posts already.

This is your final warning: If you violate the rules again => your user ID will be deleted!

Julius

Former Member
0 Kudos

Hi

See program demo BCALV_FULLSCREEN_DEMO

Max

Former Member
0 Kudos

Hi,

Check the below standard program.

BALVST02_GRID

Regards,

Ravi

Edited by: Ravi Kumar on Oct 8, 2008 11:04 AM

Former Member
0 Kudos

Hi,

In Resue_alv_commentary_write FM , give the name of the Logo.

Hope this will help u.

All the Best.

Aleem.

former_member188685
Active Contributor
0 Kudos

check the code in this thread

0 Kudos

Funny, I was about to post the same link.

0 Kudos

I thought of posting some reference links in other threads too.. i controlled my slef.

0 Kudos

>

> I thought of posting some reference links in other threads too.. i controlled my slef.

I think Julius should learn the use of the color and size tags. That was just too subtle.

0 Kudos

i hope he will use next time.

Former Member
0 Kudos

but before this code u have to upload the logo through T-code OAER then it only appear in the ALV

In t-code OAER pass the following values

Classname = PICTURE

Classtype= OT

enter the logo name as you wish that is availabe on presention server

then you use RESUE_ALV_Commenty_write function module and pass the logo name .