How to handle empty PDF document when using Sections

I have below XML structure
<?xml version="1.0" encoding="UTF-8"?>
<DATA>
<LIST_INVOICES>
<INVOICES>
<INVOICE_NUMBER>30363</INVOICE_NUMBER>
<INVOICE_DATE>2009-02-24T00:00:00.000-05:00</INVOICE_DATE>
<INVOICE_COMMENTS/>
<LIST_HEADERINFO>
<HEADERINFO>
<OUR_REFERENCE>12146</OUR_REFERENCE>
<CUSTOMERNAME>ABC</CUSTOMERNAME>
<CONTROLKEY>FREE</CONTROLKEY>
<COUNTRY>TEST</COUNTRY>
<YOUR_REFERENCE/>
<ACCOUNTNUM>2997</ACCOUNTNUM>
</HEADERINFO>
</LIST_HEADERINFO>
</INVOICES>
<INVOICES>
<INVOICE_NUMBER>30363</INVOICE_NUMBER>
<INVOICE_DATE>2009-02-24T00:00:00.000-05:00</INVOICE_DATE>
<INVOICE_COMMENTS/>
<LIST_HEADERINFO>
<HEADERINFO>
<OUR_REFERENCE>12146</OUR_REFERENCE>
<CUSTOMERNAME>ABC</CUSTOMERNAME>
<CONTROLKEY>FREE</CONTROLKEY>
<COUNTRY>TEST</COUNTRY>
<YOUR_REFERENCE/>
<ACCOUNTNUM>2997</ACCOUNTNUM>
</HEADERINFO>
</LIST_HEADERINFO>
</INVOICES>
</LIST_INVOICES>
</DATA>
I am using below loop to generate different sections
<?for-each @section INVOICES?>
<?end for-each?>
It works great when I have some data.
For some reason if there is no data generated then I get an error message saying that document not found.
Can someone suggest what should i put here so that if data is not coming then print 'No Data Found'
I looked at Tim's blog but that does not help and I am still getting the same error.
Below is XML generate when no data found
DATA>
<LIST_INVOICES />
</DATA>
Please advise.

Vetsrini
I do have the latest one. But it the kind of template I am using it has last-page tag and some templates defined in it.
That might be reason it is not taking the if condition for Section break. I can send my document to you if you provide me ur email address.....

