JTable printing code produces blank last page on Windows LAF, OK on Metal
I've been banging my head on this one for hours. I'm printing JTables, handling the pagination myself (built in Printable is far too limited). I've one table which can have a variable number of columns, with some column counts it's fine, with others the last page simply comes up blank. Because the scale adjusts it may have something to do with the number of rows on the last page. 5 or 6 it screws up, 20 or so it's fine.
This is the code that prints the section:
public void print(Graphics2D graphics, Rectangle2D area, int pageIndex, String pageLabel) throws PrinterException {
Shape oldClip = graphics.getClip();
AffineTransform oldXForm = graphics.getTransform();
// graphics.clip(area);
double y = area.getY();
graphics.translate(area.getX(), area.getY());
if(resize) {
double stretch = area.getWidth() / (double)table.getColumnModel().getTotalColumnWidth();
graphics.scale(stretch, stretch);
if(table.getTableHeader() != null) {
table.getTableHeader().print(graphics);
graphics.translate(0, table.getTableHeader().getHeight());
Rectangle tableBlock = new Rectangle(table.getX(), table.getY(), table.getColumnModel().getTotalColumnWidth(), 0);
int rowNo;
int frp = firstRowOnPage.get(pageIndex);
int frnp = pageIndex + 1 >= firstRowOnPage.size() ? table.getRowCount() :
firstRowOnPage.get(pageIndex + 1);
for(rowNo = 0; rowNo < frp; rowNo++)
tableBlock.y += table.getRowHeight(rowNo);
for(;rowNo < frnp; rowNo++)
tableBlock.height += table.getRowHeight(rowNo);
graphics.translate(0, -tableBlock.y);
graphics.setPaint(Color.BLACK);
graphics.draw(tableBlock);
graphics.clip(tableBlock);
table.print(graphics);
graphics.setTransform(oldXForm);
graphics.setClip(oldClip);
}Bascially it selects the block of rows to print by setting a clip box on the whole table size, and translates to bring the block to the top of the page.
The rectangle drawn to the clip box is fine. table.print simply doesn't paint anything.
I'm starting to think this might be a bug in the Windows LAF TableUI, because I've just tried switching to Metal and it works fine. Anyone had similar problems?
Similar problems, just not with printing a JTable. Your problem might be totaly different but I have found that components change size (dimensions) and sub component sizes (like table columns) when you view them on different look and feels.
Similar Messages
-
My iMac is connected to a Brother printer. I have Snow Leopard 10.7.3 As of yesterday, when I try to print a PDF it prints as a blank black page. Does anyone know how to correct this so that the PDF will print as I see it on screen?
If you are running Mac OS X 10.7.3 then you have Lion installed, not Snow Leopard. It's probably not important to this discussion, but something you should be aware of.
What application are you printing the PDF files from? Have you tried opening the PDF file using the Preview application that can be found in the Applications folder? Does the issue still occur? Have you tried other PDF files from a different source?
Another poster in the following discussion thread reported that this method resolved their black blank PDF issue when viewing (and presumably printing) PDF files from Safari.
https://discussions.apple.com/thread/3890509?start=0&tstart=0
This solved my question by mcbuffy on Apr 20, 2012 11:29 AM
There's a solution if you want to see the PDF inside Safari's window :
Go to the folder : Your Hard Drive / Library / Internet Plug-ins.
If you see a file with PDF in its name drag it to the trash.
Quit and restart Safari to test with a PDF.
If it works you can empty the trash. -
Print Terms & codition in last page of PO/pass varaible in Po text
Hi All,
I need to print the PO , in which the Terms & condition should be printed on the back side of the PO.
While designing the sapscript , how to do this . My requirement is if the PO is more than 1 page i need to print the PO on last page ( at the back side of the PO).
2 . In PO text User has requirement to print ECC No , Excise no ( passed as varaible 0.
is it possible to pass the varaible in PO text.
THANKS .Hi
There are some table that will hold the PO text entered during the PO creation..
Tables tht r realted to So10 (standard Text)
TTXOB - Text objects
TTXID - Text ids
STXL - Text file lines
STXH - Text file header
Regards,
Aditya -
Printing text in last page main window of a script
Hi All,
I want to print some text at the bottom of last page main window.But how can we find that it is last page.I mean which condition we have to put for that.
I think the below condition like
If last-page NE ' 0'.
write : '----
'.......... will be used for printing at last page footer window.
what about main window........how to find that it is the main window of last page............
Thanks in advance ....
Regards,
Rakesh.Hi,
you can use this
IF NEXT_PAGE EQ ' 0 '.
write the text here.
ENDIF.
in the main window itself. Once all the records got printed, it will check that there is no next page. at that time, that was the end of the internal table in the mainwindow and the text will be printed.
If you want a seperate window, then also the same logic will work.
If you want a seperate window, then the output look and feel will not be so good.
I mean where ever the last record got completed, it will print the text if you put it in Main window. other wise statically it will print at a particular position where your window was placed.
Regards,
Venkatesh -
Problem regarding printing in first and last page of a form
I need to print a some text only in the first page and last page. I have defined a window to print this text. The number of pages that will be created is decided on run time. Can some body please help regarding this issue. I have tried to use SFSY-FORMPAGES to calculate total number of pages in the begining but it does not work
Edited by: subhajit bhadra on Feb 20, 2009 7:44 AMHi Badhra,
You can use conditions for that window or text element.
in conditions, tick 'only befor main window' forr header
and 'ONly after main window ' for footer.
Sunil -
I need to print a text but only for the last page in the main window.
I have tried with IF.
IF &PAGE& = &SAPSCRIPT-FORMPAGES&
BOTTOM
....TEXT
ENDBOTTOM
ENDIF
But it prints in all pages in every main window.
Can someone point me what I am doing wrong or how can I do this?
Regards,
CarlosHello Carlos,
the problem with this condition is the following.
The Sapscript composer cannot know during the processing of e.g. the first page,
how many pages will follow. So &SAPSCRIPT-FORMPAGES& still contains the same
value like& PAGE& and is filled with the correct values only at the very end of the processing.
(when the total number of pages is known).
So I suggest you to use the BOTTOM command in the print program,
when the processing of all item of the MAIN window is ended.
There is an other variable &NEXTPAGE&. &NEXTPAGE& will always be 0
when it reaches to last page to print. The problem with this variable that
it can not be used in a condition in MAIN window too, only in a separate page window.
Regards,
Hedvig -
HP ENVY 4500 fails to print lower half of last page of series
When printing a document over several pages my ENVY 4500 fails to print the lower half of the last page to be printed. Because pages are printed in reverse numerical order, this is in fact page 1 of the document.
Try installing the Microsoft patch for the WSD service. http://support.microsoft.com/kb/3000461
Please mark the post that solves your issue as "Accept as Solution".
If my answer was helpful click the “Thumbs Up" on the left to say “Thanks”!
I am not a HP employee. -
Print Text only on last page of layout
Hello Experts,
I would like to print some text lines only on the last page of invoice. Can any one help me with a formula?
Thanks!I tried the options on the thread, but no luck. Here is what i have
Page Header A
Page Header B
Page Header C
Details
Report Footer
Page Footer
Say the invoice is 2 pages, i want to print thrid page with only terms and conditions
Thanks! -
Printing Invoice Appendix On Last Page Of Each Invoice
Hello,
I have to print "Invoice Appendix" at the last page Of each Invoice Print Report.
Invoice Appendix is coming properly if u run for a single Invoice as i have used section Break as bellow-
Start Of Invoice Header
Start Of Invoice Lines
End Of Invoice Lines
End Of Invoice Header
--------------<Section Break>------------
Start Of Invoice Appendix
End Of Invoice Appendix
But when i run the report for multiple Invoice "Invoice Appendix" print only on last page of the last Invoice.
Can you please Help me, I need Invoice Appendix should display for every Invoice at the last Page. i'm using xmlp 5.6.1
Regards,
Aanta.Hi Aanta
You need to be on 5.6.2 release, you can then use the last page only feature to do this. Check the user guide for details.
Regards, tim -
Print a text on last page of smartform rpt
Hi All
I want to print a text on first and last page of report created in smartforms
plz suggest..........Hi,
In a Smart Form, you can use a similar MAIN window approach. For a secondary window, you might wish to use a conditional event such as <b>'Only After End of Main Window'</b>.
Map page FIRST to NEXT and page NEXT to NEXT as you have done; page LAST does not need to be mapped to any other page. Make sure the MAIN window is contained on both page FIRST and page NEXT. Then add a command node within your MAIN window at the very end of this window (outside of any tables or loops). In its general attributes click on the 'Go to new page' and select the LAST page here.
During form output, regardless of whether the MAIN window is completed within page FIRST or NEXT, page LAST will be triggered as your final page.
Note: Any secondary windows on pages FIRST or NEXT with the condition 'only after end of MAIN window' may no longer print, as form output now will advance to the LAST page before this condition is satisfied.
Regards
Sudheer -
How to print total amount in last page of purchase orde using xml publisher
Hi
I customizing purchase order report using xml publisher.
i have to print total amount at last every purchse order.
how to compare carry forward amount in xml publisherI think the guys overhere :
BI Publisher
can help you a lot better -
Printer shows OK on diagnostic​s but ony produces blank test pages
The screen on my Officejet J6450 All in one printer is showing two symbols [?] [?]. What does this mean. Manual is no help. Test pages come out blank.
Try the '''''reset''''' described here: <br />
http://kb.mozillazine.org/Problems_printing_web_pages#Reset_printer -
Print contents in the last page.
Dear all,
I am writing an ABAP program for a report. I have to print some text contents at the end of the page.
How do i do that?
TIA,
sinthuHi amit,
I have added some codes.... here is the code ..
SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_AKONT FOR KNB1-AKONT OBLIGATORY.
PARAMETERS : P_BUKRS LIKE T001-BUKRS OBLIGATORY.
" COMPANY CODE
SELECT-OPTIONS : S_GSBER FOR TGSBT-GSBER OBLIGATORY, " BUSINESS AREA
S_BUDAT FOR BSID-BUDAT OBLIGATORY, " POSTING DATE
S_KUNNR FOR KNB1-KUNNR OBLIGATORY, " CUSTOMER NUMBER
S_UMSKZ FOR T074U-UMSKZ. " Special GL
"indicators
SELECTION-SCREEN END OF BLOCK B1.
Begin Of Authorization**********************
AT SELECTION-SCREEN.
AUTHORITY-CHECK OBJECT 'Z_FI_REP_N'
ID 'BUKRS' FIELD P_BUKRS
ID 'ACTVT' FIELD '03'.
IF SY-SUBRC <> 0.
MESSAGE E001(ZAUT) WITH P_BUKRS.
ENDIF.
LOOP AT S_AKONT.
AUTHORITY-CHECK OBJECT 'Z_FI_REP_N'
ID 'BEGRU' FIELD S_AKONT-LOW
ID 'ACTVT' FIELD '03'.
IF SY-SUBRC <> 0.
MESSAGE E001(ZAUT) WITH S_AKONT-LOW .
ENDIF.
IF S_AKONT-HIGH <> SPACE.
AUTHORITY-CHECK OBJECT 'Z_FI_REP_N'
ID 'BEGRU' FIELD S_AKONT-HIGH
ID 'ACTVT' FIELD '03'.
IF SY-SUBRC <> 0.
MESSAGE E001(ZAUT) WITH S_AKONT-HIGH .
ENDIF.
ENDIF.
ENDLOOP.
LOOP AT S_GSBER.
AUTHORITY-CHECK OBJECT 'Z_FI_REP_N'
ID 'GSBER' FIELD S_GSBER-LOW
ID 'ACTVT' FIELD '03'.
IF SY-SUBRC <> 0.
MESSAGE E001(ZAUT) WITH S_GSBER-LOW .
ENDIF.
IF S_GSBER-HIGH <> SPACE.
AUTHORITY-CHECK OBJECT 'Z_FI_REP_N'
ID 'GSBER' FIELD S_GSBER-HIGH
ID 'ACTVT' FIELD '03'.
IF SY-SUBRC <> 0.
MESSAGE E001(ZAUT) WITH S_GSBER-HIGH .
ENDIF.
ENDIF.
ENDLOOP.
End of Authorization*********************
SELECTION SCREEN VALIDATION
AT SELECTION-SCREEN ON S_AKONT.
IF NOT S_AKONT-LOW IS INITIAL.
SELECT SINGLE SAKNR FROM SKAT INTO SKAT-SAKNR
WHERE SAKNR = S_AKONT-LOW.
IF SY-SUBRC <> 0.
MESSAGE E999 WITH 'Reconciliation Account' S_AKONT-LOW
'does not exist'.
ENDIF.
ENDIF.
IF NOT S_AKONT-HIGH IS INITIAL.
SELECT SINGLE SAKNR FROM SKAT INTO SKAT-SAKNR
WHERE SAKNR = S_AKONT-HIGH.
IF SY-SUBRC <> 0.
MESSAGE E999 WITH 'Reconciliation Account' S_AKONT-HIGH
'does not exist'.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON S_KUNNR.
IF NOT S_KUNNR-LOW IS INITIAL.
SELECT SINGLE KUNNR FROM KNB1 INTO KNB1-KUNNR
WHERE AKONT IN S_AKONT
AND KUNNR = S_KUNNR-LOW.
IF SY-SUBRC <> 0.
MESSAGE E317 WITH S_KUNNR-LOW.
ENDIF.
ENDIF.
IF NOT S_KUNNR-HIGH IS INITIAL.
IF S_KUNNR-HIGH < S_KUNNR-LOW.
MESSAGE E381.
ENDIF.
SELECT SINGLE KUNNR FROM KNB1 INTO KNB1-KUNNR
WHERE AKONT IN S_AKONT
AND KUNNR = S_KUNNR-HIGH.
IF SY-SUBRC <> 0.
MESSAGE E317 WITH S_KUNNR-HIGH.
ENDIF.
ENDIF.
START OF SELECTION
START-OF-SELECTION.
P_KOART = 'D'.
LOOP AT S_UMSKZ.
IF S_UMSKZ-SIGN = 'E'.
S_UMSKZ-LOW = ' '.
S_UMSKZ-HIGH = ' '.
MODIFY S_UMSKZ INDEX SY-TABIX.
ENDIF.
ENDLOOP.
PERFORM GET_BKPF_BSEG_DATA.
PERFORM PROCESS_DISPLAY_DATA.
END-OF-SELECTION.
TOT OF PAGE
TOP-OF-PAGE.
FORMAT COLOR OFF INTENSIFIED OFF.
SELECT SINGLE BUTXT
FROM T001
INTO WA_BUTXT
WHERE BUKRS = P_BUKRS.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE : / WA_BUTXT .
SELECT SINGLE VWERK
FROM KNVV
INTO WA_VWERK
WHERE KUNNR IN S_KUNNR.
SELECT SINGLE NAME1
FROM T001W
INTO WA_PNAME
WHERE WERKS EQ WA_VWERK.
PERFORM GET_SUP_PLANT.
WRITE: / WA_PNAME,
/ WA_NAME, / WA_NAME2 , / WA_NAME3,/ WA_NAME4, /
WA_CITY,/ WA_PSTLZ, /1(152) SY-ULINE.
*SKIP 1.
*ULINE AT (152).
WRITE : / 'Statement of Accounts', 100 'Page No : ', SY-PAGNO.
100 'Page No : ', SY-PAGNO.
IF S_BUDAT-HIGH = '00000000'.
S_BUDAT-HIGH = S_BUDAT-LOW.
ENDIF.
FORMAT COLOR OFF INTENSIFIED OFF.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE : / 'From :', S_BUDAT-LOW, 'TO', S_BUDAT-HIGH ,100 'Date : ',
SY-DATUM, /1(152) SY-ULINE .
100 'Date : ', SY-DATUM.
FORMAT COLOR OFF INTENSIFIED OFF.
END OF PAGE
END-OF-PAGE.
WRITE:'Dear Sir,'.
WRITE:/15 'Confirmation of Balance'.
*INCLUDE ZFIGRIDISP.
FORM GET_BKPF_BSEG_DATA
FORM GET_BKPF_BSEG_DATA.
*INCLUDE ZFIGENDOCS.
DATA : I_FYV1 LIKE T009-PERIV.
*Commented by Sinthu
CALL FUNCTION 'CCODE_GET_FISCAL_YEAR_VARIANT'
EXPORTING
COMPANY_CODE = P_BUKRS
IMPORTING
FISCAL_YEAR_VARIANT = I_FYV1
EXCEPTIONS
COMPANY_CODE_NOT_FOUND = 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.
*CALL FUNCTION 'GM_GET_FISCAL_YEAR'
EXPORTING
I_DATE = S_BUDAT-LOW
I_FYV = I_FYV1
IMPORTING
E_FY = DATE1
EXCEPTIONS
FISCAL_YEAR_DOES_NOT_EXIST = 1
NOT_DEFINED_FOR_DATE = 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.
CLEAR DATE1.
CALL FUNCTION 'ME_DETERMINE_GJAHR'
EXPORTING
I_BSTYP =
I_BEDAT = S_BUDAT-LOW
I_PERIV = I_FYV1
IMPORTING
E_H_MONAT =
E_H_GJAHR = DATE1
E_H_DATUM =
End comment - sinthu
CUSTOMER CALCULATION
SELECT BUKRS BELNR GJAHR BLART
BLDAT BUDAT XBLNR BKTXT
WAERS KURSF XREVERSAL
INTO TABLE IT_BKPF
FROM BKPF
WHERE BUKRS = P_BUKRS
AND BUDAT IN S_BUDAT
AND BLART <> 'ZC' AND BLART <> 'ZV' AND BLART <> 'DA' AND
BLART <> 'AB'
AND BSTAT = ' '.
SELECT VBELN VBTYP
INTO TABLE IT_VBRK
FROM VBRK
FOR ALL ENTRIES IN IT_BKPF
WHERE VBELN = IT_BKPF-BELNR.
SORT IT_BKPF BY BUDAT.
IF P_KOART = 'D'.
IF S_UMSKZ <> ' '.
SELECT BUKRS BELNR GJAHR AUGBL
KOART UMSKZ SHKZG GSBER
DMBTR WRBTR ZUONR SGTXT
KOSTL VBELN SAKNR HKONT
KUNNR LIFNR REBZG
INTO TABLE IT_BSEG
FROM BSEG
WHERE BUKRS = P_BUKRS
AND GSBER IN S_GSBER
AND UMSKZ IN S_UMSKZ
AND ( UMSKZ = '' OR UMSKZ IN S_UMSKZ )
AND KUNNR IN S_KUNNR
AND KOART = P_KOART.
AND GJAHR = DATE1.
ELSE.
SELECT BUKRS BELNR GJAHR AUGBL
KOART UMSKZ SHKZG GSBER
DMBTR WRBTR ZUONR SGTXT
KOSTL VBELN SAKNR HKONT
KUNNR LIFNR REBZG
INTO TABLE IT_BSEG
FROM BSEG
WHERE BUKRS = P_BUKRS
AND GSBER IN S_GSBER
AND ( UMSKZ = ' ' )
OR UMSKZ IN S_UMSKZ )
AND KUNNR IN S_KUNNR
AND KOART = P_KOART.
AND GJAHR = DATE1.
ENDIF.
SORT IT_BKPF BY BELNR.
SORT IT_BSEG BY BELNR.
LOOP AT IT_BSEG.
CNT = SY-TABIX.
READ TABLE IT_BKPF
WITH KEY BELNR = IT_BSEG-BELNR
BINARY SEARCH.
IF SY-SUBRC NE 0.
DELETE IT_BSEG INDEX CNT.
CLEAR IT_BSEG.
ENDIF.
ENDLOOP. " END OF IT_BSIK
ENDIF.
OPENING BALANCE CALCULATION************
SELECT BELNR
FROM BKPF
INTO TABLE IT_BKPF_OPEN_BAL
WHERE BUKRS = P_BUKRS
AND BUDAT < S_BUDAT-LOW
AND GJAHR = DATE1
AND BLART <> 'ZC' AND BLART <> 'ZV' AND BLART <> 'DA' AND
BLART <> 'AB'
AND BSTAT = ' '.
****************end of ZFIGENDOCS***************************
ENDFORM. "GET_BKPF_BSEG_DATA
FORM PROCESS_DISPLAY_DATA.
FORM PROCESS_DISPLAY_DATA.
SELECT GSBER INTO TABLE IT_TGSBT
FROM TGSBT
WHERE GSBER IN S_GSBER.
SELECT KUNNR INTO TABLE IT_KNB1
FROM KNB1
WHERE KUNNR IN S_KUNNR
AND AKONT IN S_AKONT.
LOOP AT IT_TGSBT.
LOOP AT IT_KNB1.
IT_BA_CUST_COMB-GSBER = IT_TGSBT-GSBER.
IT_BA_CUST_COMB-KUNNR = IT_KNB1-KUNNR.
APPEND IT_BA_CUST_COMB.
ENDLOOP. " END OF IT_KNB1
ENDLOOP. " END OF IT_TGSBT
DELETE ADJACENT DUPLICATES FROM IT_BA_CUST_COMB.
SORT IT_BA_CUST_COMB BY KUNNR.
IF NOT IT_BA_CUST_COMB[] IS INITIAL.
LOOP AT IT_BA_CUST_COMB.
COUNTR1 = COUNTR1 + 1.
IF S_UMSKZ <> ''.
SELECT BELNR SHKZG DMBTR
INTO TABLE IT_BSEG_OPEN_BAL
FROM BSEG
WHERE BUKRS = P_BUKRS
AND GSBER = IT_BA_CUST_COMB-GSBER
AND UMSKZ IN S_UMSKZ
AND ( UMSKZ = ' ' OR UMSKZ IN S_UMSKZ )
AND KUNNR = IT_BA_CUST_COMB-KUNNR
AND KOART = P_KOART.
AND GJAHR = DATE1.
ELSE.
SELECT BELNR SHKZG DMBTR
INTO TABLE IT_BSEG_OPEN_BAL
FROM BSEG
WHERE BUKRS = P_BUKRS
AND GSBER = IT_BA_CUST_COMB-GSBER
AND ( UMSKZ = ' ' )
OR UMSKZ IN S_UMSKZ )
AND KUNNR = IT_BA_CUST_COMB-KUNNR
AND KOART = P_KOART.
AND GJAHR = DATE1.
ENDIF.
SORT IT_BKPF_OPEN_BAL BY BELNR.
SORT IT_BSEG_OPEN_BAL BY BELNR.
LOOP AT IT_BSEG_OPEN_BAL.
CNT = SY-TABIX.
READ TABLE IT_BKPF_OPEN_BAL
WITH KEY BELNR = IT_BSEG_OPEN_BAL-BELNR
BINARY SEARCH.
IF SY-SUBRC <> 0.
DELETE IT_BSEG_OPEN_BAL INDEX CNT.
CLEAR IT_BSEG_OPEN_BAL.
ENDIF.
ENDLOOP. " END IT_BSEG_OPEN_BAL
PREV_YR_BAL = 0. " TO BE ADDED LATER ......
OPEN_BAL = PREV_YR_BAL.
LOOP AT IT_BSEG_OPEN_BAL.
IF IT_BSEG_OPEN_BAL-SHKZG = 'S'.
OPEN_BAL = OPEN_BAL + IT_BSEG_OPEN_BAL-DMBTR.
ELSE.
OPEN_BAL = OPEN_BAL - IT_BSEG_OPEN_BAL-DMBTR.
ENDIF.
ENDLOOP. " END OF IT_BSEG_OPEN_BAL
IF OPEN_BAL <> 0. " LATER CHECK CLOSING BAL = 0...
SELECT SINGLE NAME1 INTO WA_NAME1 FROM KNA1
WHERE KUNNR = IT_BA_CUST_COMB-KUNNR.
SELECT SINGLE GTEXT INTO WA_GTEXT FROM TGSBT
WHERE GSBER = IT_BA_CUST_COMB-GSBER.
LOOP AT IT_BSEG WHERE GSBER = IT_BA_CUST_COMB-GSBER
AND KUNNR = IT_BA_CUST_COMB-KUNNR.
IT_LINE_ITEMS-BELNR = IT_BSEG-BELNR.
IT_LINE_ITEMS-UMSKZ = IT_BSEG-UMSKZ.
IT_LINE_ITEMS-SHKZG = IT_BSEG-SHKZG.
IT_LINE_ITEMS-DMBTR = IT_BSEG-DMBTR.
IT_LINE_ITEMS-SGTXT = IT_BSEG-SGTXT.
IT_LINE_ITEMS-XBLNR = IT_BSEG-ZUONR.
IT_LINE_ITEMS-ZUONR = IT_BSEG-ZUONR.
APPEND IT_LINE_ITEMS.
ENDLOOP. " END OF IT_BSEG
SORT IT_BKPF BY BELNR.
CLOSE_BAL = OPEN_BAL.
LOOP AT IT_LINE_ITEMS.
CNT1 = SY-TABIX.
MONCR = 0. MONDR = 0.
READ TABLE IT_BKPF
WITH KEY BELNR = IT_LINE_ITEMS-BELNR
BINARY SEARCH.
IT_LINE_ITEMS-BUKRS = IT_BKPF-BUKRS.
IT_LINE_ITEMS-BUDAT = IT_BKPF-BUDAT.
IT_LINE_ITEMS-BLDAT = IT_BKPF-BLDAT.
IT_LINE_ITEMS-BLART = IT_BKPF-BLART.
IF IT_BKPF-BLART = 'ZS' AND IT_BKPF-BLART = 'ZT'.
SELECT SINGLE * FROM ZFIH0004
WHERE KUNNR = IT_BA_CUST_COMB-KUNNR
AND ZGROUP = IT_BKPF-XBLNR
AND SCH10_PRSC = IT_LINE_ITEMS-ZUONR
AND BUKRS = IT_BKPF-BUKRS.
IF SY-SUBRC = 0.
IT_LINE_ITEMS-BLDAT = ZFIH0004-BLDAT.
ENDIF.
ENDIF.
IF IT_LINE_ITEMS-BLART <> 'ZS' AND IT_LINE_ITEMS-BLART <> 'DZ'
AND IT_LINE_ITEMS-BLART <> 'ZT'.
IT_LINE_ITEMS-XBLNR = IT_BKPF-XBLNR.
ENDIF.
SELECT SINGLE LTEXT FROM T003T
INTO IT_LINE_ITEMS-LTEXT
WHERE BLART = IT_LINE_ITEMS-BLART
AND SPRAS = 'E'.
READ TABLE IT_VBRK
WITH KEY VBELN = IT_LINE_ITEMS-BELNR.
IF SY-SUBRC = 0.
IF IT_LINE_ITEMS-BLART = 'RV'.
IF IT_VBRK-VBTYP = 'M'.
IT_LINE_ITEMS-LTEXT = 'Invoice'.
ELSEIF IT_VBRK-VBTYP = 'N'.
IT_LINE_ITEMS-LTEXT = 'Invoice Cancellation'.
ELSEIF IT_VBRK-VBTYP = 'O'.
IT_LINE_ITEMS-LTEXT = 'Credit Note'.
ELSEIF IT_VBRK-VBTYP = 'P'.
IT_LINE_ITEMS-LTEXT = 'Debit Note'.
ENDIF.
ENDIF.
ENDIF.
SELECT SINGLE LTEXT FROM T074T
INTO IT_LINE_ITEMS-SGLTX
WHERE SHBKZ = IT_LINE_ITEMS-UMSKZ
AND SPRAS = 'E'
AND KOART = P_KOART.
IT_LINE_ITEMS-DAMNT = 0.
IT_LINE_ITEMS-CAMNT = 0.
IF IT_LINE_ITEMS-SHKZG = 'S'.
AND IT_LINE_ITEMS-BLART <> 'ZC'
AND IT_LINE_ITEMS-BLART <> 'DA'
AND IT_LINE_ITEMS-BLART <> 'ZV'.
IT_LINE_ITEMS-DAMNT = IT_LINE_ITEMS-DMBTR.
CLOSE_BAL = CLOSE_BAL + IT_LINE_ITEMS-DMBTR.
ELSE.
IF IT_LINE_ITEMS-BLART <> 'ZC' AND IT_LINE_ITEMS-BLART <> 'DA'
AND IT_LINE_ITEMS-BLART <> 'ZV'.
IT_LINE_ITEMS-CAMNT = IT_LINE_ITEMS-DMBTR.
CLOSE_BAL = CLOSE_BAL - IT_LINE_ITEMS-DMBTR.
ENDIF.
ENDIF.
MODIFY IT_LINE_ITEMS INDEX CNT1.
ENDLOOP.
SORT IT_LINE_ITEMS BY BELNR DMBTR.
*******************MODIFICATION**********
*LOOP AT IT_LINE_ITEMS.
*IF IT_LINE_ITEMS-BELNR = CLRDOC AND IT_LINE_ITEMS-DMBTR = CLRAMT.
DELETE IT_LINE_ITEMS WHERE BELNR = CLRDOC AND DMBTR = CLRAMT.
*ENDIF.
*CLRDOC = IT_LINE_ITEMS-BELNR.
*CLRAMT = IT_LINE_ITEMS-DMBTR.
*ENDLOOP.
CLRDOC = 0. CLRAMT = 0.
CNT = 0.
LOOP AT IT_LINE_ITEMS.
IT_LINEITEMS_DUP-CBELNR = IT_LINE_ITEMS-BELNR.
IT_LINEITEMS_DUP-CDMBTR = IT_LINE_ITEMS-DMBTR.
IT_LINEITEMS_DUP-CSHKZG = IT_LINE_ITEMS-SHKZG.
APPEND IT_LINEITEMS_DUP.
ENDLOOP.
LOOP AT IT_LINE_ITEMS.
*CNT = SY-TABIX.
LOOP AT IT_LINEITEMS_DUP WHERE CBELNR = IT_LINE_ITEMS-BELNR.
IF IT_LINEITEMS_DUP-CSHKZG = 'S'.
CLRAMT = CLRAMT + IT_LINEITEMS_DUP-CDMBTR.
ELSEIF IT_LINEITEMS_DUP-CSHKZG = 'H'.
CLRAMT = CLRAMT - IT_LINEITEMS_DUP-CDMBTR.
ENDIF.
ENDLOOP.
IF CLRAMT = 0.
DELETE IT_LINE_ITEMS WHERE BELNR = IT_LINEITEMS_DUP-CBELNR.
ENDIF.
CLRAMT = 0.
ENDLOOP.
****************MODIFICATION***********
SORT IT_LINE_ITEMS BY BUDAT BELNR.
IF OPEN_BAL = 0 AND CLOSE_BAL = 0 AND IT_LINE_ITEMS[] IS INITIAL.
COUNTR2 = COUNTR2 + 1.
CONTINUE.
ELSE.
AT NEW KUNNR.
NEW-PAGE.
ENDAT.
CLEAR G_FL.
SKIP 1.
CLEAR: WA_NAME,WA_NAME2,WA_NAME3,WA_NAME4,WA_CITY,WA_PSTLZ.
SELECT SINGLE NAME1 NAME2 ORT01 PSTLZ
FROM KNA1
INTO (WA_NAME01,WA_NAME21,WA_CITY1,WA_PSTLZ1)
WHERE KUNNR IN S_KUNNR.
WRITE : / 'Customer Account : ', IT_BA_CUST_COMB-KUNNR,
100 'Business Code : ', IT_BA_CUST_COMB-GSBER,
/ WA_NAME01, 100 'Business Area : ', WA_GTEXT,
/ WA_NAME21,/ WA_CITY1,/ WA_PSTLZ1.
SKIP 1.
G_FL = 'X'.
SKIP 1.
ULINE AT (152).
FORMAT COLOR COL_HEADING INTENSIFIED.
WRITE :/ SY-VLINE NO-GAP, 'Doc.Date',
12 SY-VLINE NO-GAP, 'Doc.No.',
23 SY-VLINE NO-GAP, 'Ref.Doc.No.',
37 SY-VLINE NO-GAP, 'Ref.Doc.Date',
49 SY-VLINE NO-GAP, 'Ref.Doc.Name',
70 SY-VLINE NO-GAP, 'Advances/Deposits',
70 SY-VLINE NO-GAP, 'Description',
95 SY-VLINE NO-GAP, ' Debit' RIGHT-JUSTIFIED,
120 SY-VLINE NO-GAP, ' Credit' RIGHT-JUSTIFIED,
136 SY-VLINE NO-GAP, ' Balance' RIGHT-JUSTIFIED,
152 SY-VLINE NO-GAP.
ULINE AT (152).
FORMAT COLOR OFF INTENSIFIED OFF.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
IF OPEN_BAL >= 0.
WRITE : / SY-VLINE NO-GAP,
70 SY-VLINE NO-GAP, 'OPENING BALANCE',
95 SY-VLINE NO-GAP, OPEN_BAL NO-GAP,
120 SY-VLINE NO-GAP,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ELSE.
WRITE : / SY-VLINE NO-GAP,
70 SY-VLINE NO-GAP, 'OPENING BALANCE',
95 SY-VLINE NO-GAP,
120 SY-VLINE NO-GAP, OPEN_BAL NO-GAP,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ENDIF.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
ULINE AT (152).
LOOP AT IT_LINE_ITEMS.
WHERE BLART NE 'ZC'
AND BLART NE 'DA'
AND BLART NE 'ZV'.
**************MODIFICATIONS**************
IF MON = 0.
MON = IT_LINE_ITEMS-BUDAT+4.
MONTOT = OPEN_BAL.
ENDIF.
IF MON <> IT_LINE_ITEMS-BUDAT+4(2).
MONTOT = MONTOT + MONDR - MONCR.
ULINE AT (152).
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WRITE :/ SY-VLINE NO-GAP,
70 SY-VLINE NO-GAP, 'MONTH TOTAL',
95 SY-VLINE NO-GAP, MONDR,
120 SY-VLINE NO-GAP, MONCR,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ULINE AT (152).
IF MONTOT >= 0.
WRITE :/ SY-VLINE NO-GAP,
70 SY-VLINE NO-GAP, 'MONTH CLOSING BALANCE',
95 SY-VLINE NO-GAP, MONTOT,
120 SY-VLINE NO-GAP,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ELSE.
WRITE :/ SY-VLINE NO-GAP,
70 SY-VLINE NO-GAP, 'MONTH CLOSING BALANCE',
95 SY-VLINE NO-GAP,
120 SY-VLINE NO-GAP, MONTOT,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ENDIF.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
ULINE AT (152).
MON = IT_LINE_ITEMS-BUDAT+4.
MONDR = 0. MONCR = 0.
ENDIF.
IF IT_LINE_ITEMS-SHKZG = 'S'.
MONDR = MONDR + IT_LINE_ITEMS-DMBTR.
ELSE.
MONCR = MONCR + IT_LINE_ITEMS-DMBTR.
ENDIF.
IF IT_LINE_ITEMS-SGTXT = ' '.
PERFORM SUB_GET_TEXT.
ENDIF.
ULINE AT (152).
FORMAT COLOR COL_NORMAL INTENSIFIED.
FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
IF IT_LINE_ITEMS-DAMNT = 0.
WRITE :/ SY-VLINE NO-GAP, IT_LINE_ITEMS-BUDAT NO-GAP,
12 SY-VLINE NO-GAP, IT_LINE_ITEMS-BELNR NO-GAP,
23 SY-VLINE NO-GAP, IT_LINE_ITEMS-XBLNR NO-GAP,
37 SY-VLINE NO-GAP, IT_LINE_ITEMS-BLDAT NO-GAP,
49 SY-VLINE NO-GAP, IT_LINE_ITEMS-LTEXT NO-GAP,
70 SY-VLINE NO-GAP, 71(23) IT_LINE_ITEMS-SGTXT
NO-GAP,
95 SY-VLINE NO-GAP,
120 SY-VLINE NO-GAP, IT_LINE_ITEMS-CAMNT NO-GAP,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ELSEIF IT_LINE_ITEMS-CAMNT = 0.
WRITE :/ SY-VLINE NO-GAP, IT_LINE_ITEMS-BUDAT NO-GAP,
12 SY-VLINE NO-GAP, IT_LINE_ITEMS-BELNR NO-GAP,
23 SY-VLINE NO-GAP, IT_LINE_ITEMS-XBLNR NO-GAP,
37 SY-VLINE NO-GAP, IT_LINE_ITEMS-BLDAT NO-GAP,
49 SY-VLINE NO-GAP, IT_LINE_ITEMS-LTEXT NO-GAP,
70 SY-VLINE NO-GAP, 71(23) IT_LINE_ITEMS-SGTXT NO-GAP,
95 SY-VLINE NO-GAP, IT_LINE_ITEMS-DAMNT NO-GAP,
120 SY-VLINE NO-GAP,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ELSE.
WRITE :/ SY-VLINE NO-GAP, IT_LINE_ITEMS-BUDAT NO-GAP,
12 SY-VLINE NO-GAP, IT_LINE_ITEMS-BELNR NO-GAP,
23 SY-VLINE NO-GAP, IT_LINE_ITEMS-XBLNR NO-GAP,
37 SY-VLINE NO-GAP, IT_LINE_ITEMS-BLDAT NO-GAP,
49 SY-VLINE NO-GAP, IT_LINE_ITEMS-LTEXT NO-GAP,
70 SY-VLINE NO-GAP, 71(23) IT_LINE_ITEMS-SGTXT NO-GAP,
95 SY-VLINE NO-GAP, IT_LINE_ITEMS-DAMNT NO-GAP,
120 SY-VLINE NO-GAP, IT_LINE_ITEMS-CAMNT NO-GAP,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ENDIF.
IT_LINE_ITEMS-SGLTX = ''.
ENDLOOP.
MONTOT = MONTOT + MONDR - MONCR.
ULINE AT (152).
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WRITE :/ SY-VLINE NO-GAP,
70 SY-VLINE NO-GAP, 'MONTH TOTAL',
95 SY-VLINE NO-GAP, MONDR,
120 SY-VLINE NO-GAP, MONCR,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ULINE AT (152).
IF MONTOT >= 0.
WRITE :/ SY-VLINE NO-GAP,
70 SY-VLINE NO-GAP, 'MONTH CLOSING BALANCE',
95 SY-VLINE NO-GAP, MONTOT,
120 SY-VLINE NO-GAP,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ELSE.
WRITE :/ SY-VLINE NO-GAP,
70 SY-VLINE NO-GAP, 'MONTH CLOSING BALANCE',
95 SY-VLINE NO-GAP,
120 SY-VLINE NO-GAP, MONTOT,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ENDIF.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
ULINE AT (152).
MONCR = 0. MONDR = 0.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
FORMAT COLOR COL_TOTAL INTENSIFIED.
IF CLOSE_BAL >= 0.
WRITE : / SY-VLINE NO-GAP,
70 SY-VLINE NO-GAP, 'CLOSING BALANCE',
95 SY-VLINE NO-GAP, CLOSE_BAL NO-GAP,
120 SY-VLINE NO-GAP,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ELSE.
WRITE : / SY-VLINE NO-GAP,
70 SY-VLINE NO-GAP, 'CLOSING BALANCE',
95 SY-VLINE NO-GAP,
120 SY-VLINE NO-GAP, CLOSE_BAL NO-GAP,
136 SY-VLINE NO-GAP,
152 SY-VLINE NO-GAP.
ENDIF.
ULINE AT (152).
MON = 0. MONTOT = 0.
MONDR = 0. MONCR = 0.
ENDIF.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
*****MODIFICATION ON 13.08.2005***
CLEAR IT_LINE_ITEMS.
REFRESH IT_LINE_ITEMS.
CLEAR OPEN_BAL.
CLEAR CLOSE_BAL.
******END OF MODIFICATION****
FREE OPEN_BAL.
FREE CLOSE_BAL.
FREE IT_LINE_ITEMS.
IF G_FL = 'X'.
AT END OF KUNNR.
NEW-PAGE.
ENDAT.
CLEAR G_FL.
SKIP 1.
ENDIF.
ENDLOOP.
ENDIF. " ENDIF OF NOT INITIAL IT_BA_CUST_COMB.
***********MODIFICATION**********
IF COUNTR1 = COUNTR2.
WRITE : /20 '********** NO DATA SELECTED **********'.
ENDIF.
********END OF MODIFICATION********
IF IT_BA_CUST_COMB[] IS INITIAL.
WRITE : /20 '********** NO DATA SELECTED **********'.
ENDIF.
ENDFORM. "PROCESS_DISPLAY_DATA
*& Form sub_get_text
text
FORM SUB_GET_TEXT .
*select single * from vbak where vbeln = it_vbrk-aubel.
DATA: L_VBELN LIKE THEAD-TDNAME.
SELECT SINGLE AUBEL FROM VBRP INTO VBRP-AUBEL WHERE VBELN =
IT_LINE_ITEMS-BELNR.
L_VBELN = VBRP-AUBEL..
l_vbeln = it_vbrk-aubel.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = '0001'
LANGUAGE = SY-LANGU
NAME = L_VBELN
OBJECT = 'VBBK'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = IT_TEXT
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF SY-SUBRC <> 0.
REFRESH: IT_TEXT.
CLEAR: IT_TEXT.
ENDIF.
LOOP AT IT_TEXT.
IT_LINE_ITEMS-SGTXT = IT_TEXT-TDLINE.
ENDLOOP.
ENDFORM. "sub_get_text
*& Form GET_SUP_PLANT
text
--> p1 text
<-- p2 text
FORM GET_SUP_PLANT .
CALL FUNCTION 'PIA_CSO_PLANT_ADDRESS_READ'
EXPORTING
PI_PLANT = WA_VWERK
IMPORTING
PE_PLADDR = IT_PLANT
PE_RETURN1 =
APPEND IT_PLANT.
LOOP AT IT_PLANT.
WA_NAME = IT_PLANT-NAME.
WA_NAME2 = IT_PLANT-NAME_2.
WA_NAME3 = IT_PLANT-NAME_3.
WA_NAME4 = IT_PLANT-NAME_4.
WA_CITY = IT_PLANT-CITY.
WA_PSTLZ = IT_PLANT-POSTL_COD1.
ENDLOOP.
ENDFORM. " GET_SUP_PLANT -
Setting Printer Acrobat XI Default to print all PDF files last page first
Hello,
I have just recently upgraded to Mavericks and also have the Creative Cloud using Acrobat XI Pro. In using Reader 9, whenever I printed a PDF the output would print in reverse order, so all I would have to do is take it from the printer and hand it off; it would be in the correct order. How do I setup Acrobat XI Pro to accomplish the same settings (print in reverse order) on not only 1 PDF, but all PDF files? Any assistance would be greatly appreciated.
Thanks,
JohnCan a print preset be created that would work for all PDF files and not just the one opened? Just trying to find out since no one has answered my question in 2 days and Tech Support wasn't much help.
Thanks,
John -
D5460 Printing Preferences are blank or corrupted on Windows 8.1
Hi,
When I go to the printer settings fir my D5460 I get corrupted or blank dialogues.
I am running Windows 8.1 on an i7 4930K.
From Control Panel\All Control Panel Items\Devices and Printers\HP Photosmart D5400 series I click on Customize your Printer then Preferences and I get something like:
Any suggestions why this is happening or how to fix this?
The corrupted characters can be different, suggesting to me that the text resources are incorrect. I am using UK language settings.
I ave already tried the obvious re-installing, clearing registry settings, etc, etc.Sorry to hear that didn't work aerobaticant .
Did you download and install the Full Feature drivers or are you using the Pre-installed Windows drivers?
HP Photosmart D5460 Printer Drivers.
Please take a look at this post from my co-worker @Sunshyn2005 with the same issue that you are having, to try.
Re: Strange characters / Wrong language in Print Properties (windows 8.1 pro 64-bit).
Let me know how you make out.
Thank You.
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
Gemini02
I work on behalf of HP
Maybe you are looking for
-
i installed a demo version of adobe flash cs6 and after 1day , when i try to save my stuff it gives me a fatal error , can anybody give me a soluction please, THANKS IN ADVANCE
-
Emails won't open - why???
A few months ago my email account was hacked, spewing spam all over the place. So I contacted AT+T and a customer service person changed my security settings and reset my configurations. This caused me to lose everything that had been on the face o
-
Flash CS5 problem - missing text
We've got several Flash files created by a partner organization that we're trying to edit. The files are for an e-learning course and contain four or five "tabs," each with a multiple choice or true/false question, each option labeled A, B, C, etc..
-
How to use TDMS API in Visual Studio 8.6
I am using Measurement Studio 8.6.1 for Visual Studio 2005. I need to read/write TDMS files from my mfc c++ application and I can't figure out how to add the TDMS capability to my visual studio project. I don't think it's part of the installed c++ cl
-
Hi,When I douwload some podcast and I send the podcast to my mini playermusic(archos 104),most of items appears under"file type podcast".Some others appears under" file type MP3". I want all items under"file type MP3"...But I don't know to do it! I'v