How To add Logo in ALV Report
Hi,
How To add Logo in ALV Report?
I need step by step explanation.
Hi uday,
go through this hope u can understand.
*& Report Z_OOALV_LOGO
*&--Sample Program using ooalv-> by SrikanthV--
REPORT z_ooalv_logo.
****DECLARATION FOR LOGO INSERT
CONSTANTS: cntl_true TYPE i VALUE 1,
cntl_false TYPE i VALUE 0.
DATA:h_picture TYPE REF TO cl_gui_picture,
h_pic_container TYPE REF TO cl_gui_custom_container.
DATA: graphic_url(255),
graphic_refresh(1),
g_result LIKE cntl_true.
DATA: BEGIN OF graphic_table OCCURS 0,
line(255) TYPE x,
END OF graphic_table.
DATA: graphic_size TYPE i.
CALL SCREEN 100.
*&----
*& Module PICTURE OUTPUT
text
MODULE picture OUTPUT.
DATA: l_graphic_xstr TYPE xstring,
l_graphic_conv TYPE i,
l_graphic_offs TYPE i.
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS'
p_name = 'EDS'"IMAGE NAME - Image name from SE78
p_id = 'BMAP'
p_btype = 'BCOL'
RECEIVING
p_bmp = l_graphic_xstr
EXCEPTIONS
not_found = 1
OTHERS = 2.
graphic_size = XSTRLEN( l_graphic_xstr ).
CHECK graphic_size > 0.
l_graphic_conv = graphic_size.
l_graphic_offs = 0.
WHILE l_graphic_conv > 255.
graphic_table-line = l_graphic_xstr+l_graphic_offs(255).
APPEND graphic_table.
l_graphic_offs = l_graphic_offs + 255.
l_graphic_conv = l_graphic_conv - 255.
ENDWHILE.
graphic_table-line = l_graphic_xstr+l_graphic_offs(l_graphic_conv).
APPEND graphic_table.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown " 'X-UNKNOWN'
size = graphic_size
lifetime = cndp_lifetime_transaction "'T'
TABLES
data = graphic_table
CHANGING
url = graphic_url
EXCEPTIONS
dp_invalid_parameter = 1
dp_error_put_table = 2
dp_error_general = 3
OTHERS = 4 .
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
CREATE OBJECT h_pic_container
EXPORTING container_name = 'LOGO'.
CREATE OBJECT h_picture EXPORTING parent = h_pic_container.
CALL METHOD h_picture->load_picture_from_url
EXPORTING
url = graphic_url
IMPORTING
RESULT = g_result.
ENDMODULE. " PICTURE OUTPUT
Reward points if helpful.
Thanks
Similar Messages
-
How to upload logos in alv reports
how to upload logos in alv reports?
Hi Kishore,
ALV LOGO
Re: How do I insert a logo in ALV using Function Modules?
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
Steps for uploading Logo :-:
1. Goto the transaction OAER
2. Enter the class name as 'PICTURES'
3. Enter the class type as 'OT'
4. Enter the object key as the name of the logo you wish to give
5. Execute
6. Then in the new screen select Standard doc. types in bottom window
Click on the Screen icon
Now, it will ask for the file path where you have to upload the logo
7. Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE
Here you go !!
*& Form TOP_OF_PAGE
text
FORM F_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
i_logo = Logo name
I_END_OF_LIST_GRID =.
ENDFORM. "TOP_OF_PAGE
Hope this helps.
Manish -
Hi Guys,
How to add logo in a Bex report.Hi ABDUL KHADAR
We can only add the logo at Work book level but not the query level @the query
level it wont allow us to add.
Jus open an ordinary excel sheet format it as you wish Ctrl+A and fill with white
color .Then jus save u r logo which u wont to upload in the desktop.
Then go to file insert picture or file and place it wher ever u wont in the work sheet
and save it as a templete and then insert the query in this templete and format it
as per your standarads.
If any struck up feel free to let me know. We explain you clearly...
hope its helpful..
Cheers
R M K
**Assigning poitz ez da only way of saying thankz in SDN** -
How to add button in ALV report (Class method )?
Hello experts,
I have developed one ALV report using classes.
I want to add one more button on the report like already is there named DISPLQUA
How ca i do that here?
Following the code of CLASS definition & implimentation
CLASS lcl_handle_events DEFINITION.
PUBLIC SECTION.
METHODS:
handle_on_user_command FOR EVENT added_function OF cl_salv_events
IMPORTING e_salv_function.
ENDCLASS. "lcl_handle_events DEFINITION
CLASS lcl_handle_events IMPLEMENTATION
CLASS lcl_handle_events IMPLEMENTATION.
METHOD handle_on_user_command.
CASE e_salv_function.
WHEN 'DISPLQUA'.
PERFORM show_quant_record.
WHEN 'DISPQM03'. " Here i want to add button
PERFORM display_quality_notification.
WHEN OTHERS.
ENDCASE.
ENDMETHOD. "handle_on_user_command
ENDCLASS. "lcl_handle_events IMPLEMENTATIONHI Ronny.
Code snippet for reference.
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION.
METHODS :
*--Toolbar control
HANDLE_TOOLBAR FOR EVENT TOOLBAR
OF CL_GUI_ALV_GRID IMPORTING E_OBJECT
E_INTERACTIVE,
ENDCLASS
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*--handle toolbar
METHOD HANDLE_TOOLBAR.
* append a separator to normal toolbar
CLEAR G_TOOLBAR.
G_TOOLBAR-BUTN_TYPE = 3.
APPEND G_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
CLEAR G_TOOLBAR.
G_TOOLBAR-FUNCTION = 'SAVE'.
G_TOOLBAR-ICON = ICON_SYSTEM_SAVE.
G_TOOLBAR-BUTN_TYPE = 0.
G_TOOLBAR-QUICKINFO = 'Save the Customer'(203).
APPEND G_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
ENDMETHOD. "HANDLE_TOOLBAR
Hope this helps.
Gary.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 7, 2008 5:41 PM -
How to put header and how to insert logo in this report
HI
I want a header and logo in this report.how to do this in ALV report.Also why we have to put the sy-repid.Plz tell me in this report where i have to do all this.Plz show me in detail.
REPORT ZREPORT_ALV .
TYPE-POOLS : slis.
tables:vbak,vbap.
*DATA: report_id LIKE sy-repid.
DATA: I_LAYOUT TYPE SLIS_LAYOUT_ALV.
data: ivariant(1) type c,
itvariant like disvariant,
w_variant like disvariant.
initialization.
*REPORT_ID = SY-REPID.
PERFORM F1000_LAYOUT_INIT. "using I_LAYOUT.
ivariant = 'A'.
itvariant = w_variant.
select-options:so_vbeln for vbap-vbeln.
data:itab like vbak occurs 0 with header line.
data:itab1 like vbap occurs 0 with header line.
start-of-selection.
select * from vbak into table itab where vbeln in so_vbeln.
if not itab[] is initial.
select * from vbap into table itab1
for all entries in itab
where vbeln = itab-vbeln.
endif.
data:ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat1 TYPE slis_t_fieldcat_alv.
****For alv display
IF NOT itab1[] IS INITIAL.
DEFINE ls_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-fieldname = &1.
ls_fieldcat-outputlen = &2.
ls_fieldcat-seltext_l = &3.
ls_fieldcat-emphasize = &4.
append ls_fieldcat to lt_fieldcat1.
clear ls_fieldcat.
END-OF-DEFINITION.
ls_fieldcat 'VBELN' '10' 'Sales Order Number'.
ls_fieldcat 'POSNR' '6' 'SO Item'.
ls_fieldcat 'MATNR' '13' 'Material No'.
m_fieldcat1 'NETWR' '13' 'Amount'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = 'wf_report'
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = lt_fieldcat1
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT = ITVARIANT
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
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = itab1
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.
endif.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
I_SAVE = ivariant
CHANGING
CS_VARIANT = itvariant
EXCEPTIONS
WRONG_INPUT = 1
NOT_FOUND = 2
PROGRAM_ERROR = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
FORM F1000_LAYOUT_INIT. "USING I_LAYOUT TYPE SLIS_LAYOUT_ALV.
*CLEAR I_LAYOUT.
i_layout-colwidth_optimize = 'X'.
I_LAYOUT-key_hotspot = u2018Xu2019.
I_LAYOUT-hotspot_fieldname = MATNR.
ENDFORM.hi,,,,
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid >>>>>>>>>>>>> your report name.
regarding logo and header,,,,
first store the logo in T-code OAOR, then call that in your report.......
data: heading TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
events TYPE slis_t_event.
* To display TOP_OF_PAGE.
FORM top_of_page.
DATA : text(40),txtdt(40).
CLEAR l_string.
l_string = 'JCB India Limited'(hd2).
wa_header-typ = 'H'.
wa_header-info = l_string.
APPEND wa_header TO heading. " index 1.
CLEAR l_string.
WRITE :'Number of records:' TO text,dbcnt TO text+20 LEFT-JUSTIFIED.
wa_header-typ = 'S'.
wa_header-info = text.
APPEND wa_header TO heading.
CLEAR l_string.
wa_header-typ = 'S'.
WRITE : 'Report Run Date :' TO txtdt,sy-datum TO txtdt+20 DD/MM/YY.
WRITE sy-datum TO dat DD/MM/YY.
wa_header-info = txtdt.
APPEND wa_header TO heading.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = heading.
CLEAR heading.
ENDFORM. "top_of_page
to execute top-of-page you have to create events.
for ex......
FORM create_event USING p_events TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = p_events.
READ TABLE p_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE formname_top_of_page TO ls_event-form.
APPEND ls_event TO p_events.
ENDIF.
ENDFORM. " create_event -
hi,
what are the minimum requirements to display logo in alv report at the top of the page.
i searched forums but did n't get the required answer.Hi
This code is to display logo in the report through alv grid
*& Report ZALVDEMO *
REPORT ZALVDEMO.
TABLES : J_1IEXCHDR, " header table
J_1IEXCDTL, " item table
J_1IPART2, " Excise Part II details
LFA1, " vendor master table
J_1IMOVEND, " vendor excise details table
MSEG, " Document Segment: Material
MKPF, " Header: Material Document
DD07T, " domain text table
T001W. " Plant and Branch Details
DATA : BEGIN OF IT_CHDR OCCURS 100,
DOCNO LIKE J_1IEXCHDR-DOCNO,
DOCYR LIKE J_1IEXCHDR-DOCYR,
EXNUM LIKE J_1IEXCHDR-EXNUM,
EXDAT LIKE J_1IEXCHDR-EXDAT,
WERKS LIKE J_1IEXCHDR-WERKS,
EXBED LIKE J_1IEXCHDR-EXBED,
EXCCD LIKE J_1IEXCHDR-EXCCD,
ECS LIKE J_1IEXCHDR-ECS,
END OF IT_CHDR.
DATA : BEGIN OF IT_CDTL OCCURS 100,
DOCYR LIKE J_1IEXCDTL-DOCYR,
DOCNO LIKE J_1IEXCDTL-DOCNO,
EXNUM LIKE J_1IEXCDTL-EXNUM,
EXDAT LIKE J_1IEXCDTL-EXDAT,
LIFNR LIKE J_1IEXCDTL-LIFNR,
MATNR LIKE J_1IEXCDTL-MATNR,
MAKTX LIKE J_1IEXCDTL-MAKTX,
CHAPID LIKE J_1IEXCDTL-CHAPID,
EXBAS LIKE J_1IEXCDTL-EXBAS,
EXBED LIKE J_1IEXCDTL-EXBED,
ECS LIKE J_1IEXCDTL-ECS,
MENGE LIKE J_1IEXCDTL-MENGE,
MEINS LIKE J_1IEXCDTL-MEINS,
RDOC2 LIKE J_1IEXCDTL-RDOC2,
END OF IT_CDTL.
DATA TEXT(10).
DATA : BEGIN OF IT_OUT OCCURS 0,
SERIALNO LIKE J_1IPART2-SERIALNO,
TEXT1 LIKE TEXT,
EXNUM LIKE J_1IEXCDTL-EXNUM,
EXDAT LIKE J_1IEXCDTL-EXDAT,
NAME LIKE LFA1-NAME1,
DDTEXT LIKE DD07T-DDTEXT,
EXCCD LIKE J_1IEXCHDR-EXCCD,
BUDAT LIKE MKPF-BUDAT,
EXBAS LIKE IT_CDTL-EXBAS,
EXBED LIKE IT_CDTL-EXBED,
ECS LIKE IT_CDTL-ECS,
MATNR LIKE IT_CDTL-MATNR,
MAKTX LIKE IT_CDTL-MAKTX,
CHAPID LIKE IT_CDTL-CHAPID,
MENGE LIKE IT_CDTL-MENGE,
MEINS LIKE IT_CDTL-MEINS,
DEL_IND(1),
END OF IT_OUT.
DATA IT_PART2 LIKE J_1IPART2 OCCURS 0 WITH HEADER LINE.
DATA S_NO(4) .
DATA DB_CNT LIKE SY-TABIX.
DATA EBELN_T LIKE MSEG-EBELN .
TYPE-POOLS : SLIS.
DATA : AFIELD TYPE SLIS_FIELDCAT_ALV.
DATA : LIST_HEADER TYPE SLIS_T_LISTHEADER,
FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
LS_FTCAT TYPE LVC_S_FCAT,
SORTCAT TYPE SLIS_T_SORTINFO_ALV,
SORTCAT_LN LIKE LINE OF SORTCAT,
G_REPID LIKE SY-REPID,
G_BACK_GROUND(70), "like bapibds01-objkey,
GS_VARIANT LIKE DISVARIANT,
G_SAVE ,
GT_EVENTS TYPE SLIS_T_EVENT,
ALV_EVENT TYPE SLIS_ALV_EVENT,
EVENTCAT TYPE SLIS_T_EVENT,
EVENTCAT_LN LIKE LINE OF EVENTCAT,
LAYOUT_IN TYPE SLIS_LAYOUT_ALV,
LAYOUT_IN1 TYPE SLIS_LAYOUT_ALV.
CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
'TOP_OF_PAGE',
GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE
'USER_COMMAND',
GC_FORMNAME_BEFORE_OUTPUT TYPE SLIS_FORMNAME VALUE
'BEFORE_OUTPUT'.
ALV_EVENT TYPE SLIS_ALV_EVENT,
DATA EX_NO LIKE IT_CHDR-EXNUM VALUE 0.
DATA REGTYP_1 LIKE J_1IPART2-REGTYP.
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
PARAMETERS WERKS TYPE J_1IEXCHDR-WERKS.
SELECT-OPTIONS : BUDAT FOR J_1IEXCHDR-EXDAT.
PARAMETERS : R1 RADIOBUTTON GROUP GRP DEFAULT 'X',
R2 RADIOBUTTON GROUP GRP.
SELECTION-SCREEN END OF BLOCK B.
INITIALIZATION.
G_REPID = SY-REPID.
G_SAVE = 'A'.
PERFORM BUILD_EVENT USING GT_EVENTS[].
PERFORM ALV_EVENT_INIT.
AT SELECTION-SCREEN.
REFRESH LIST_HEADER.
PERFORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER.
START-OF-SELECTION.
PERFORM ALV_EVENT_INIT.
G_REPID = SY-REPID.
G_BACK_GROUND = ' ' .
IF R1 = 'X'.
CLEAR R2. CLEAR : REGTYP_1.
REGTYP_1 = 'A'.
set titlebar 'BALAJI' with DB_CNT.
ELSEIF R2 = 'X'.
CLEAR R1.CLEAR : REGTYP_1.
REGTYP_1 = 'C'.
set titlebar 'BALAJI1' with DB_CNT.
ENDIF.
SELECT * FROM J_1IPART2
INTO CORRESPONDING FIELDS OF TABLE IT_PART2
WHERE REGTYP = REGTYP_1 AND
TRNTYP = 'GRPO' AND
BUDAT IN BUDAT.
DOCYR = IT_CDTL-DOCYR AND
DOCNO = IT_CDTL-DOCNO.
LOOP AT IT_PART2.
SELECT SINGLE * FROM J_1IEXCHDR
INTO CORRESPONDING FIELDS OF IT_CHDR
WHERE TRNTYP = 'GRPO' AND
DOCYR = IT_PART2-DOCYR AND
DOCNO = IT_PART2-DOCNO AND
WERKS = WERKS AND
exdat IN BUDAT.
ORDER BY EXDAT.
IF SY-SUBRC = 0.
APPEND IT_CHDR.
ELSE.
CONTINUE.
ENDIF.
IF SY-SUBRC <> 0.
MESSAGE E084.
ENDIF.
ENDLOOP.
LOOP AT IT_CHDR.
SELECT * FROM J_1IEXCDTL
INTO CORRESPONDING FIELDS OF IT_CDTL
FOR ALL ENTRIES IN IT_CHDR
WHERE
TRNTYP = 'GRPO' AND
DOCNO = IT_CHDR-DOCNO AND
DOCYR = IT_CHDR-DOCYR AND
EXNUM = IT_CHDR-EXNUM AND
EXDAT = IT_CHDR-EXDAT AND
WERKS = IT_CHDR-WERKS.
IF SY-SUBRC = 0.
APPEND IT_CDTL.
ELSE.
CONTINUE.
ENDIF.
ENDSELECT.
ENDLOOP.
LOOP AT IT_CDTL.
CLEAR TEXT.
DB_CNT = DB_CNT + 1.
READ TABLE IT_CHDR WITH KEY EXNUM = IT_CDTL-EXNUM.
READ TABLE IT_PART2 WITH KEY DOCNO = IT_CDTL-DOCNO .
IT_OUT-SERIALNO = IT_PART2-SERIALNO.
SELECT SINGLE NAME1 FROM LFA1
INTO IT_OUT-NAME
WHERE LIFNR = IT_CDTL-LIFNR.
SELECT SINGLE * FROM LFA1
WHERE LIFNR = IT_CDTL-LIFNR.
IF LFA1-LAND1 EQ 'IN'.
TEXT = 'INVOICE'.
IT_OUT-TEXT1 = TEXT.
ELSE.
TEXT = 'BOE'.
IT_OUT-TEXT1 = TEXT.
ENDIF.
SELECT SINGLE * FROM J_1IMOVEND
WHERE LIFNR = IT_CDTL-LIFNR.
SELECT SINGLE * FROM DD07T
INTO IT_OUT-DDTEXT
WHERE DOMNAME = 'J_1IVTYP' AND
DDLANGUAGE = 'EN' AND
DOMVALUE_L = J_1IMOVEND-J_1IVTYP.
IF DD07T-DDTEXT = 'First Stage Dealer of indigenous excisable goods'
OR
DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisablegoods'.
DD07T-DDTEXT = 'Dealer'.
ENDIF.
IT_OUT-DDTEXT = DD07T-DDTEXT.
ELSEIF DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisable
*goods'.
DD07T-DDTEXT =
CLEAR EBELN_T.
SELECT SINGLE LFBNR FROM MSEG
INTO EBELN_T
WHERE MBLNR = IT_CDTL-RDOC2 .
SELECT SINGLE * FROM MSEG
WHERE BWART = '106' AND
LFBNR = EBELN_T ."and
ebeln = ebeln_t.
IF SY-SUBRC = 0.
IT_OUT-DEL_IND = 'X'.
ELSE.
IT_OUT-DEL_IND = ' '.
ENDIF.
SELECT SINGLE BUDAT FROM MKPF
INTO IT_OUT-BUDAT
WHERE MBLNR = EBELN_T ."MSEG-LFBNR.
IT_OUT-EXNUM = IT_CDTL-EXNUM.
IT_OUT-EXDAT = IT_CDTL-EXDAT.
IT_OUT-EXCCD = IT_CHDR-EXCCD.
IT_OUT-EXBAS = IT_CDTL-EXBAS.
IT_OUT-EXBED = IT_CDTL-EXBED.
IT_OUT-ECS = IT_CDTL-ECS.
IT_OUT-MATNR = IT_CDTL-MATNR.
IT_OUT-MAKTX = IT_CDTL-MAKTX.
IT_OUT-CHAPID = IT_CDTL-CHAPID.
IT_OUT-MENGE = IT_CDTL-MENGE.
IT_OUT-MEINS = IT_CDTL-MEINS.
APPEND IT_OUT.
EX_NO = IT_CDTL-EXNUM.
ENDLOOP.
Title Portion
IF REGTYP_1 = 'A'.
SET TITLEBAR 'BALAJI' WITH DB_CNT.
ELSEIF REGTYP_1 = 'C'.
SET TITLEBAR 'BALAJI1' WITH DB_CNT.
ENDIF.
AFIELD-COL_POS = 1.
AFIELD-FIELDNAME = 'SERIALNO'.
AFIELD-SELTEXT_L = 'INPUTS'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 2.
AFIELD-FIELDNAME = 'TEXT1'.
AFIELD-SELTEXT_L = 'TYPE OF DOC'.
AFIELD-JUST = 'L'.
AFIELD-DECIMALS_OUT = '0'.
AFIELD-NO_ZERO = 'X'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 3.
AFIELD-FIELDNAME = 'EXNUM'.
AFIELD-SELTEXT_L = 'DOC.NO'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 4.
AFIELD-FIELDNAME = 'EXDAT'.
AFIELD-SELTEXT_L = 'DOC.DATE'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 5.
AFIELD-FIELDNAME = 'NAME'.
AFIELD-SELTEXT_L = 'NAME OF THE SUPPLIER'.
AFIELD-NO_ZERO = 'X'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 6.
AFIELD-FIELDNAME = 'DDTEXT'.
AFIELD-SELTEXT_L = 'TYPE-OF-SUPPLIER'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 7.
AFIELD-FIELDNAME = 'EXCCD'.
AFIELD-SELTEXT_L = 'ECC OF THE SUPPLIER'.
AFIELD-NO_ZERO = 'X'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 8.
AFIELD-FIELDNAME = 'BUDAT'.
AFIELD-SELTEXT_L = 'INPUT RECV DATE'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 9.
AFIELD-FIELDNAME = 'EXBAS'.
AFIELD-SELTEXT_L = 'ASSESSABLE-VALUE'.
AFIELD-DO_SUM = 'X'.
AFIELD-JUST = 'R'.
AFIELD-DECIMALS_OUT = '2'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 10.
AFIELD-FIELDNAME = 'EXBED'.
AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN CENVAT'.
AFIELD-JUST = 'R'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 11.
AFIELD-FIELDNAME = 'ECS'.
AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN E-CESS'.
AFIELD-JUST = 'R'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 12.
AFIELD-FIELDNAME = 'MATNR'.
AFIELD-SELTEXT_L = 'MATERIAL-CODE'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 13.
AFIELD-FIELDNAME = 'MAKTX'.
AFIELD-SELTEXT_L = 'DESCRIPTION'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 14.
AFIELD-FIELDNAME = 'CHAPID'.
AFIELD-SELTEXT_L = 'TARIFF-ID'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 15.
AFIELD-FIELDNAME = 'MENGE'.
AFIELD-SELTEXT_L = 'QUANTITY'.
AFIELD-JUST = 'R'.
AFIELD-DO_SUM = ' '.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 16.
AFIELD-FIELDNAME = 'MEINS'.
AFIELD-SELTEXT_L = 'UOM'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 17.
AFIELD-FIELDNAME = 'DEL_IND'.
AFIELD-SELTEXT_L = 'Deleted'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
* LAYOUT FOR ZEBRA CATLOG
LAYOUT_IN-COLWIDTH_OPTIMIZE = 'X'.
LAYOUT_IN-ZEBRA = 'X'.
LAYOUT_IN-GET_SELINFOS = 'X'.
LAYOUT_IN-CONFIRMATION_PROMPT = 'X'.
LAYOUT_IN-DETAIL_POPUP = 'X' .
SORTCAT-decimals = '0'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_SAVE = G_SAVE
IS_VARIANT = GS_VARIANT
IT_FIELDCAT = FIELDCAT
IT_SORT = SORTCAT
IS_LAYOUT = LAYOUT_IN
IT_EVENTS = EVENTCAT
I_BACKGROUND_ID = g_back_ground
TABLES
T_OUTTAB = IT_OUT.
*& Form TOP_OF_PAGE_LIST_HEADER
text
-->LIST_HEADERtext
FORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER TYPE SLIS_T_LISTHEADER.
DATA : HLINE TYPE SLIS_LISTHEADER,
TEXT(60) TYPE C.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'ROOTS INDUSTRIES LTD' TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
SELECT SINGLE * FROM T001W WHERE WERKS = WERKS.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'PLANT :' TO TEXT.
WRITE WERKS TO TEXT+8.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-NAME1 TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-STRAS TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-ORT01 TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'DATE :' TO TEXT.
WRITE BUDAT-LOW TO TEXT+7.
IF BUDAT-HIGH NE ''.
WRITE 'TO' TO TEXT+18.
WRITE BUDAT-HIGH TO TEXT+22.
ENDIF.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
ENDFORM. "TOP_OF_PAGE_LIST_HEADER
*& Form ALV_EVENT_INIT
text
FORM ALV_EVENT_INIT .
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
ALV_EVENT-FORM = 'ALV_TOP_OF_PAGE'.
APPEND ALV_EVENT TO EVENTCAT.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
ALV_EVENT-FORM = 'ALV_TOP_OF_LIST'.
APPEND ALV_EVENT TO EVENTCAT.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_END_OF_LIST.
ALV_EVENT-FORM = 'ALV_END_OF_LIST'.
APPEND ALV_EVENT TO GT_EVENTS.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_END_OF_PAGE.
ALV_EVENT-FORM = 'ALV_END_OF_PAGE'.
APPEND ALV_EVENT TO GT_EVENTS.
ENDFORM. "ALV_EVENT_INIT
*& Form ALV_TOP_OF_PAGE
text
FORM ALV_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = LIST_HEADER
I_LOGO = 'ENJOYSAP_LOGO'.
ENDFORM. "ALV_TOP_OF_PAGE
*& Form BUILD_EVENT
text
-->P_GT_EVENTS[] text
FORM BUILD_EVENT USING P_EVENTS TYPE SLIS_T_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = P_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND INTO
ALV_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_USER_COMMAND TO ALV_EVENT-FORM.
APPEND ALV_EVENT TO P_EVENTS.
ENDIF.
READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT INTO
ALV_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_BEFORE_OUTPUT TO ALV_EVENT-FORM.
APPEND ALV_EVENT TO P_EVENTS.
ENDIF.
ENDFORM. " BUILD_EVENT
this wud help u -
Is there any transaction code for uploding logo in ALV reports.
is there any transaction code for uploding logo in ALV reports.
hi,
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform.
Upload Logo for REUSE_ALV_COMMENTARY_WRITE
For those who wish to upload and use a picture in your ALV abap reports.
Steps for uploading Logo :-:
1. Goto the transaction OAER
2. Enter the class name as 'PICTURES'
3. Enter the class type as 'OT'
4. Enter the object key as the name of the logo you wish to give
5. Execute
6. Then in the new screen select Standard doc. types in bottom window
Click on the Screen icon
Now, it will ask for the file path where you have to upload the logo
7. Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE
or
Import Logo and Background Picture for Reporting
In this step, you can import a customer-specific logo and a background picture into the R/3 System. These will be displayed in the header area of reports in HR Funds and Position Management.
From the SPRO:
HR Funds and Position Management --> Dialog Control --> Customize Reporting Interface --> Import Logo and Background Picture for Reporting.
Activities
1. Enter the Name of your logo/background picture as an object key in the initial screen.
2. Make sure that the class name is PICTURES, and the class type is OT.
3. Choose Execute.
4. Double-click the document type Picture on the Create tab page. A dialog box will appear in which you can enter the path in which the logo/background picture can be found.
5. Enter the path and choose Open. The logo will be uploaded into the current R/3 System. If the logo/background picture is to be transported into other systems as well, choose Transport.
6. Return to the initial screen and repeat the procedure after having entered the Name of your background picture as an object key.
Please note that the logo/background picture can only be displayed in ALV-based reports with an HTML header. Manually programmed reports such as business distribution plans are not based on the ALV.
If you have selected several initial objects, ALV-based reports in HR Funds and Position Management will automatically use a hiearchical-sequential display. A logo is not displayed here either. Note also that the logo cannot be printed (see print preview in program).
Make sure that the logo does not exceed a height of 100 pixels because it would mean that the header of the report will be scrollable. -
How to devolped an Interactive ALV Report to display sales orders
hi,
how to devolped an Interactive ALV Report to display sales orders pertaining to the selected Customers and item details in the secondary list.For this report what are the tables and fields wehave to used give with example.
thank you
radhakrishnaHi,
look via se38 for BCALV* and SALV*.
Try ABAPDOCU.
Regards, Dieter -
How to add filter in Bex report
hi how to add filter in BEx report and what is the difference between filter and free charcteristics.
Regards,
Viren.Hi Viren,
difference between filter and free characteristics is that free characteristics can be added to drilldown at query runtime. Filter values can not be changed at query runtime.
You can add a filter to a query by placing a characteristic in filter section and restrict the characteristic to certain values. Characteristics in rows / columns / free characteristics section can be restricted to certain values, too.
Best regards,
Björn -
How to find the customised alv reports
Hi guys,
I m working on a alv-grid report in PP.I want to know how can i find the alv reports already been created in the system.
Thanks in advance.hi,
GO to se37
give the fm name
reuse_alv_grid_display
reuse_alv_LIST_display
and clik the where used list
and select programs
and in that list check out the zprograms or y programs
then you can see it
regards,
Venkatesh -
Hi,
I've created an ALV report with a logo in the header.
But, when i'm taking the printout ,the logo is not printed.
How to solve this problem,..please help me .
Thanks and regards.
RajeshIt is not possible to Print the logo, which you are showing in ALV Grid.
But you have to work with Cl_DD_DOCUMENT class
Check this program DD_ADD_PICTURE, Here you can print the logo.the same you can try to implement if you want. -
Add buttons in ALV Report output
Dear Friends,
I am developing one ALV report in PP moule for calculating Shelf Life. The output is coming properly in ALV.
But my additional requirement is ADD coustomise buttons in ALV Reports.
Please give me an idea how can I insert buttons in my alv report?
Thanks & Regards
VasuHi vasu,
consider the code given below.
FORM F4200_PF_STATUS_SET *
FORM f4200_pf_status_set USING i_extab TYPE slis_t_extab.
REFRESH i_extab.
PERFORM f4210_exclude_fcodes CHANGING i_extab.
The PF status is an exact copy of the PF status 'STANDARD' of program
SAPLSALV but with command 'CHNG' added to it.
SET PF-STATUS 'ZSOM_STANDARD' EXCLUDING i_extab.
ENDFORM.
*& Form f4210_exclude_fcodes
FORM f4210_exclude_fcodes USING i_extab TYPE slis_t_extab.
DATA: ws_fcode TYPE slis_extab.
CLEAR ws_fcode.
ws_fcode = '&EB9'. " Call up Report.
APPEND ws_fcode TO i_extab.
ws_fcode = '&ABC'. " ABC Analysis.
APPEND ws_fcode TO i_extab.
ws_fcode = '&NFO'. " Info Select.
APPEND ws_fcode TO i_extab.
ws_fcode = '&LFO'. " Information.
APPEND ws_fcode TO i_extab.
ENDFORM. " f4210_exclude_fcodes
*& Form f4300_user_command
FORM f4300_user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
CASE ucomm.
WHEN '&IC1'. "Double Click line Item
READ TABLE i_data INDEX selfield-tabindex.
IF i_data-qmnum NE space.
SET PARAMETER ID 'IQM' FIELD i_data-qmnum.
CALL TRANSACTION 'IW52' AND SKIP FIRST SCREEN.
CLEAR ucomm.
ENDIF.
WHEN 'CHNG'. " Change Notification Icon
READ TABLE i_data INDEX selfield-tabindex.
IF i_data-qmnum NE space.
SET PARAMETER ID 'IQM' FIELD i_data-qmnum.
CALL TRANSACTION 'IW52' AND SKIP FIRST SCREEN.
CLEAR ucomm.
ENDIF.
ENDCASE.
CLEAR ucomm.
ENDFORM. " f4300_user_command
EXPLANATION
In this program, first we created a PF status (ZSOM_STANDARD), which was an exact copy of STANDARD of program SAPLSALV through transaction SE41 (Menu Painter). Then we added another button to it,with a new fcode called CHNG. After this this we set this PF status instead of STANADRD.
We initialize a third event USER_COMMAND and associate a form with it. In this form we can capture the function codes and write any functionality under it. If we write functionality for an existing fcode, then this gets precedence over the default functionality that might be associated with it.
In this example, we capture a standard fcode &IC1 that is nothing but double clicking a line of the report. We are capturing the notification number of that line and calling transaction IW52 with it. We are also doing the same when a user clicks on the new Change Notification button.
When the user clicks the Back button in IW52, it comes back to the report.
Please reward for the same.
Message was edited by: Prakhar Saxena -
Need to print the company logo in alv report
Hi All ,
I am displaying an alv grid for some QM report .
I have used top-of-page event and 'REUSE_ALV_COMMENTARY_WRITE ' FM to display the logo and header . Every thing is working fine .
But when I am taking the print-out the logo is not getting printed . Except logo everything is coming in the print out.
So please help me if you have any idea ragarding how to print the logo in the report.
regards
Satishprint the logo is really simple, check this little sample:
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'Z_LOGO'
it_list_commentary = gt_list_top_of_page.
and how to upload the logo in this link:
uploading logo
regards
Edited by: Sebastian Bustamante on Sep 24, 2008 3:26 PM -
How to print logo in standard report
Hi,
How to print a logo in sap ordinary report
Thanks,
SreedharHi Sreedhar,
It is not possible to print logo in the ordinary report, but it can done through ALV.
Write the code in Top-of-page event in ALV.
The following is the code for inserting the logo in ALV.
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'ENJOYSAP_LOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM.
Rewards if it is helpful...
Regards,
Omkar. -
Customise Sap Report -- Add logo and change report layout
Hi All,
I have a requirement to amend sap standard report to add logo and change layout, could some one pls point me to teh right direction. Should we .1 Create a new smartfrom if yes -- how to to create smartfroms
2. Should we create new Zreport...3. Is Adobe Interactive forms any good---- cld you please share the steps to create Adobe Ine Form 4. is sap script any good way in my situation
Thanks
SmithChanges to SAP Standard are always a bit tricky, specially if we are talking about legal reports. If the standard report uses smartform, you can change the standard form without needing a SSCR key, so no need to create a Z report or smartform even, but like every change on SAP Standard, if further changes are made by SAP through Support packages you will always have to replicate them yourself everytime this happens. I would suggest creating a new Z report by copy of standard and new Z smartform, that way you can always recurr to the standard and see what was changed and then replicate them in you Z reports.
To create smartform, go to TCode smarforms and you can create one by copy of an existing smartform.
Adobe Interactive forms is more complex then smartforms and unless the standard uses a print form, i would not suggest you creating one as it will envolve a bit more knowledge.
Maybe you are looking for
-
How do I deactivate Photoshop on old laptop?
I downloaded Photoshop Elements 11 onto my old laptop some months ago but never actually got any further than that and have never used it. I now have a new laptop and I do want to use Photoshop on that but is there some action I need to do on the old
-
Hi, I upgraded our VMM 2008 R2 SP1 environment to VMM 2012 SP1 RU2 last month which includes a couple of clusters and several standalone hosts. Since then the VMM agent on the hosts is crashing regularly, every 1-3 hours for some hosts. I've attache
-
Develop module not working since upgrade to 4.2
I've installed the 4.2 upgrade and now the develop module doesn't work anymore. It was working fine on 4.1, 64bit version. I'm on Windows 7 Pro, with second generation i7 CPU, 16 gig Ram Please have look at this thread at Photoshop.com were I reporte
-
Starting a new album in iPhoto.
On my MacBook I can create a new iPhoto album using file/new or the icons bottom right of the iPhoto screen. But the problem is that the created new album copies all photos from the album above in the list. There is no instruction on how to create a
-
Wi-Fi function available - However unable to detect any Wireless Networks
Hi All, Yet another thread about Wi-Fi issues with the iPhone. --- Underlying problem I am experiencing. --- iPhone Wi-Fi function is available. When I try connecting to Wireless Networks I receive a message detecting available network and it will no