Similar Messages

  • I really need someone to help me. I have been trying to figure out how to select a PDF document to convert to a Word doc. When I go to select a PDF file, all that shows up is the WORD docs. does not show ANY of my PDF files... Please help me figure out wh

    I really need someone to help me. I have been trying to figure out how to select a PDF document to convert to a Word doc. When I go to select a PDF file, all that shows up is the WORD docs. does not show ANY of my PDF files... Please help me figure out what is going on? We have it set on auto renewal so I know its not that we haven't renewed this subscription, because we pay automatically.

    Hi olivias,
    It sounds like there may be some confusion on your system about what application should be associated with PDF files. You can reset filename associations by following the steps in these articles (depending on your operating system):
    How to change the default application for a file type | Macworld
    http://windows.microsoft.com/en-us/windows/change-default-programs#1TC=windows-7
    Please let us know if you have additional questions.
    Best,
    Sara

  • I have file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Ac

    I have pdf file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Acrobat X Pro and Windows -7 platform.

    Yes, I just want to cover up all the pages for those particular area of document numbers.
    Nothing sensitive about it. I just want to show the correct document numbers on all pages in print out.
    So, I wanted to cover up by comments, but commenting on each page will be difficult. So, I wanted to comment the same on all pages.

  • How can I rotate a PDF document when viewing in adobe reader?

    How can I rotate a PDF document when iewing in adobe reader?

    That hardware button can actually be toggled to work either as a mute button, or a lock orientation button. This can be edited at the settings screen.

  • How to put a check mark in a PDF document, if using an iPad 2

    How to put an check mark in a PDF document, if using an iPad 2?

    You need to implement below logic:
    1. check if field_date = sy-datum. in this case do nothing.
    2. else . move sy-datum to field_date .
    3. modify your internal table with field_date .
    4. populate final table to database table .
    hope you get it.

  • How to handle empty file using sftp adapter

    Hi,
    Please explain me how to handle empty files in sftp adapter.
    Thanks,
    Enivass

    Hi Enivaas,
                        I don't have the seeburger sftp adapter at hand at the moment, but asfar as I remember, this does not specifically have an empty-file handling option like the standard ftp adapter.
    So to stop emtyp files from being written, guess would need to handle this at the mapping level. For example, check for target creation criteria in the header node in mapping. If the creation criteria is not met, you can throw an error in mapping.
    You may also incorporate this condition in your Receiver determination. In this case, if the condition is not satisfied, no receiver is determined in PI.
    Regards

  • Firefox 33 doesn't display a pdf file when using the response object

    Firefox 33.0.2 does not display pdf files when using the code below from an asp.net program, which works for previous versions of Firefox, and also works with IE. I'm using the built-in pdf viewer. All of my plugins are disabled.
    Dim strPDF As String
    strPDF = Session("filname") 'pdf filename
    Response.Clear()
    Response.ClearHeaders()
    Response.Buffer = True
    Response.ContentType = "application/pdf"
    Response.CacheControl = "Private"
    Response.AddHeader("Pragma", "no-cache")
    Response.AddHeader("Expires", "0")
    Response.AddHeader("Cache-Control", "no-store, no-cache, must-revalidate")
    Response.AddHeader("Content-Disposition", "inline; filename=" + strPDF)
    Response.WriteFile(strPDF)
    Response.Flush()
    Response.Close()
    Response.Clear()
    Response.End()
    Session("filname") = ""

    Thanks cor-el. You pointed me in the right direction. It appears to me that a reported Firefox 33 bug with the handling of compression (Transfer-Encoding: chunked) is the culprit (https://support.mozilla.org/en-US/questions/1026743). I was able to find a work-around by specifying the file size and buffering. Below is my code, with some code from http://www.codeproject.com/Questions/440054/How-to-Open-any-file-in-new-browser-tab-using-ASP.
    Dim strPDF As String
    strPDF = Session("filname") 'pdf filename
    Dim User As New WebClient()
    Dim FileBuffer As [Byte]() = User.DownloadData(strPDF)
    If Not (FileBuffer Is Nothing) Then
    Response.Clear()
    Response.ClearHeaders()
    Response.CacheControl = "Private"
    Response.AddHeader("Pragma", "no-cache")
    Response.AddHeader("Expires", "0")
    Response.AddHeader("Cache-Control", "no-store, no-cache, must-revalidate")
    Response.ContentType = "application/pdf"
    Response.AddHeader("content-length", FileBuffer.Length.ToString())
    Response.BinaryWrite(FileBuffer)
    Response.Flush()
    Response.Close()
    Response.Clear()
    Response.End()
    End If
    Session("filname") = ""

  • How to attach a PDF document to work item .---urgent

    Hi EXperts ,
      I am wanted to know how to attach a PDF document to my work item which i will be geneating . Pls let me the Method coding to be done so that I can send the attachment also when the work item is generated ..
    What is need to pass to Workflow container ...
    Regards
    Abhilash

    Ah ok,
    then the only way I know is to get hold of some one with skills in Smart Forms, and alley up with them. Or better yet, use it as an excuse to learn to do it your self
    With a Smart Form, you can parse data into it, create the file, and then use the GOS functionality to attatch it to your BO. All this in back ground!
    Kind regards
    Mikkel

  • How to reduce a PDF document that contains an Adobe XML form?

    Hi,
    I have created some fillable PDF files using Adobe LiveCycle Designer and used Adobe Acrobat Pro XI to save it as Reader Extended PDF > Enable More Tools (includes form fill-in and save)…
    The form includes image, text field, check box, radio button, table and other controls, as well as java scripts behind. The files are from 1 to 3 MB in size. I tried Reduced Size PDF and Optimized PDF, but I got a message: “This PDF document contains an Adobe XML form. Such files cannot be optimized.”
    My questions are:
    Is there a way I can reduce the file greatly, say about 100 KB?
    And after the size reduced,  does it still keep the original quality in format and function?
    Thanks

    Hi,
    if you only use default fonts like Arial or Myriad don't embed fonts into the form at all.
    If you have to use a specific font because of corporate identity you should check if there are fields in your fom using other fonts like Arial.
    Especially floating fields are a reason for big files as they use Designers default font even if you'll never see it in the PDF.
    When using images, you should not check the "embed" checkbox, as this will save the images a base64-stream into the xml-source.
    If unchecked the images are stored as hex-stream in the PDF-stream which cause a smaller file size.
    Also, don't use high res images, 150dpi are far enough. You also don't need 16Bit depth as Designer only supports 8Bit images with RGB colors.

  • How to handle system errors in XI using BPM? please help!

    Hi Experts,
         I have a requirement where I have to handle system errors. For example when I am making RFC call using RFC adapter if the remote destination is down then I have create a understandable error message and store it in another SAP table.
    How to handle it? I am using BPM. I can see that there is "Exceptions" in the send step. How to use this?
    Thanks
    Gopal

    Hi Gopalkrishna,
    In this case whenever you get Mapping Exception , you can raise an Exception with the help of BPM and you can send the status to the RFC. But with the help of BPM.
    For a Simple case refer:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/33/4a773f12f14a18e10000000a114084/frameset.htm
    If you want you can do it without a BPM
    and throw an exception in case any of the values is missing:
    have a look at this weblog on how to throw exceptions
    in a nice way:
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    Also just go through <a href="/people/sap.user72/blog/2005/02/23/raising-exceptions-in-sap-xi-mapping Exceptions in SAP XI Mapping</a> and see if it helps you solve the problem.
    Also go through these links:
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7f2243d711d1893e0000e8323c4f/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/68/253239bd1fa74ee10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/f2bbc8142c11d3b93a0000e8353423/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/5d/2166e6a91d11d188de0000e8216438/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/05/bb223905b61b0ae10000000a11402f/content.htm
    Please do let know if it helped.
    Regards,
    Abhy

  • How to SaveAs a pdf document?

    How to SaveAs a pdf document via javascripting using "Acrobat 8.0"? Kindly advise me with examples.
    Thanks

    Look at the method saveAs in the Acrobat Javascript API Reference.

  • How I can send pdf document  file in I pad

    How I can send pdf Document file in I Pad

    A simple and popular way to copy files and share files amoung your devices.
    https://www.dropbox.com/
    Using iTures to transfer files:
    http://support.apple.com/kb/HT4094?viewlocale=en_US&locale=en_US
    Files Connect -- The swiss army knife of remote file connect
    https://itunes.apple.com/us/app/files-connect/id404324302?mt=8
    Windows File server
    http://itunes.apple.com/us/app/filebrowser-access-files-on/id364738545?mt=8

  • How to include several PDF documents into just one file?

    I have a Word document with 6 pages that I saved in PDF.
    I wanted to transform the entire document in JPEG (JPG) immage, so that I could use it in other tools, such as Facebook for example.
    The problem is that using Adobe Photoshop it opens and saves page by page.
    Can you give me s solution or hint?
    Flavio
    [email protected]

    Thank you!
    I already saved all pages as .pdf w/ Acrobat and have all 6 pages saved in
    .jpg, using Photoshop.
    Problem is that I want to post the whole text in my Facebook page, and to
    have it in six pieces is not quite readable...
    Thanks anyway and have a joyful Xmas!
    2011/12/24 try67 <[email protected]>
       Re: How to include several PDF documents into just one file?  created
    by try67 <http://forums.adobe.com/people/try67> in Adobe Reader - View
    the full discussion <http://forums.adobe.com/message/4102594#4102594>

  • SAP PS Extractors requirement for BI + how v can do  pdf document?

    SAP PS Extractors requirement for BI + how v can extract pdf document?  
    Posted: Mar 12, 2008 6:04 PM     Edit      E-mail this message      Reply 
    Hi Experts
    Please anyone provide the answers for the followings:
    1)SAP PS available extractors currently.
    2)How we can extract pdf document in SAP PS to SAP BI side ... or any other possibilites is available to
    bring it in reporting?
    3)Is it compulsory to use 0PSGUID or not?
    pls advice me experts...
    Regards
    selvan
    [email protected]

    Hi Peras,
    Pls chk this links;
    http://help.sap.com/bp_biv335/BI_EN/html/BW/ProjSystem.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/b4/60073c0057f057e10000000a114084/frameset.htm
    hope this helps.
    Regards
    CSM Reddy

  • SAP PS Extractors requirement for BI + how v can extract pdf document?

    Hi Experts
    Please anyone provide the answers for the followings:
    1)SAP PS available extractors currently.
    2)How we can extract pdf document in SAP PS to SAP BI side ... or any other possibilites is available to
       bring it in reporting?
    3)Is it compulsory to use 0PSGUID or not?
    pls advice me experts...
    Regards
    selvan
    [email protected]

    Hi Peras,
    Pls chk this links;
    http://help.sap.com/bp_biv335/BI_EN/html/BW/ProjSystem.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/b4/60073c0057f057e10000000a114084/frameset.htm
    hope this helps.
    Regards
    CSM Reddy

