Header and Logo in Blocked ALV
Is It possible to put header and logo in Blocked ALV Report.
Is yes shall I go with the same way we put the Header and Logo in ALV Grid report.
Thanks in Advance.
Hi,
You can put the haeder and logo same like we have used to do in classical ALV's....
sample code snippet..
REPORT ZALV_BLOCKEDALV .
*provide tables
TABLES: MARA, MAKT, MARD.
*provide type-pools
TYPE-POOLS: SLIS.
*provide select-options
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
*provide data objects
DATA: V_REPID TYPE SY-REPID,
WA_MARA_FIELD TYPE SLIS_FIELDCAT_ALV, "it is for field catalog
WA_MAKT_FIELD TYPE SLIS_FIELDCAT_ALV,
WA_MARD_FIELD TYPE SLIS_FIELDCAT_ALV,
WA_MARA TYPE MARA,
WA_MAKT TYPE MAKT,
WA_MARD TYPE MARD, IT_MARA_FIELD TYPE SLIS_T_FIELDCAT_ALV,
IT_MAKT_FIELD TYPE SLIS_T_FIELDCAT_ALV,
IT_MARD_FIELD TYPE SLIS_T_FIELDCAT_ALV,
IT_MARA TYPE TABLE OF MARA,
IT_MAKT TYPE TABLE OF MAKT,
IT_MARD TYPE TABLE OF MARD, V_LAYOUT TYPE SLIS_LAYOUT_ALV,
IT_EVENTS TYPE SLIS_T_EVENT, "it is for events
WA_EVENTS TYPE SLIS_ALV_EVENT.V_REPID = SY-REPID.
*provide field catalog perform
PERFORM FIELD_CAT.
*call the initial function module
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* IT_EXCLUDING =
*provide perform for select the data
PERFORM SELECT_DATA.
*call mara append list
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = V_LAYOUT
IT_FIELDCAT = IT_MARA_FIELD[]
I_TABNAME = 'MARA'
IT_EVENTS = IT_EVENTS[]
* IT_SORT =
* I_TEXT = ' '
TABLES
T_OUTTAB = IT_MARA
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 2
OTHERS = 3.
*call makt append list
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = V_LAYOUT
IT_FIELDCAT = IT_MAKT_FIELD
I_TABNAME = 'MAKT'
IT_EVENTS = IT_EVENTS
* IT_SORT =
* I_TEXT = ' '
TABLES
T_OUTTAB = IT_MAKT
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 2
OTHERS = 3.
*call mard append list
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = V_LAYOUT
IT_FIELDCAT = IT_MARD_FIELD
I_TABNAME = 'MARD'
IT_EVENTS = IT_EVENTS
* IT_SORT =
* I_TEXT = ' '
TABLES
T_OUTTAB = IT_MARD
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 2
OTHERS = 3.
*display the data
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
* EXPORTING
* I_INTERFACE_CHECK = ' '
* IS_PRINT =
* 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 =
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2.
*& Form TOP_PAGE
* text
FORM TOP_PAGE. WRITE:/ 'THIS IS BLOCKED ALV REPORT PROGRAM BASED ON 3 BLOCKS' COLOR
5.ENDFORM. "TOP_PAGE
*& Form FIELD_CAT
* text
* --> p1 text
* <-- p2 text
FORM FIELD_CAT .WA_MARA_FIELD-COL_POS = 1.
WA_MARA_FIELD-FIELDNAME = 'MATNR'.
WA_MARA_FIELD-REF_TABNAME = 'MARA'.
APPEND WA_MARA_FIELD TO IT_MARA_FIELD.
CLEAR WA_MARA_FIELD.WA_MARA_FIELD-COL_POS = 2.
WA_MARA_FIELD-FIELDNAME = 'ERSDA'.
WA_MARA_FIELD-REF_TABNAME = 'MARA'.
APPEND WA_MARA_FIELD TO IT_MARA_FIELD.
CLEAR WA_MARA_FIELD.WA_MARA_FIELD-COL_POS = 3.
WA_MARA_FIELD-FIELDNAME = 'ERNAM'.
WA_MARA_FIELD-REF_TABNAME = 'MARA'.
APPEND WA_MARA_FIELD TO IT_MARA_FIELD.
CLEAR WA_MARA_FIELD.WA_MARA_FIELD-COL_POS = 4.
WA_MARA_FIELD-FIELDNAME = 'LAEDA'.
WA_MARA_FIELD-REF_TABNAME = 'MARA'.
APPEND WA_MARA_FIELD TO IT_MARA_FIELD.
CLEAR WA_MARA_FIELD.WA_MAKT_FIELD-COL_POS = '1'.
WA_MAKT_FIELD-FIELDNAME = 'MATNR'.
WA_MAKT_FIELD-REF_TABNAME = 'MAKT'.
APPEND WA_MAKT_FIELD TO IT_MAKT_FIELD.
CLEAR WA_MAKT_FIELD.WA_MAKT_FIELD-COL_POS = 2.
WA_MAKT_FIELD-FIELDNAME = 'MAKTX'.
WA_MAKT_FIELD-REF_TABNAME = 'MAKT'.
APPEND WA_MAKT_FIELD TO IT_MAKT_FIELD.
CLEAR WA_MAKT_FIELD.WA_MAKT_FIELD-COL_POS = 3.
WA_MAKT_FIELD-FIELDNAME = 'MAKTG'.
WA_MAKT_FIELD-REF_TABNAME = 'MAKT'.
APPEND WA_MAKT_FIELD TO IT_MAKT_FIELD.
CLEAR WA_MAKT_FIELD.WA_MARD_FIELD-COL_POS = 1.
WA_MARD_FIELD-FIELDNAME = 'MATNR'.
WA_MARD_FIELD-REF_TABNAME = 'MARD'.
APPEND WA_MARD_FIELD TO IT_MARD_FIELD.
CLEAR WA_MARD_FIELD.WA_MARD_FIELD-COL_POS = 2.
WA_MARD_FIELD-FIELDNAME = 'WERKS'.
WA_MARD_FIELD-REF_TABNAME = 'MARD'.
APPEND WA_MARD_FIELD TO IT_MARD_FIELD.
CLEAR WA_MARD_FIELD.WA_MARD_FIELD-COL_POS = 3.
WA_MARD_FIELD-FIELDNAME = 'LGORT'.
WA_MARD_FIELD-REF_TABNAME = 'MARD'.
APPEND WA_MARD_FIELD TO IT_MARD_FIELD.
CLEAR WA_MARD_FIELD.WA_EVENTS-FORM = 'TOP_PAGE'.
WA_EVENTS-NAME = 'TOP_OF_PAGE'.
APPEND WA_EVENTS TO IT_EVENTS.ENDFORM. " FIELD_CAT
*& Form SELECT_DATA
* text
* --> p1 text
* <-- p2 text
FORM SELECT_DATA .SELECT *
FROM MARA
INTO TABLE IT_MARA
WHERE MATNR IN S_MATNR.SELECT *
FROM MAKT
INTO TABLE IT_MAKT
WHERE MATNR IN S_MATNR.SELECT *
FROM MARD
INTO TABLE IT_MARD
WHERE MATNR IN S_MATNR.ENDFORM. " SELECT_DATA
hope this will help you
regards,
kiran
Edited by: kiran kumar on Aug 23, 2010 1:43 PM
Similar Messages
-
Header and Footer in Block ALV Display
Hi All,
My requirement includes to ALV Block List Display with header and footer.
I have made two forms TOP_OF_PAGE and END_OF_PAGE . I have pass the form and name of event to an internal table it_events.
This it_events[] is then passed to FM ' REUSE_ALV_BLOCK_LIST_APPEND' . But only Top of Page is working.
Am I missing any thing in the code? or I have to use something else.
Pls Help
Regards,
NibhaHi,
For end_of_page you need to use Events as follows:
*TO CAPTURE EVENTS AND HANDLE
DATA : it_event TYPE slis_t_event,
wa_event TYPE slis_alv_event.
*& Form BUILD_EVENTCAT
FORM build_eventcat .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_event
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
READ TABLE it_event INTO wa_event WITH KEY name = 'END_OF_LIST'.
wa_event-form = 'END_OF_PAGE'. " Sub-routine that will be used to write
MODIFY it_event FROM wa_event INDEX sy-tabix. " Modify it_event
CLEAR wa_event.
ENDFORM. " F_BUILD_EVENTCAT
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = g_t_alv_layout2
it_fieldcat = g_t_fieldcat2[]
it_events = it_event[]
TABLES
t_outtab = <fs_final_itab>.
Regards,
Mansi. -
Need to add Header and footer in an alv grid display output.
How can I add header and footer in an alv grid dispay output.
For the grid display, I am using the function module "REUSE_ALV_GRID_DISPLAY".HI,
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_html_end_of_list = 'END_OF_LIST_HTML'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
DATA: ls_text TYPE sdydo_text_element,
l_grid TYPE REF TO cl_gui_alv_grid,
f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
ls_text = 'Footer title'.
adds and icon (red triangle)
CALL METHOD end->add_icon
EXPORTING
sap_icon = 'IL'.
adds test (via variable)
CALL METHOD end->add_text
EXPORTING
text = ls_text
sap_emphasis = 'strong'.
adds new line (start new line)
CALL METHOD end->new_line.
display text(bold)
CALL METHOD end->add_text
EXPORTING
text = 'Bold text'
sap_emphasis = 'strong'.
adds new line (start new line)
CALL METHOD end->new_line.
display text(normal)
CALL METHOD end->add_text
EXPORTING
text = 'Nor'.
adds new line (start new line)
CALL METHOD end->new_line.
display text(bold)
CALL METHOD end->add_text
EXPORTING
text = 'Yellow '
sap_emphasis = 'str'.
adds and icon (yellow triangle)
CALL METHOD end->add_icon
EXPORTING
sap_icon = 'IC''.
display text(normal)
CALL METHOD end->add_text
EXPORTING
text = 'Mor'.
*set height of this section
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = l_grid.
CALL METHOD l_grid->parent->parent->(f)
EXPORTING
id = 3
height = 14.
ENDFORM. "end_of_list_html.
This will solve it. Post if you need more help in this.
Regards,
Madhu. -
How to place header and footer in OO-ALV program using class
How to place header and footer in OO-ALV program using class tell me wat r the class we shold use and their attributes as well
Hi Venkatesh,
Take a look at this how to [ABAP Objects - ALV Model - Using Header and Footer|https://wiki.sdn.sap.com/wiki/x/xdw]
it's explaining how to define the classes and use it for display an ALV with Header and Footer.
Regards,
Marcelo Ramos -
Hi Experts,
Looking into cProjects information we've seen that there are three methods to define a header and logo for cProjects 4.0:
Modification to the webdynpro, changing the standard images by the new one
Developing a new webdypro which contains the new images
Creating a connection to an external server that contains the images*
Is there any way that we can use a image stored on the same system, for example, in cFolders?
Thanks in advance.
Kind regards.
NeilIssue solved.
-
How ca i create a stationery for sending mail with my letter head and logo etc.
I want to use a stationery with my letter head and logo for sending mails. Please tell me how can I create my page.
http://kb.mozillazine.org/Thunderbird_:_FAQs_:_Using_Templates
-
How to export an ALV to Excel with its Header and Logo?
Hi guys,
I need to download to excel an ALV to excel. I already know how to download the ALV part, with its propertys, fonts, colors, etc. But I don't have a clue about how to download the header and the logo.
Any suggestion?.
Regards,
EricHi Eric,
Please check this link for sample code regarding LOGO to Excel
How to Download ALV Output LOGO to Excel ?
For Header to Excel check this link
Export header of alv-oo into excel
Hope this would help you.
Good luck
Narin -
Totals and subtotals in blocked alv
hi
totals and subtotals for data type (CURR) fields is not coming in blocked alv report... Plz can u help us in this regard.. urgent.
thnx in advancehave a look on this
REPORT YMS_ALVBLOCKLIST.
TABLES:LFA1,EKKO.
SELECT-OPTIONS:LIFNR FOR LFA1-LIFNR.
DATA:BEGIN OF ITAB OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
LAND1 LIKE LFA1-LAND1,
ORT01 LIKE LFA1-ORT01,
REGIO LIKE LFA1-REGIO,
END OF ITAB.
DATA:BEGIN OF JTAB OCCURS 0,
LIFNR LIKE EKKO-LIFNR,
EBELN LIKE EKKO-EBELN,
BUKRS LIKE EKKO-BUKRS,
BSTYP LIKE EKKO-BSTYP,
EKORG LIKE EKKO-EKORG,
BSART LIKE EKKO-BSART,
END OF JTAB.
SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE LIFNR
IN LIFNR.
SELECT * FROM EKKO INTO CORRESPONDING FIELDS OF TABLE JTAB WHERE LIFNR
IN LIFNR.
TYPE-POOLS:SLIS.
DATA:LAYOUT TYPE slis_layout_alv.
DATA:EVE TYPE slis_t_event WITH HEADER LINE.
DATA:EVE1 TYPE slis_t_event WITH HEADER LINE.
DATA:HEAD TYPE slis_t_listheader WITH HEADER LINE.
DATA:FCAT TYPE slis_t_fieldcat_alv.
DATA:FCAT1 TYPE slis_t_fieldcat_alv.
LAYOUT-ZEBRA = 'X'.
LAYOUT-colwidth_optimize = 'X'.
LAYOUT-WINDOW_TITLEBAR = 'VENDOR DETAILS SCREEN'.
EVE1-NAME = 'TOP_OF_PAGE'.
EVE1-FORM = 'TOP_OF_PAGE1'.
APPEND EVE1.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = EVE[]
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.
READ TABLE EVE WITH KEY NAME = 'TOP_OF_PAGE'.
EVE-FORM = 'TOP_OF_PAGE'.
MODIFY EVE TRANSPORTING FORM WHERE NAME = 'TOP_OF_PAGE'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* IT_EXCLUDING =
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'ITAB'
* I_STRUCTURE_NAME =
* I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = SY-REPID
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = FCAT
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FCAT
I_TABNAME = 'ITAB'
IT_EVENTS = EVE[]
* IT_SORT =
* I_TEXT = ' '
TABLES
T_OUTTAB = ITAB
* EXCEPTIONS
* PROGRAM_ERROR = 1
* MAXIMUM_OF_APPENDS_REACHED = 2
* OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'JTAB'
* I_STRUCTURE_NAME =
* I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = SY-REPID
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = FCAT1
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FCAT1
I_TABNAME = 'JTAB'
IT_EVENTS = EVE1[]
* IT_SORT =
* I_TEXT = ' '
TABLES
T_OUTTAB = JTAB
* EXCEPTIONS
* PROGRAM_ERROR = 1
* MAXIMUM_OF_APPENDS_REACHED = 2
* OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
* EXPORTING
* I_INTERFACE_CHECK = ' '
* IS_PRINT =
* 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 =
* 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.
FORM TOP_OF_PAGE.
REFRESH HEAD.
HEAD-TYP = 'H'.
HEAD-INFO = 'VENDORS DETAILS'.
APPEND HEAD.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = HEAD[]
* I_LOGO =
* I_END_OF_LIST_GRID =
ENDFORM.
FORM TOP_OF_PAGE1.
REFRESH HEAD.
HEAD-TYP = 'H'.
HEAD-INFO = 'PURCHASE DOCCUMENTS DETAILS'.
APPEND HEAD.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = HEAD[]
* I_LOGO =
* I_END_OF_LIST_GRID =
ENDFORM. -
Hi All,
What is the use of Header and Footer Area (Top of List & End of List ) in ALV table. Can any one explain me..
Thanks,
Susilhi ,
In the below link there is an example for creating top of list end end of list.. in this the header and footer are displayed outside the ALV table.. My question is what is the use of the header and footer even I can use UI's to display the header and footer...
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0ee06d0-d475-2b10-ddad-bc4bf134cfb8?overridelayout=true
Thanks,
Susil. -
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 -
Header and footer in ALV using CL_SALV_TABLE
How to add header and footer for an ALV report using CL_SALV_TABLE. I know how to add header lr_table->set_top_of_list_print( lr_header )
but how do I make it aligned center.
Also how to add a footer
I want it to look like Current page of total pages
What is the system variable for total pages.Hi,
this should be the Method:
SET_END_OF_LIST_PRINT
Best Regards -
Header and Footer for ALV Layout
Hi All,
I have used the following code to create the Header and Footer Areas for ALV Report.
CLEAR: FS_EVENTCAT.
FS_EVENTCAT-NAME = 'TOP_OF_PAGE'.
FS_EVENTCAT-FORM = 'build_comment'.
APPEND FS_EVENTCAT TO GT_EVENTS.
CLEAR: FS_EVENTCAT.
FS_EVENTCAT-NAME = 'END_OF_LIST'.
FS_EVENTCAT-FORM = 'F_WRITE_SUMMARY'.
APPEND FS_EVENTCAT TO GT_EVENTS.
Now the space is available for both Header and Footer...
But i would like to display the Text in Header and Footer areas...
How to insert the Texts....????
Can you help me please.....???
Regards
PavanHi,
Try with following example program:
REPORT ZRJR02 .
*Table declaration.
TABLES:ZEMP_MST,ZDEPT_MST,ZDESG_MST,ZSL_TXN.
*Varriable declaration.
TYPE-POOLS SLIS.
DATA : POS TYPE I.
DATA REPID LIKE SY-REPID.
DATA : F1 TYPE SLIS_T_FIELDCAT_ALV,
F2 TYPE SLIS_FIELDCAT_ALV,
L_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA L_POS TYPE I VALUE 1. "position of the column
DATA GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
*DATA GT_SORT TYPE SLIS_T_SORTINFO_ALV.
data: GT_EVENTS TYPE SLIS_T_EVENT,
FS_EVENTCAT LIKE LINE OF GT_EVENTs.
*Internal table declaration.
*DATA BEGIN OF IT_SORT OCCURS 5.
INCLUDE TYPE SLIS_SORTINFO_ALV.
*DATA END OF IT_SORT.
DATA:BEGIN OF ITAB OCCURS 0,
ZEMPNO LIKE ZEMP_MST-ZEMPNO,
ZEMPNAME LIKE ZEMP_MST-ZEMPNAME,
ZDEPTCD LIKE ZEMP_MST-ZDEPTCD,
ZDEPTNAME LIKE ZDEPT_MST-ZDEPTNAME,
ZDESGCD LIKE ZEMP_MST-ZDESGCD,
ZDESGNAME LIKE ZDESG_MST-ZDESGNAME,
END OF ITAB.
REFRESH ITAB.CLEAR ITAB.
START-OF-SELECTION.
SELECT AZEMPNO AZEMPNAME AZDEPTCD BZDEPTNAME AZDESGCD CZDESGNAME
FROM ZEMP_MST AS A
INNER JOIN ZDEPT_MST AS B
ON AZDEPTCD EQ BZDEPTCD
INNER JOIN ZDESG_MST AS C
ON AZDESGCD EQ CZDESGCD
INTO CORRESPONDING FIELDS OF TABLE ITAB.
IF SY-SUBRC <> 0.
MESSAGE E899(M3) WITH 'No records'.
ENDIF.
perform f_build_eventcat.
PERFORM LAYOUT.
END-OF-SELECTION.
*& Form LAYOUT
FORM LAYOUT .
PERFORM FCAT USING 'ZEMPNO' 'ITAB' '' 'Emp.No.' 'ZEMPNO' 'ZEMP_MST' ''.
PERFORM FCAT USING 'ZEMPNAME' 'ITAB' '' 'Emp. Name' 'ZEMPNAME' 'ZEMP_MST' ''.
PERFORM FCAT USING 'ZDEPTCD' 'ITAB' '' 'Dept.Code' 'ZDEPTCD' 'ZEMP_MST' ''.
PERFORM FCAT USING 'ZDEPTNAME' 'ITAB' '' 'Dept.Name' 'ZDEPTNAME' 'ZDEPT_MST' ''.
PERFORM FCAT USING 'ZDESGCD' 'ITAB' '' 'Desg.Code' 'ZDESGCD' 'ZEMP_MST' ''.
PERFORM FCAT USING 'ZDESGNAME' 'ITAB' '' 'Desg.Name' 'ZDESGNAME' 'ZDESG_MST' ''.
PERFORM LSORT USING 'ZEMPNO' 'IDATA' ''.
PERFORM LSORT USING 'ZEMPNAME' 'IDATA' ''.
MOVE IT_SORT[] TO GT_SORT[].
REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPID
IT_FIELDCAT = F1
IT_SORT = GT_SORT
I_SAVE = 'X'
IT_EVENTS = GT_EVENTS[]
TABLES
T_OUTTAB = ITAB.
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. " LAYOUT
*& Form FCAT
FORM FCAT USING P_FIELD P_TABLE P_SUM P_TEXT P_RFIELD P_RTABLE P_DISP.
ADD 1 TO POS.
F2-COL_POS = POS.
F2-FIELDNAME = P_FIELD.
F2-TABNAME = P_TABLE.
F2-SELTEXT_L = P_TEXT.
F2-REF_FIELDNAME = P_RFIELD.
F2-REF_TABNAME = P_RTABLE.
F2-DO_SUM = P_SUM.
F2-NO_OUT = P_DISP.
APPEND F2 TO F1.
CLEAR F2.
ENDFORM. " FCAT
*& Form LSORT
*FORM LSORT USING P_FIELD P_TABLE P_UP.
ADD 1 TO L_POS.
IT_SORT-SPOS = L_POS.
IT_SORT-FIELDNAME = P_FIELD.
IT_SORT-TABNAME = P_TABLE.
IT_SORT-UP = P_UP.
APPEND IT_SORT.
*ENDFORM. " LSORT
FORM F_BUILD_EVENTCAT .
CLEAR: GT_EVENTS. REFRESH: GT_EVENTS.
CLEAR: FS_EVENTCAT.
FS_EVENTCAT-NAME = 'TOP_OF_PAGE'.
FS_EVENTCAT-FORM = 'F_REPORT_HEADER_ALV'.
APPEND FS_EVENTCAT TO GT_EVENTS.
CLEAR: FS_EVENTCAT.
FS_EVENTCAT-NAME = 'END_OF_LIST'.
FS_EVENTCAT-FORM = 'F_WRITE_SUMMARY'.
APPEND FS_EVENTCAT TO GT_EVENTS.
ENDFORM. " F_BUILD_EVENTCAT
FORM F_REPORT_HEADER_ALV.
CALL FUNCTION 'Z_YHEAD_PRINT'
EXPORTING
TITLE1 = 'XYZ Limited'
TITLE2 = 'Employee Master'
TITLE3 = 'Created on '
COLOR = 'X'
ENDFORM.
*& Form F_WRITE_SUMMARY
Write summary before exit
FORM F_WRITE_SUMMARY .
write:/ 'Welcome to XYZ Limited'.
write:/ 'This is a test program to display Report in ALV Format'.
ENDFORM.
Regards,
Bhaskar -
Displays only menu border and logo
I have two Apple TVs in my home. One is in a living room and the other in a bedroom. Both are syncing to a G5 tower. Both are 160 GB ATVs.
The living room drive has never had any issues. The bedroom ATV is an AppleCare replacement due to an issue that I had and continue to have (with the new ATV). The issue is that sometimes the Apple TV only displays the menu border (frame) without any text menus. The AppleTV header and Logo are displayed in the bordered frame but menus like Movies, Music, Photo, etc. do not display. If I leave the box alone and come back to it hours later it sometimes comes back when I return.
If any of you can shed light on what is gong on I would greatly appreciate it.
Thanks,
BrentThanks so much for offering your feedback and suggestions regarding my issue. Let me answer both suggestions. First, the AppleTV does not have any additional software enhancements. It is stock build.
I like the idea of an HDMI cable issue. I will replace with component cables and see if that makes a difference. Thank you both again for your suggestions. -
Blocked ALV Header and Item Displau
Hi Friends,
I`m new to ABAP and the forum.I`m in dire need of solution for a report.
Scenario
I have an internal table with fields ebeln vbeln adrnr.
For every change in ebeln i need to create a new page in ALV and display the item VBELN and some more fields.
Its like a header and item in a single page of alv report.
Is there a possibility to use ALV here or only classical report can be used in the scenario???Hi,
For Blocked alv header and item display you
declaration internal table fields ebeln vbeln adrn
TYPE-POOLS SLIS.
TYPES : BEGIN OF TY_EKKO,
EBELN TYPE EKKO-EBELN,
AEDAT TYPE EKKO-AEDAT,
vblen TYPE EKKO- vbeln,
END OF TY_EKKO.
DATA : IT_EKKO TYPE TABLE OF TY_EKKO,
WA_EKKO TYPE TY_EKKO.
DATA : WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA : WA_EVENTS TYPE SLIS_ALV_EVENT,
IT_EVENTS TYPE SLIS_T_ALV_EVENT,
IS_LAYOUT TYPE SLIS_LAYOUT_ALV.
For Build catalog
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NUMBER'.
WA_FIELDCAT-COL_POS = 1.
WA_FIELDCAT-KEY = 'X'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'AEDAT'.
WA_FIELDCAT-SELTEXT_M = 'DATE OF CREATION'.
WA_FIELDCAT-COL_POS = 2.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'LIFNR'.
WA_FIELDCAT-SELTEXT_M = 'VENDOR NO'.
WA_FIELDCAT-COL_POS = 3.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
read_data :
SELECT * INTO TABLE IT_EKKO FROM EKKO UP TO 20 ROWS.
print_header :
DATA : IT_LIST TYPE SLIS_T_LISTHEADER,
WA_LIST TYPE LINE OF SLIS_T_LISTHEADER.
CLEAR WA_LIST.
WA_LIST-TYP = 'H'.
WA_LIST-INFO = 'LIST OF PURCHASE ORDERS'.
APPEND WA_LIST TO IT_LIST.
Header along with write statement at top-of-page then use these function module
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LIST -
ALV multiple header and multiple blocks
Hi SAP gurus,
I have probelm problem in displying the ALV block display
I want to disply in the following format
*Header part *
Name:
place:
list part
coloum1
coloum2
coloum3
coloum4
*Header part *
Name:
place:
list part
coloum1
coloum2
coloum3
coloum4
*Header part *
Name:
place:
list part
coloum1
coloum2
coloum3
coloum4
The number of repetation is nt known its based on the header details so how to do this in ALV list disply or any ALV
i need a output as it is in MB5B tocde please help me
Thanx in advanceHi
Thanx for ur reply
I am doing as u said puting header in one internal table and corresponding reocrds in one internal table probelm is to while displaying ho wto display it??
I am putiing header detail in one internal table and corresponding records into one internal table and he calling the list append FM module and den again second header and corresponding data in the internal table and calling the FM 'LIST APPEND' while doing this i am clearing the internal table which was used earlier i.e data corresponding to 1st header i think the clearing will causing the poblem i am seeing the empty block list.
so how to achive this??
Thanx In Advance
Maybe you are looking for
-
HT1338 download Java version 10.6.8 and above
Hello I have a MAC Pro (OZ X 10.6.8). My netbank "log in" service requires the newest version of Java. Have tryed to download Java 6 again - Have also tryed to download the "7 version", but my Mac dosent accept that (think it was Lion version?). My n
-
IPhone Mail App showing "negative" number
Hey guys, for some reason my mail app on my iphone is showing a "negative 1" even though there is no mail. I deleted the account, re-entered all the information and it is still there. Also, when a new mail arrives it goes back to 0 (or no notificatio
-
Indesign CC crashing / freezing on save new folder name folder dialogue box
Hey guys, I am having a reacuring bug regarding the new and awesome indesign cc 9.2 64 bit windows pc. When I am saving or opening in indesign if I use the dialogue box to create a new folder to save the file in it creates it and then when the mouse
-
Display SC Material number in buyer inbox.
Hi all, How can i display the material number in the inbox screen of the buyer user? Is it by the BBP_CUF_BADI? what do i need to check to make it happen? Best regards, Gerardo. PS: I will reward points
-
I'm working on an interactive graphic novel. It will be made in InDesign and then saved as a PDF/EPUB. The issue becomes the "interactive" part. I think AIR is the answer for that. I want to start with a demo product with some basic interactive c