XSL-FO for Standard Purchase Order, doesn't print page number

Hi,
I worked on XSL-FO code to custom the PDF output for Standard PO. Everything works great: I added company logo (in a different position of the standard commented code <!-- Too easy just to uncomment... :-)--> ), i created new attribute sets to highlight some elements on the print, I added a footer with company details and document type and number (instead of placing this in the header, the costumer didn't like it where it was..)
OK. BUT: the page number at the bottom on the right isn't printed anymore. For example: if the PO page is n.1 of 2 pages, it comes only '12' and not Page 1 of 2. So i tought not to use the original template (tihs one)
<!-- Template for displaying the page numbers -->
<!-- bug#3836856: Template for displaying the page numbers at right bottom of the page -->
<xsl:template name="pageNumber">
     <xsl:variable name="po_page">
     <xsl:value-of select="$BOILER_PLATE_MESSAGES_OBJ[MESSAGE='PO_FO_PAGE'][1]/TEXT"/>
     </xsl:variable>
     <!-- Get the String before the PAGE_NUM token -->
     <xsl:variable name="string_before_page_num">
     <!-- <xsl:value-of select="substring-before($po_page,'&amp;PAGE_NUM')"/>-->
     <xsl:value-of select="substring-before($po_page,'Pag.;PAGE_NUM')"/>
     </xsl:variable>
     <!-- Get the String after the PAGE_NUM token -->
     <xsl:variable name="string_after_page_num">
     <!-- <xsl:value-of select="substring-after($po_page,'&amp;PAGE_NUM')"/>-->
     <xsl:value-of select="substring-after($po_page,'/ ;PAGE_NUM')"/>
     </xsl:variable> ......
but inseriting a select just where I want the page num to be displayed (see code)
<fo:block xsl:use-attribute-sets="test_style" >
<xsl:value-of select="$BOILER_PLATE_MESSAGES_OBJ[MESSAGE='PO_FO_PAGE'][1]/TEXT"/>
                                                  </fo:block>
but this gave me as result 'Page &PAGE_NUM of &END_PAGE'.
Where did I do wrong?? It's like the PO_FO_PAGE message is not dinamically insered in the PDF. Hope I've been clear enough and somene can help me. Thaks in advance, Michele

Hi Michele:
I can check out for you how to print page number in XSL-FO (There is an O'Reilly) book, but I think I help you better by recommending a different strategy - Don't write XSL-FO stylesheets. While Purchasing does not support RTF templates you can still write RTF templates and convert them to FO using the XML Publisher Template Builder for Word.
Download the matching Template Builder for Word (5.0) or XML Publisher Desktop 5.5 (includes the Template Builder) patch and then Create your template as an RTF template.
You can then EXPORT the template as XSL-FO stylesheet and upload as to Purchasing AS LONG AS THE VERSION OF THE DESKTOP and E-Businees Suite XML Publisher MATCH.
If you still want to write XSL stylesheet, you can just use the Template Builder to generate you the code and paste the code (e.g. for page numbers) into your stylesheet.
By the way - Purchasing will support RTF templates in future versions...
Hope that helps,
Klaus

Similar Messages

  • Unable to preview Contract Terms for Standard Purchase Order

    Unable to preview View Contract Terms for Standard Purchase Order,displays error
    We have defined the same contract terms and Document type layouts to documents Contract Purchase Order and Standard Purchase Order.
    Created a Contract PO,Attached a template able to preview the contract template in PDF successfully
    Created a Standard PO,Attached a template not able to preview the contract template in PDF
    Displays the foll error
    Problem: The system could not generate the PDF document.
    Reason: The system detected an error in the following code/object.
    Code: XML
    Object: PO
    Action: Please contact the system administrator and try again
    ### Steps to Reproduce Problem ###
    Steups
    Created a custom XSL-FO template for Contract template and defined it for Standard PO and Contracts PO.
    Steps to Reproduce
    1.Create a PO,give any category of 100 Qty
    2.Click Terms and CLick Author Contract Terms\
    3.Select the custom Template ,Click Apply Template
    4.Click Preview.
    Following error displayed
    Problem: The system could not generate the PDF document.
    Reason: The system detected an error in the following code/object.
    Code: XML
    Object: PO
    Action: Please contact the system administrator and try again
    Please Note:The above scenario works for Contracts PO.
    The problem is only for Standard PO
    We have reviewed note:454479.1
    The file version of POXVCOMB.pls 115.69.11510.28
    But we have another test instance this also has the same version , the scenario works fine
    So we are confused why this is reproducible only for a particular instance with same file versions
    If anyone can suggest a solution pls give me a reply
    Already SR is logged for the same -SR 3-1272761221, awaiting reply from support

    Please reply if any update on the above query is present.

  • Can we setup automatic sourcing for standard purchase order

    hi all,
    can we setup automatic sourcing for standard purchase order. i have done automation for bpa. can anyone help me in setting up automatic sourcing for spo.
    thanks.

    Hi,
    In order to create a Standard PO from requisition automatically, Requisition should be sourced to Contract Purchase agreement / Quotation / Global BPA.
    Please create ASL, Sourcing Rule and Assign the sourcing rule in Assignment Set.
    Also Set the Profile option "PO: Automatic Document Sourcing"
    Refer the note
    Automatically Create PO's from Drop Ship Requisition (Doc ID 835412.1)
    How to Create an Automatic Standard Purchase order for an Approved Purchase Requisition Sourced to a Contract Purchase Agreement (CPA) (Doc ID 334601.1)
    Thanks,
    Subhashini

  • How to modify date format for Standard Purchase Order  Template XSL-FO

    I am editing the XSL-FO for the Standard Purchase Order.
    I need to modify the promised date column to 'DD-MON-YYYY’' , tried to use substring in below line but it didn't work
    <xsl:value-of select="LINE_LOCATIONS/LINE_LOCATIONS_ROW/PROMISED_DATE"/>
    Any solution for this ?
    thanks
    Pravin

    Thanks for your response.
    I tried to change the code in below format but it was giving error.
    Original code
    <xsl:value-of select="LINE_LOCATIONS/LINE_LOCATIONS_ROW/PROMISED_DATE"/>
    modified to
    <xsl:value-of select="xdoxslt:format_date(LINE_LOCATIONS/LINE_LOCATIONS_ROW/PROMISED_DATE,'dd-mmm-yyyy','dd/mmm/yyyy hh24:mi:ss',$_XDOLOCALE,$_XDOTIMEZONE)"/>
    also tried with
    <xsl:value-of select="xdoxslt:format_date(LINE_LOCATIONS/LINE_LOCATIONS_ROW/PROMISED_DATE,'dd-mmm-yyyy','dd-mmm-yyyy hh24:mi:ss',$_XDOLOCALE,$_XDOTIMEZONE)"/>
    also tried like
    <xsl:value-of select="xdoxslt:format_date(LINE_LOCATIONS/LINE_LOCATIONS_ROW/PROMISED_DATE,'dd-mmm-yyyy','dd/mmm/yyyy',$_XDOLOCALE,$_XDOTIMEZONE)"/>
    Tried above 3 methods but it didn't work.
    right now the date format in pdf file is 24-MAY-2011 21:56:24 i need to remove 21:56:24 and have only 24-MAY-2011
    any suggestions.
    thanks

  • Unit Price Format in XSL-FO Code for Standard Purchase Order Printing

    Hi All,
    As I am new to XSL-FO, so i am not aware of doing XML,XSL-FO changes. I have an issue with the xsl-fo for standard po layout. My report layout gives ##,## instead of ##.## as my Unit Price. i.e. in the report for POs, it is showing unit price in the format as #,## eg: 0,32 or u can say like 1,70 instead it should show #.## something like 0.32 and 1.70 as my unit price. The piece of code related to unit price formatting in report as follows:
    <xsl:choose>
    <xsl:when test="(UNIT_PRICE,1,1 > 1) and (substring-before(UNIT_PRICE,',') > 0)">
    <fo:table-cell xsl:use-decimal-format="euro2"> <fo:table-cell xsl:use-attribute-sets="table.cell5"> <fo:block xsl:use-attribute-sets="form_data1">
    <xsl:value-of select="format-number(substring-before(UNIT_PRICE,','),'#.###','euro2')"/>,<xsl:if test="(substring(substring-after(UNIT_PRICE,','),3,1)) > 4"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,','),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,','),3,1)) =''"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,','),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,','),3,1)) = 1"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,','),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,','),3,1)) = 2"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,','),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,','),3,1)) = 3"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,','),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,','),3,1)) = 4"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,','),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,','),2,1)) = ''"><xsl:value-of select="((substring(substring-after(UNIT_PRICE,','),1,1))-(substring(substring-after(UNIT_PRICE,','),1,1)))"/></xsl:if>
              </fo:block>
         </fo:table-cell>
    </fo:table-cell>
    </xsl:when>
    <xsl:when test="(substring(UNIT_PRICE,1,1)=',')">
         <fo:table-cell xsl:use-attribute-sets="table.cell5"> <fo:block xsl:use-attribute-sets="form_data1">
         <xsl:value-of select="UNIT_PRICE"/>
         </fo:block>
         </fo:table-cell>
    </xsl:when>
    <xsl:when test="(UNIT_PRICE,1,1 > 1) and (substring-after(UNIT_PRICE,'.') > 0)">
    <fo:table-cell xsl:use-decimal-format="euro2"> <fo:table-cell xsl:use-attribute-sets="table.cell5"> <fo:block xsl:use-attribute-sets="form_data1">
         <xsl:value-of select="format-number(substring-before(UNIT_PRICE,'.'),'#.###','euro2')"/>,<xsl:if test="(substring(substring-after(UNIT_PRICE,'.'),3,1)) > 4"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,'.'),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,'.'),3,1)) =''"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,'.'),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,'.'),3,1)) = 1"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,'.'),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,'.'),3,1)) = 2"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,'.'),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,'.'),3,1)) = 3"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,'.'),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,'.'),3,1)) = 4"><xsl:value-of select="(substring(substring-after(UNIT_PRICE,'.'),1,5))"/></xsl:if>
    <xsl:if test="(substring(substring-after(UNIT_PRICE,'.'),2,1)) = ''"><xsl:value-of select="((substring(substring-after(UNIT_PRICE,'.'),1,1))-(substring(substring-after(UNIT_PRICE,'.'),1,1)))"/></xsl:if>
         </fo:block>
         </fo:table-cell>
    </fo:table-cell>
    </xsl:when>
    <xsl:when test="(UNIT_PRICE,1,1 > 1 ) and (substring-after(UNIT_PRICE,',') ='') ">
    <fo:table-cell xsl:use-decimal-format="euro"> <fo:table-cell xsl:use-attribute-sets="table.cell5"> <fo:block xsl:use-attribute-sets="form_data1">
    <xsl:value-of select="format-number(UNIT_PRICE,'#,###.00','euro')"/>
              </fo:block>
         </fo:table-cell>
    </fo:table-cell>
    </xsl:when>
    </xsl:choose>
    PS: My decimal formats for euro and euro2 are:
    <xsl:decimal-format name="euro" decimal-separator="," grouping-separator="."/>
    <xsl:decimal-format name="euro2" grouping-separator="." NaN="0"/>
    Any help or reply regarding this issue will be highly appreciated.
    Regards,
    Sumir

    Hi Michele:
    I can check out for you how to print page number in XSL-FO (There is an O'Reilly) book, but I think I help you better by recommending a different strategy - Don't write XSL-FO stylesheets. While Purchasing does not support RTF templates you can still write RTF templates and convert them to FO using the XML Publisher Template Builder for Word.
    Download the matching Template Builder for Word (5.0) or XML Publisher Desktop 5.5 (includes the Template Builder) patch and then Create your template as an RTF template.
    You can then EXPORT the template as XSL-FO stylesheet and upload as to Purchasing AS LONG AS THE VERSION OF THE DESKTOP and E-Businees Suite XML Publisher MATCH.
    If you still want to write XSL stylesheet, you can just use the Template Builder to generate you the code and paste the code (e.g. for page numbers) into your stylesheet.
    By the way - Purchasing will support RTF templates in future versions...
    Hope that helps,
    Klaus

  • How to modify date format for Standard Purchase Order

    In the Standard Purchase Order I have been trying to modify the date format of the Need by and Promised Date. To display DD-MON-YYYY please could some advise.
    Thanks

    The varaibles and prarameters I am using are.
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ora="http://www.oracle.com/XSL/Transform/java/" xmlns:xdofo="http://xmlns.oracle.com/oxp/fo/extensions" xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions" xmlns:xdoxliff="urn:oasis:names:tc:xliff:document:1.1">
    <xsl:param name="_XDOCALENDAR">GREGORIAN</xsl:param>
    <xsl:param name="_XDOLOCALE">en-US</xsl:param>
    <xsl:param name="_XDOTIMEZONE">GMT</xsl:param>
    <xsl:param name="_XDODFOVERRIDE">;</xsl:param>
    <xsl:param name="_XDOCTX">#</xsl:param>
    <xsl:variable name="_XDOXSLTCTX" select="xdoxslt:set_xslt_locale($_XDOCTX, $_XDOLOCALE, $_XDOTIMEZONE, $_XDOCALENDAR, $_XDODFOVERRIDE)" />

  • Bom explosion in the item detail screen for standard purchase order

    Hi Gurs,
    we have a requirement to expolde bom in standard purchase order in the main item screen like in any
    sales order where
    main item will be item 10
    sub item will be item 20
    sub item will be item 30
    we had already exploded bom through subcontracting but sub items are getting in a different screen.
    Is there any way where we can get the subitems in the main screen rather than subscreen.
    It will be gr8 if you can provide us any userexit/badi.
    pls give your suggestions.
    Thanks & Regards,
    Radhakrishna.

    Hi,
    This is not possible in standard SAP. However, you can create a custom program to make this happen. The custom program should explode BOM for the material you enter and then call the bapi BAPI_PO_CREATE to create PO with all the components one after the other in the same PO.
    Thanks,
    Rana

  • Import Standard Purchase Orders -For Standard Purchase Orders

    Hi,
    I'm trying to load STANDARD purchase orders using Import Standard Purchase Orders(POXPOPDOI). I'm getting following error in log file
    To get the log messages for PDOI, please use the following id to query against FND_LOG_MESSAGES table:
    AUDSID = 3084626
    User-Defined Exception in Package po.plsql.PO_PDOI_LINE_LOC_PROCESS_PVT. Procedure validate_line_locs.20
    User-Defined Exception in Package po.plsql.PO_PDOI_MAINPROC_PVT. Procedure process_line_locations.60
    User-Defined Exception in Package po.plsql.PO_PDOI_MAINPROC_PVT. Procedure process.30
    User-Defined Exception in Package po.plsql.PO_PDOI_PVT. Procedure start_process.110
    User-Defined Exception in Package po.plsql.PO_PDOI_Concurrent. Procedure POXPDOI.30
    Output File:
    DECLARE
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at line 133
    Your help greatly appreciated.

    Hi,
    What is the application release? OS?
    Please see if (Note: 735909.1 - PDOI Errors With Exec Fnd_conc_stat.Collect Ora-06510) is applicable.
    Regards,
    Hussein

  • No approver was found for Standard Purchase Order #

    I created an Employee for that employee i assigned a Buyer
    and Document type i gave a Direct approver ,But it is still showing No approver for this PO.
    could some one please give me the details how to approve a purchase order using Direct Method.
    And also please tell how to define approval hierarchy for PO approval and how to assign that hierarchy to Buyer.
    Regards
    Narasaiah
    Message was edited by: Narasaiah
    user554411

    hello,
    I found the documents still at the buyer's.it has to do with the revision number; it was not sent correctly. the buyer reopened the documents and resent them.
    Now the problem is solved...

  • Data Source For Standard Purchase Order

    I need to customize the
    PO_STANDARD_PO.xsd
    PO_STANDARD_PO.xml
    and the xsl file i can download them but the update updatefile buttons are not active
    can any one help me customize this file
    and open this un active buttoms in the XML publisher
    Thanks

    Hi;
    I suggest close your issue here as answered than move your issue Oracle Discussion Forums » Business Intelligence Foundation » BI Publisher hich you can get more quick response
    Review:
    How to modify PO_STANDARD_PO data definition?
    Regard
    Helios

  • Data Source for Standard Purchase Orders

    I need to customize the
    PO_STANDARD_PO.xsd
    PO_STANDARD_PO.xml
    and the xsl file i can download them but the update updatefile buttons are not active
    can any one help me customize this file
    and open this un active buttoms in the XML publisher
    Thanks

    Hi;
    I suggest close your issue here as answered than move your issue Oracle Discussion Forums » Business Intelligence Foundation » BI Publisher hich you can get more quick response
    Review:
    How to modify PO_STANDARD_PO data definition?
    Regard
    Helios

  • How to find Script Style for Standard Purchase Order Form "MEDRUCK".

    Hi ,
    I need to convert script style using by Sap-script form 'Medruck' to Smart form style and for this i have to find Sap-script style name for Medruck.
    If anyone have a idea about it then plz tell me.
    It's very urgent for me.
    Thanks & Regards,
    Gaurav.

    Hi Gaurav,
    If I'm not wrong, we don't have any SAP-Script Style, but when we are trying to upgrade to SmartForms simply u upgrade using smartforms transaction code, and it will convert all your character formats and paragraph formats and try to assign as SYSTEM Style in Smartforms.
    If you find the difference then you need to create SmartStyle manually and assign it.
    Thanks,
    -Pavan

  • Steps to edit standard purchase order layout

    hi.......
    plz tell me
    steps to edit standard purchase order layout and printing program............

    Hello,
              The Standard Layout Set for Purchase Order is MEDRUCK. However, you need to Copy the Form and Make changes to the Layout.
              First of all, you need to identify the Elements of the Layout as to where exactly you need Customer Modifications for your client's requirement.
             Then go ahead and make changes to the Copied Version (Not the Standard Layout Set).
            Then from NACE the Output Type can be configured for the New Layout Set.
    Hope it was helpful.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • Multiple Shipment Info. Not showing Standard Purchase Order Stylesheet

    Hi
    I have multiple shipment lines for a PO. These are not showing as detail in PO Output for Communication request for Standard Purchase Order Stylesheet.
    I have also created custom template by using data definations "Standard Purchase Order Data Source". I have used following xml tags in template to show shipment information:
    <?for-each:LINE_LOCATIONS?>
    <?DROP_SHIP_FLAG?>
    Please help out, is there any setup required to show shipment detail on Standard Purchase Order through PO Output for Communication / Document View.
    Regards,
    Umar
    Edited by: 903119 on May 29, 2012 4:36 AM

    Hi Umar,
    It is <?for-each:LINE_LOCATIONS_ROW?> not <?for-each:LINE_LOCATIONS?> for PO shipments.
    Also make sure it is nested inside <?for-each:LINES_ROW?>.
    Thanks,
    PS.

  • Need to modify Standard Purchase Order Stylesheet (PO_STANDARD_XSLFO.xsl)

    Hi
    We need to modify Standard Purchase Order Stylesheet (po_standard_xslfo.xsl) . Current stylesheet generating PO like the following.
    <FOR-EACH>
    ITEM_NUM
    ITEM_DESCRIPTION
    <FOR-EACH>
    SHIP_TO_ADDRESS_LINE1 NEED_BY_DATE QUANTITY
    </FOR-EACH>
    </FOR-EACH>
    Based on this, we are getting the output like this:
    Item Num 1
    Itme Description 1
    Ship To: Needed: Quntity
    1234. A1 Avenue JUL 200
    SomeCity, CA 90706
    1234. A1 Avenue AUG 200
    SomeCity, CA 90706
    4567 B1 Avenue JUL 100
    City2 , CA
    Itme Description 2
    Ship To: Needed: Quntity
    5689. c1 Avenue JUL 200
    SomeCity, CA 90706
    Our requirement is like this:
    Item Num 1
    Itme Description 1
    Ship To: 1234. A1 Avenue, SomeCity, CA 90706
    Month: JUL AUG SEP
    Quantity: 200 200 100
    Ship To: VVV4567 B1 Avenue , SomeCity, CA 90706
    Month: JUL AUG SEP
    Quantity: 100 200 100
    So we need to add ship_to group (ITEM/SHIP_TO) .
    How can we use group by item, ship_to..
    <fo:block> <xsl:value-of select="ITEM_NUM"/> </fo:block>
    <fo:block> <xsl:value-of select="ITEM_DESCRIPTION"/> </fo:block>
    <xsl:for-each select="/PO_DATA/LINES/LINES_ROW/LINE_LOCATIONS/LINE_LOCATIONS_ROW">
    <fo:block> <xsl:value-of select="SHIP_TO_ADDRESS_LINE1"/> </fo:block>
    <fo:block> <xsl:value-of select="substring(NEED_BY_DATE,4,3)"/> </fo:block>
    <fo:block> <xsl:value-of select="QUANTITY"/> </fo:block>
    </xsl:for-each>
    </xsl:for-each>
    In the above code I need split the data by ITEM_NUM/ SHIP_TO_ADDRESS_LINE1.
    I am new to xsl-fo. I tried different ways,but ship_to_address_line1 is generating wiith each quanty and need_by_date.
    Please guide me.
    Thank you
    Raju
    Edited by: subbaraju on May 7, 2009 2:36 PM

    Hi Chandra
    Thank you very much for your suggestion.
    I tried that way, I created some sample xml file, I created sample rtf file and I generated xsl-fo file. I copied the part of code into my PO_STANDARD_PO.XSL. I am getting some error.
    I noticed PO_STANDARD_PO.XSL is xsl version 1.0 and the generated sample data is with xsl version 2.0.
    The generated code is using “for-each_group”, “sum()”, “current-group()” etc. Is these functions will work in xslt 1? Or do we need to code different way?
    We are in Oracle APPS 12.0.4.
    Thank you
    Raju
    Edited by: subbaraju on May 26, 2009 11:56 AM

Maybe you are looking for