Maybe you are looking for

  • How to play multiple CDs from Music list

    This may sound really dumb, but I can't figure out how to play multiple albums in the latest iTunes.  I have to drag them over to a Playlist then check all the individual songs.  Is there a way to gang up multiple albums and get them onto Up Next by

  • 1st negative date

    Post Author: mbunschoten CA Forum: Formula I have a column that holds a running balance by day of materials available. It sometimes happens that this balance goes negative on a certain day. What I want to do is pull only the date when it first went n

  • SQL query problem with sorting

    Hi, I have question regarding sql query . Right now I am getting the results like this if i use this sql query select ID,Name,Desc,Priority from emp order by Priority ; Priority is varchar field. I don't want to change the Priority field and cannot a

  • PowerPoint: Creating a custom "Predefined style" for charts

    I'm working on a presentation template where I have made some styling for the chats. I would like to reuse this styling on other charts. I know that there is a "Chart template"-feature but I would like to add the style to the "Predefined templates"-p

  • Error when CREATE TABLE

    Hi, I'm trying to create the following table SQL>  CREATE TABLE T_IMP (   2      C_ID VARCHAR2(16 BYTE) NOT NULL ENABLE,   3      I_ID VARCHAR2(50 BYTE) NOT NULL ENABLE,   4      POWER NUMBER(*,0) DEFAULT 0,   5      HRS NUMBER(*,0) DEFAULT 0,   6