Header and Footer for PDF with images using itext.jar
HeaderFooter class was available in itext.jar ,I tried using this class with PDFtemplate and Phrase i am trying to put the image on the header and footer ,however the image comes perfectly for the first page ,its not applicable for the second or continuous page, is it possible to have the images in header and footer?
Regards,
Venkateswaran
Questions about third-party APIs should be asked in the forum/newsgroup specific to that API. These forums are for questions relating to the API as provided by Sun.
Go find an iText forum.
Similar Messages
-
Problem in creating client side PDF with image using flex and AlivePD
I need a favor I am creating client side PDF with image using flex and AlivePDF for a web based application. Images have been generated on that pdf but it is creating problem for large size images as half of the image disappeared from that pdf.I am taking the image inside a canvas . How do i control my images so that they come fit on that pdf file for any image size that i take.
Thanks in advance
AtishayI am having a similar and more serious problem. It takes a
long time to execute, but even attaching a small image balloons the
pdf to 6MB plus. After a few images it gets up to 20MB. These are
100k jpeg files being attached. The resulting PDF is too large to
email or process effectively. Does anyone know how to reduce
size/processing? -
Unsupported version Error while generating header and footer for the PDF
hi
I want to genrate header and footer for the PDF file however on the call of the EndPage class i got a Unsupported Version Error Unsupported major minor Version Error and Class loader Define class
What has gone wrong ?.Can you provide more information about what you were trying to do? In particular, what does your code like like?
Also, can you include the stack trace, and the complete error message? -
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 -
Error occured while genrating header and footer for the PDF
Hi All ,
I am getting a following error whenever i try to excecute the code to print header and footer while genrating a PDF what could be the reason.Any help would be greately appreciated. following is the error stack trace: i am excecuting it in the command prompt an using jdk1.5.0.1
C:\Program Files\Sun\Creator2_1\java\Test>java EndPage
Exception in thread "main" java.lang.UnsupportedClassVersionError: EndPage (Unsu
pported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)Looks like the EndPage class was compiled with a later version of Java (49.0 == Java 1.5) and you are trying to run it with older version of java.exe. Type
java -version
to verify.
Also this forum is for Sun Java Studio Creator related questions. Please ask such questions on java tools forum.
Sandip -
Need CS4 3 Column Liquid Head and Footer for CS5
My professor is using the CS4 version of 3 Column Liquid with Header and Footer and this template has changed in CS5. I find it hard to follow his examples without the proper file. He says to change background color of a sidebar, and half of my website changes color. Is there a way I can get this template please?
This is from cs3, I suppose it is the same;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
/* Tips for Elastic layouts
1. Since the elastic layouts overall sizing is based on the user's default fonts size, they are more unpredictable. Used correctly, they are also more accessible for those that need larger fonts size since the line length remains proportionate.
2. Sizing of divs in this layout are based on the 100% font size in the body element. If you decrease the text size overall by using a font-size: 80% on the body element or the #container, remember that the entire layout will downsize proportionately. You may want to increase the widths of the various divs to compensate for this.
3. If font sizing is changed in differing amounts on each div instead of on the overall design (ie: #sidebar1 is given a 70% font size and #mainContent is given an 85% font size), this will proportionately change each of the divs overall size. You may want to adjust based on your final font sizing.
.thrColEls #container {
width: 46em; /* this width will create a container that will fit in an 800px browser window if text is left at browser default font sizes */
background: #FFFFFF;
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
/* Tips for sidebar1:
1. Be aware that if you set a font-size value on this div, the overall width of the div will be adjusted accordingly.
2. Since we are working in ems, it's best not to use padding on the sidebar itself. It will be added to the width for standards compliant browsers creating an unknown actual width.
3. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".thrColEls #sidebar1 p" rule.
.thrColEls #sidebar1 {
float: left;
width: 11em; /* since this element is floated, a width must be given */
background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */
padding: 15px 0; /* top and bottom padding create visual space within this div */
.thrColEls #sidebar2 {
float: right;
width: 11em; /* since this element is floated, a width must be given */
background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */
padding: 15px 0; /* top and bottom padding create visual space within this div */
.thrColEls #sidebar1 h3, .thrColEls #sidebar1 p, .thrColEls #sidebar2 p, .thrColEls #sidebar2 h3 {
margin-left: 10px; /* the left and right margin should be given to every element that will be placed in the side columns */
margin-right: 10px;
/* Tips for mainContent:
1. If you give this #mainContent div a font-size value different than the #sidebar1 div, the margins of the #mainContent div will be based on its font-size and the width of the #sidebar1 div will be based on its font-size. You may wish to adjust the values of these divs.
2. The space between the mainContent and sidebar1 is created with the left margin on the mainContent div. No matter how much content the sidebar1 div contains, the column space will remain. You can remove this left margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends.
3. To avoid float drop, you may need to test to determine the approximate maximum image/element size since this layout is based on the user's font sizing combined with the values you set. However, if the user has their browser font size set lower than normal, less space will be available in the #mainContent div than you may see on testing.
4. In the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent "hasLayout." This avoids several IE-specific bugs that may occur.
.thrColEls #mainContent {
margin: 0 12em 0 12em; /* the right margin can be given in ems or pixels. It creates the space down the right side of the page. */
/* Miscellaneous classes for reuse */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
.fltlft { /* this class can be used to float an element left in your page */
float: left;
margin-right: 8px;
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
-->
</style><!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.thrColEls #sidebar1, .thrColEls #sidebar2 { padding-top: 30px; }
.thrColEls #mainContent { zoom: 1; padding-top: 15px; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]--></head>
<body class="thrColEls">
<div id="container">
<div id="sidebar1">
<h3>sidebar1 Content</h3>
<p>The background color on this div will only show for the length of the content. If you'd like a dividing line instead, place a border on the left side of the #mainContent div if the #mainContent div will always contain more content than the #sidebar1 div. </p>
<p>Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut, sapien. </p>
<!-- end #sidebar1 --></div>
<div id="sidebar2">
<h3>sidebar2 Content</h3>
<p>The background color on this div will only show for the length of the content. If you'd like a dividing line instead, place a border on the right side of the #mainContent div if the #mainContent div will always contain more content than the #sidebar2 div. </p>
<p>Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut, sapien. </p>
<!-- end #sidebar2 --></div>
<div id="mainContent">
<h1> Main Content </h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. </p>
<p>Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio. Donec et ipsum et sapien vehicula nonummy. Suspendisse potenti. Fusce varius urna id quam. Sed neque mi, varius eget, tincidunt nec, suscipit id, libero. </p>
<h2>H2 level heading </h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.</p>
<!-- end #mainContent --></div>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" />
<!-- end #container --></div>
</body>
</html> -
Add Header and Footer in PDF-presenation, Photoshop CS3
Hi
How is it possible to make at Header and Footer in a PDF-Presentation generatet in Photoshop CS3 without placing it on every image. Is there a setting (I have not found it) where you can predefine this?
Best regards/Jeanhi,
//changing the font of the rows populated
u can create Font instance like this:
Font fontName= new Font();
fontName.setSize(7.5f);
fontName.setStyle(fResDetails.BOLD);
fontName.setColor(255, 91, 91);
// In the following code you are adding a cell with name 'cellName' to the Table.Here table is an instance of the Table class.
PdfPCell cellName = new PdfPCell(new Phrase("columnHeader", fontName));
table.addCell(cellName );
cellName .setHorizontalAlignment(Element.ALIGN_LEFT);
cellName .setVerticalAlignment(Element.ALIGN_LEFT); -
hi i want to include a header and footer in the pdf that i have generated using iText library.
Please help
also i want to change the font of the rows that i populate.hi,
//changing the font of the rows populated
u can create Font instance like this:
Font fontName= new Font();
fontName.setSize(7.5f);
fontName.setStyle(fResDetails.BOLD);
fontName.setColor(255, 91, 91);
// In the following code you are adding a cell with name 'cellName' to the Table.Here table is an instance of the Table class.
PdfPCell cellName = new PdfPCell(new Phrase("columnHeader", fontName));
table.addCell(cellName );
cellName .setHorizontalAlignment(Element.ALIGN_LEFT);
cellName .setVerticalAlignment(Element.ALIGN_LEFT); -
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 -
Header and footer in PDF files generated from Business Publisher
Hi All,
Is there any out of box feature to include Header and Footer of our choice in the Pdf file of Process Model generated from Business Publisher (from Print function in the publisher explorer)
Thank you all in advance.
regards,Hi Raja,
Does this mean that you have been sucessful in generating the PDF from the BPublisher?
If yes, could you please share how you achived this. Platform .. version ect. you have.
I am trying to create the PDF , but my IE popup just ... well ... just disappears..
thanks
regards
Sanjiv -
How can I remove the header and footer for more space in my Pages docs?
I could really use the extra space on my docs. How can I get rid of the header and footer?
ThanksHi Timothy
Just to detail exactly where to find the options:
+Inspector > Document > Document > Document Margins > Headers/Footers+
+commnd option i+ shows and hides your Inspector palette/s.
Peter -
Creating PDF with IMAGE using CFDOCUMENT TAG
Hi Guys,
I m facing problem while creating the PDF using CFDOCUMENT
tag.
Actually my clients want the IMAGEs in PDF document.
Problem is most of the images in JPG format and while I am
going to attach images in PDF document it takes lots of time for
creating PDF. In most of time it cause timeout.
I have try to convert images JPG to PNG, yes I some what
better performance than JPG format but still it is work for 20 - 25
images. In my case I want to attach normally 50-100 images in PDF
(sometimes it is more 200).
PLZ, Help me.. F1...F1...F1
thanks in advance
Pritesh
Coldfusion ProgrammerI am having a similar and more serious problem. It takes a
long time to execute, but even attaching a small image balloons the
pdf to 6MB plus. After a few images it gets up to 20MB. These are
100k jpeg files being attached. The resulting PDF is too large to
email or process effectively. Does anyone know how to reduce
size/processing? -
Header and Footer in PDF is lost when exporting application
When generating an export script to migrate an application, headers and footer you include in your report definition are lost, that contents are not included in the script.
Any workaround?
Regards.Hi Raja,
Does this mean that you have been sucessful in generating the PDF from the BPublisher?
If yes, could you please share how you achived this. Platform .. version ect. you have.
I am trying to create the PDF , but my IE popup just ... well ... just disappears..
thanks
regards
Sanjiv -
How to get Header and footer in PDF file from a report program
I am generating spool from ALV GRID DISPLAY. Only the body of a report is coming in the SPOOL. I mean content of the TOP_UP_PAGE event is not coming in the SPOOL. Please suggest me.
Coding I am pasting here.
* Begin of modification(+) by I080845 ( Prasanta Maiti ) 12/23/2011 Defect# 17821
IF sy-batch IS NOT INITIAL
* Begin of modification(+) by I080845 ( Prasanta Maiti ) 01/19/2012 Defect# 18155
and i_final is NOT INITIAL.
* End of modification(+) by I080845 ( Prasanta Maiti ) 01/19/2012 Defect# 18155
* The print parameters are retrived and validate
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
* ARCHIVE_TEXT = c_check
* AR_OBJECT = c_check
* ARCHIVE_REPORT = c_check
* COVER_PAGE = c_check
in_archive_parameters = v_arcpar
in_parameters = v_pripar
destination = 'LOCL'
layout = 'X_65_512/2'"c_layout
line_count = '65' "60
line_size = '1024'
no_dialog = c_check
IMPORTING
out_archive_parameters = v_arcpar
out_parameters = v_pripar
valid = v_val
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF v_val NE space AND sy-subrc = 0.
v_pripar-prrel = space.
v_pripar-primm = space.
NEW-PAGE PRINT ON NEW-SECTION PARAMETERS v_pripar
ARCHIVE PARAMETERS v_arcpar NO DIALOG.
NEW-PAGE.
** displaying output in PDF
* PERFORM f_show_record.
* ALV Display
PERFORM f_alv_display.
NEW-PAGE PRINT OFF.
CALL FUNCTION 'ABAP4_COMMIT_WORK'.
ENDIF.
IF NOT sy-spono IS INITIAL.
"Declarations
v_spool_id = sy-spono.
* Checking the flag for too large spool
* IF v_too_large IS INITIAL.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = v_spool_id
no_dialog = space
IMPORTING
pdf_bytecount = v_bytecount
TABLES
pdf = i_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
Edited by: Thomas Zloch on Feb 10, 2012Hi,
Try with ALV LIST DISPLAY. I dont thing so its possible with ALV GRID DISPLAY. -
Dynamic header and footer for ALV_LIST
Hi all,
I m using FM REUSE_ALV_LIST_DISPLAY to display my report.
My requirements are as follows:
1. Display the header for every new key/sorted value
2. Display the footer at the end of the key/sorted value
3. Display a subtotal for numeric columns based on each key value
4. Page break at the change to a new key/sorted value
(based on sample data below, the key/sorted value is the Vendor code)
Appreciate if anyone can provide any sample codes to meet the above requirements.
Internal table Data:
Vendor Date Amount
1001 10.04.2009 1000
1001 11.04.2009 1500
2001 08.04.2009 800
2001 13.04.2009 1200
2001 15.04.2009 1000
3001 01.04.2009 500
3001 02.04.2009 700
ALV List output:
Header: Vendor: 1001
Vendor Date Amount
1001 10.04.2009 1000
1001 11.04.2009 1500
Subtotal 2500
Footer:
This is end of list for vendor 1001
Page break
Header: Vendor: 2001
Vendor Date Amount
2001 08.04.2009 800
2001 13.04.2009 1200
2001 15.04.2009 1000
Subtotal 3000
Footer:
This is end of list for vendor 2001
Page break
Header: Vendor: 3001
Vendor Date Amount
3001 01.04.2009 500
3001 02.04.2009 700
Subtotal 1200
Footer:
This is end of list for vendor 3001Hi Pang,
Have a look at the sample program. develop your program accordingly. It helps you a lot.
REPORT ztest_upload_from_u_n_l.
TYPE-POOLS: slis.
*---internal tables
DATA: BEGIN OF it_flight OCCURS 0,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight,
*--internal tables for alv
it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fieldcat,
layout TYPE slis_layout_alv,
it_sort TYPE slis_t_sortinfo_alv,
wa_sort LIKE LINE OF it_sort.
*---start-of-selection .
START-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZTEST_UPLOAD_FROM_U_N_L'
i_internal_tabname = 'IT_FLIGHT'
i_inclname = 'ZTEST_UPLOAD_FROM_U_N_L'
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
*----get data
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_flight
UP TO 20 ROWS.
wa_fcat-do_sum = 'X'.
MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
WHERE fieldname = 'SEATSOCC'.
wa_sort-fieldname = 'CARRID'.
wa_sort-group = '*'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
wa_sort-fieldname = 'CONNID'.
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = 'ZTEST_UPLOAD_FROM_U_N_L'
is_layout = layout
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1.
Thanks
Venkat
Maybe you are looking for
-
If your P.C. does not reconize your ipod video read this !!!
Scroll down to see solution My story:I just got a new ipod video 60 gb a few days ago. i installed everything and it was up to date. I have a pc with windows xp home edition. when i pluged it in all it did was make a sound like it reconized it. I spe
-
Splitting Application into separate projects
I'd tried to split my domain layer (annotated EJB3) into separate project, from my service layer (EJB3 session beans) - that used to run together happily but I got the following error against each entity. Exception [TOPLINK-198] (Oracle TopLink - 10g
-
QuickTime Player export problem
When I save in QuickTime Player (10.0) as Movie everything works fine, but when I select another format, I get an "Export Progress" window, but after that finishes there is no file. The problem seems similar as reported in this 1 year old thread: htt
-
Performance tuning for the query
CURSOR c_exercise_list IS SELECT DECODE(v_mfd_mask_id ,'Y',' ',o.opt_id) opt_id, DECODE(v_mfd_mask_id ,'Y',' ',o.soc_sec) soc_sec, P.plan_id plan_id, E.exer_id exer_id, E.exer_num, DECODE
-
Could someone help with question about PNG export from Illustrator?
I am having issues with PNG exports from Illustrator not opening up once exported.