Check printing r12 print stub @ last page
Hi
I designed r12 check print rtf to accommodate 12 invoice lines per page and a check stub @ bottom...
When I have 28 lines it goes upto 3 pages..and 4th page shows voided stub...
But in each page(page 1&2&3) I am getting the stub printed out..printing only at page 3 or page 4 is the key..
How to make it like to print the STUB only at last page.?There
may be cases the client may have 100 lines..
So it will be like print check stub @ 9th page
Appreciate advice
Kp
Edited by: 854508 on Jun 28, 2011 6:22 AM
Hello;
1)Use Oracle original template located on the server for R12.
search for "rtf" file and modify that template by renaming them.
2)Only issue you will face is the gapping or spaces between the invoice line and check stub or I called it "blank line filler".
To achieve this I used one the Tom's blog article and this URL:http://oracle.anilpassi.com/xml-publisher-developing-reports-printed-on-pre-printed-stationary-3.html for ideas.
Here it goes:
2.a - Declare a global value for number of line needed to fill invoices.
This number must match exactly under "Payment" then "Format" under "paybales super user" responsibility. I called it "lpp" (line per page"
2.b - create a text form field right before printing check stub.
this field will print blank line based on calling template recursively, also
we declare a variable "countdown" for number of recursive calls.
This parameter will be passed to "blank template" section
<xsl:call-template xdofo:ctx="inline" name="countdown">
<xsl:with-param name="countdown" select="number($lpp)-(..//DocumentPayableCount)"/></xsl:call-template>
2.c - create a template section with one blank line in bottom of the report called "countdown" based on 2.a.
2.c.1 create a field for parameter value which was passed from 2.b like this:
<xsl:param name="countdown"/><xsl:if test="$countdown">
2.c.2 create a blank line.
2.c.3 create a field which call the template itself by substracting a countdown value by one.
<xsl:call-template name="countdown"><xsl:with-param name="countdown" select="$countdown - 1"/></xsl:call-template></xsl:if>
2.c.4. don't forget to close your template tag like <?end template?>
HTH
Shaun S.
Similar Messages
-
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 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 -
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. -
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.
-
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! -
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 -
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 -
How to Print T&C on backside of the last page in smartform.
Hi All,
I have requirement from one of the my client to print the terms & condition page on the back side of last page in invoice form.
I have created three pages as below.
First page: To Print header data,Print mode:blank,Next page : NEXT.
Second page : Contains the continuation of the data,if there are enough lines,Print Mode: D,Next page : NEXT.
Last page:To Print T&C,Print mode : blank,Next page :blank.
This is working properly when form has 2 pages.Here my question is,
How to print the T&C on backside of first page,if form has only one page.
Thanks in Advance.Hi Vineesh,
I have 3 pages in my form.
First page: To Print header data, Print mode:blank, Next page : NEXT.
First page has the comment node, go to next page as Third page.
Second page : Contains the continuation of the data, if there are enough lines, Print Mode: D,
Next page : NEXT.
Third Page: T&C page, Print mode : blank,Next page :blank
The 3rd page should print back side of the page.
If form has only one page,then first page should be in D mode.Hence the T&C page will print back side of first page.
If form has multiple pages. then the last page ( where the main window gets end ) should be D.Hence
the T&C page will print back side of last page.
How to achieve this both the scenarios?
Thanks & Regards,
Priya Chandran -
Layout Question - How to print a frame on the bottom of the last page ?
I have a summary frame for my report. I want to print the summary information at the bottom of the last page of the report. Currently depending on the data, the summary frame prints anywhere on the last page. How do I make sure it prints exactly at the bottom of the last page (just the last page).
Thanks in advance.You might like to take a look at the following threads:
Last frame with last record of proceding repeating frame
Re: How to capture a keystroke - including control chars? -
Formatting - How to print a frame on the bottom of the last page ?
I have a summary frame for my report. I want to print the summary information at the bottom of the last page of the report. Currently depending on the data, the summary frame prints anywhere on the last page. How do I make sure it prints exactly at the bottom of the last page.
Thanks in advance.Hello,
I know this is an old post, but I have the same problem. I am unable to access the examples for Note.252881.1 (corrupted file). May I impose on you to send me examples via e-mail? If this is not possible can you point me in a direction where there is "good" documentation on frame manipulations? What I've found on metalink, otn, internet, etc. haven't been too forthcoming.
Thank you.
Maybe you are looking for
-
For those of us who decided to wait...
With all the previous issues that 2.3.4 wrought, it seemed prudent to wait before rushing into the upgrade. Does anyone know if there is a way to eliminate the constant reminders that the upgrade has been downloaded and is ready for install since ma
-
Any Help on PDF Form Genration
Dear Experts, I have couple of doubts! 1. Is Summary Button in Account TI displays a PDF is it a factsheet or a form? 2. How do i achieve similar functionality with my Custom Button? I needed user to see the Custom PDF.. so any help for that or a tu
-
IJ print quality plug-in error
I can't print from any application. An error comes up, saying its a problem with the IJ print quality plug-in. I can't find this plug-in so i can't do anything about it. Any help would be amazing.
-
How to get audio to an overhead projector from iPad
Hello All. Has anyone figured out how to get audio from ipad to an overhead projector? I know I could mirror if I had HD, but I do not have HD at work.
-
Question about version SAp Mobile Infraestructure
Good morning, Actually we have using the version of Sap Mobile Infraestructure MI 25 SP 22 Patch 02 Build 200901191055 Do we want to know if exist some last version or SP of the Sap Mobile Infraestructure MI 25? Thanks Regards Fernando