How to define header and footer in ALV
Hi All,
I have created one Report program where i have to display data in both alv grid and alv list display.
Reqt are:
1. The report output must contain standard header & footer.
2. The header must display the count of the materials displayed, the user name & system date.
3. The footer must display the name of the SAP system, Operating System of Application Server, Current GUI Status
& Release Status of SAP System.
I am using Fm REUSE_ALV_LIST_DISPLAY and REUSE_ALV_GRID_DSIPLAY.
this top of page n end of page is part of slis_t_events only.
In list display FM, i m not getting any option to define top of page form.
Any pointers on this.
Thanks,
Mamta
hii Mamta..
Try this .it will solve TOP-OF-PAGE problem. Pass TOP_OF_PAGE under FM REUSE_ALV_GRID_DISPLAY
eg.CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = ALV_LAYOUT
I_CALLBACK_PROGRAM = SY_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE' " TOP_OF_PAGE
I_GRID_TITLE = I_TITLE_ITEM
IT_FIELDCAT = I_FIELDCAT[]
I_SAVE = 'A'.
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_ITEM.
Form TOP_OF_PAGE.
* *ALV Header declarations
DATA: T_HEADER1 TYPE SLIS_T_LISTHEADER,
WA_HEADER1 TYPE SLIS_LISTHEADER,
T_LINE LIKE WA_HEADER1-INFO,
LD_LINES TYPE I,
LD_LINESC(10) TYPE C.
* Title
WA_HEADER1-TYP = 'H'.
WA_HEADER1-INFO = 'COMPLETE LC Records displayed'.
APPEND WA_HEADER1 TO T_HEADER1.
CLEAR WA_HEADER1.
* Date
WA_HEADER1-TYP = 'S'.
WA_HEADER1-KEY = 'Date: '.
CONCATENATE SY-DATUM+6(2) '.'
SY-DATUM+4(2) '.'
SY-DATUM(4) INTO WA_HEADER1-INFO. "todays date
APPEND WA_HEADER1 TO T_HEADER1.
CLEAR: WA_HEADER1.
DESCRIBE TABLE IT1 LINES LD_LINES.
LD_LINESC = LD_LINES. " No of Records in internal Table
CONCATENATE 'Total No. of Records in Database : ' LD_LINESC
INTO T_LINE SEPARATED BY SPACE.
WA_HEADER1-TYP = 'A'.
WA_HEADER1-INFO = T_LINE.
APPEND WA_HEADER1 TO T_HEADER1.
CLEAR: WA_HEADER1, T_LINE.
WA_HEADER1-TYP = 'A'.
WA_HEADER1-INFO = sy-uname. "User Name
APPEND WA_HEADER1 TO T_HEADER1.
CLEAR: WA_HEADER1, T_LINE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_HEADER1.
endform.
Reards,
Apoorv
Similar Messages
-
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 -
Creating Header and Footer in ALV
hi,
can anyone please tell how will you create Header and Footer in ALv and Classical Report.Hi,
In classical report use events 'top-of-page' for header and 'end-of-page' for footer.
in ALV
follow this link
http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/header-footer-display-in-alv-grid-for-layout-description-344391
Regards and Best wishes. -
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 -
How to print header and footer in SET_TABLE_FOR_FIRST_DISPLAY
Hello Experts,
How to print header and footer while using the method SET_TABLE_FOR_FIRST_DISPLAY, any tips from the experts will be appreciated.
Regards,
BabuHi,
there are four events for printing: print_end_of_list, print_top_of_list, print_end_of_page and print_top_of_page. More information about implementing these events is in this bible for ALV:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
Cheers -
How to change header and footer in login page in oracle apps r12
Hi all,
how to change header and footer in login page in oracle apps r12 and login button background color, please help me
thanks
saranhow to change header and footer in login page in oracle apps r12 and login button background color, please help meTips For Personalizing The E-Business Suite R12 Login Page (MainLoginPG) [ID 741459.1]
How to Personalize Login page in R12? [ID 579917.1]
R12 Login Page: How to Personalize the Logo ? [ID 849752.1]
Thanks,
Hussein -
Header and Footer in ALV.. URGENT
Hi All,
I want to print Header and Footer in ALV list/grid. Like in header, i want page no.( 1 of 10), UserName, Report Name etc.. and in Footer, I need selection screen criteria. For this I am using a function module (FM_SECECTOIN_CRITERIA_PRINT).
Where exactly should i code this part in my program.
Regards,
Parvez.Check this link -
http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm
http://www.sap-img.com/fu037.htm
http://www.sap-img.com/abap-function.htm
Regards,
Amit -
How To set Header and Footer in MIDlet screen
Hi Friends,
How can i set header and footer in my screens .
My need is that in header part ,my company's name shuld be display and in footer section "any thing".
How can i achieve this things plz advice me.
karanHi Supareno,
Can u tell me in details with small code, If it's
possible for you .
regards
karandefine an header (coordinate 0,0)
optional {
a CustomItem? (coordinate 0, 0+header.getHeight() )
another CustomItem ? (coordinate 0, CustomItem.getY() + CustomItem.getHeight() )
etc...
define footer (coordinate 0, getHeight() - footer.getHeight() )
Message was edited by:
supareno -
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 -
How to Add Header and Footer in Flat file
HI All,
I am using ODI 11g.
MY interface is populating data from joining to 2 tables through sql query and Loads in to Flat file.
But i need to add Header and Footer in the Flat file.
In the below 3 lines
The 1st line is header ....2nd line is Data ....3rd line is Footer.
Any ideas how to work on this.
HSB9KT.KTPRTO.EBSDATA.D0000000 20120626020636
CFFE00263 SOLGSR014991340000527894536058173880207SOLNE06242012072420120000009048382650000247MRS
T00000000000000000000
Thanks,
LonyHi Drieux,
i am able to add Header and Footer in this.
But i want the header like Its like HSB9KT.KTPRTO.EBSDATA.D0000000 || SYSDATE (YYYYMMDDHHMMSS)
In my Out put i only see header as HSB9KT.KTPRTO.EBSDATA.D0000000 .
I have added a Variable where i am using SELECT to_char(sysdate,'YYYYMMDDHHMMSS') FROM DUAL query.
create header (HSB9KT.KTPRTO.EBSDATA.D0000000 #v_DATE)
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=FFT_SOLSNP$CRLOAD_FILE=/home/tarak/FFT_SOL.datSNP$CRFILE_FORMAT=FSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=descrSNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=1SNP$CRLENGTH=994SNP$CRPRECISION=994SNP$CR$$SNPS_END_KEY*/
Any idea why this sysdate part is not showing in Header. -
How to print Header and footer in same page
Hi All,
I am using Oracle Report 10g. How can I add header and footer on same page as my body? Right now when a generate a pdf file, it is printing individual pages instead of 1 one page. Please help me.
RegardsHI
First of all,
Unless otherwise you selected some option like page break after/before - both body and header/footer will print on same page in report, so in pdf as well.
If you have difference on report and PDF that you should look into your setup.
If you want more help, please be particular on your issue
james. wrote:
Hi All,
I am using Oracle Report 10g. How can I add header and footer on same page as my body? Right now when a generate a pdf file, it is printing individual pages instead of 1 one page. Please help me.
Regards -
How to disable Header and Footer in MS word with VB code
Hi Tea,
We need to disable Header & Footer in MS word (Restrict user to edit Header and Footer). So we are trying to write a VB code.
What ever code we tried it is not working .
Can you please provide any solution how to diable H & F in word using VB code.
Thank you inadvance.A relatively simple way to do this without VBA:
Select the body of the document (Ctrl+A).
On the Review tab of the ribbon, click Restrict Editing.
Tick the check box "Allow only this type of editing in the document".
Leave the dropdown set to the default "No changes (read only)".
Under Exceptions, tick the check box for Everyone.
Click "Yes, Start Enforcing Protection".
If you wish, enter a password (don't forget it - you'll need it if you ever want to unlock the document), then click OK.
Save, close and reopen the document. The header and footer won't be editable.
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
How to Add Header and Footer to appear on every page
Hi,
I am using Robo Help 7 for generating Help pages. I have to import a wrod document an publish it as online web help html document. I have query as to how added header and footer be configured to reflect on each and every page. I am using Robohelp for first time and tried various options, but am unable to get the above done.
Thanks,
PallaviHi there
Display your Topic List pod. Press Ctrl+A to select all the topics. Then right-click the selection and choose Properties. From the Properties dialog click the General tab. There you may choose the Template/Master Page. When you click OK all the topics should now be associated with the Template/Master Page.
Cheers... Rick
Helpful and Handy Links
RoboHelp Wish Form/Bug Reporting Form
Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
Adobe Certified RoboHelp HTML Training
SorcerStone Blog
RoboHelp eBooks -
How to add header and footer to a file through ODI?
hi,
I want to add header and footer to my file..............footer should contain a counter so that page number can be displayed...................
Can anyone please guide me .................
Thanks .............
Ritikawhat is the utility you are using to create file . Interface or OdiSqlUnload ?
and what do you want to have Header and Footer as and how are you concluding the File as page 1 and page 2 etc ... ? -
How to add header and footer image in pdf
Hi,
I want to add image in header and footer for the pdf generation.
how I can add this? Following my xsl
?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fn="http://www.w3.org/2005/xpath-functions">
<xsl:output method="xml" indent="yes" encoding="utf-8" omit-xml-declaration = "yes" />
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="my-page">
<fo:region-body margin="1in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="my-page">
<fo:flow flow-name="xsl-region-body">
<fo:block >
<xsl:apply-templates mode="dump" select="/session/entity/instance/attribute"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="*" mode="dump" priority="100">
<fo:block >
<fo:block margin-left="1cm">
<xsl:for-each select="@question-text">
<xsl:value-of select="."/>=
</xsl:for-each>
<xsl:if test="string-length(normalize-space(text())) > 0">
<xsl:value-of select="text()"/>
</xsl:if>
</fo:block>
<xsl:apply-templates mode="dump" select="*"/>
</fo:block>
</xsl:template>
</xsl:stylesheet>
Edited by: 848231 on Apr 6, 2011 1:42 AMHi,
Here is one way of putting an image in the header:
<fo:layout-master-set>
<fo:simple-page-master master-name="my-page">
<fo:region-body margin="1in"/>
<fo:region-before extent="1in" background-color="silver" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="my-page">
<fo:static-content flow-name="xsl-region-before">
<fo:block height="150px" width="1024px" background-color="white" >
<fo:external-graphic src="http://localhost:9000/web-determinations9000/images/Header.jpg">
</fo:external-graphic>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
</fo:flow>
</fo:page-sequence>One good XSL:FO refernce: http://www.learn-xsl-fo-tutorial.com
Hope this helps.
Thanks,
Aakarsh
Edited by: aakarsh on Apr 6, 2011 6:40 AM
Maybe you are looking for
-
How to export my vector lines at different sizes
Hi. First post here. I have been using photoshop and illustrator at my university. I need some help exporting my graphics at known pixel dimensions. Illustrator seems to give the cleanest results, and the stroke antialiasing is much better than in ph
-
I keep getting a message that says "we cannot complete your iTunes store request. Secure network connection was rejected. There is a problem in iTunes. Please try again later." I never got this message on our PC, but recently bought a MacBook Pro
-
Hello, I've come across a problem trying to internationalize my program (web application, spring). I've successfully be able use UTF-8 encoding to add french characters, however I'm running into an issue with Japanese (multi-byte) characters. I've be
-
Hi, using CSAP_MAT_BOM_CREATE i am able to create first alternative. if i want to create another alternative for the same material/plant how can i create. tnx in advance.
-
I may put windows on my computer to game, but I have no clue what this "other" is and I want it gone! Hopefully someone can help! *grammer