SAP UI5 export to PDF ( Fetch data dynamically )

Hello Everyone,
I am creating a utility wherein the data ( table ) would be fetched from the back end and then it would be displayed on the front end. I have follewed the approach of Chandrashekhar ( Display Smartform (PDF) in SAPUI5   ) but I want to print the internal table content dynamically.
Your help would be appreciated.

I have used jsPDF open source library and that was really very helpful. It has simple functions and easy to use API to show PDF with text and images. Please try that and I was able to integrate it in SAPUI5 app very easily.
thanks
Ashish

Similar Messages

  • Why does an InDesign document exported to PDF using data merge result in very different sized PDFs?

    I've got a small sheet that I update on occasion and use data-merge to add people's names to the sheet. It's very much like an invitation where every invite has a different name on it. I use the data merge feature to select a list of names and then they get inserted into the document. Then I use the Export to PDF command in the data merge window to create a pdf that has all of the invitations in one big file. They are four-up per page on letter sized paper. Sometimes I print 2000 of them and the resulting PDF is about 2mb, sometimes I print 1000 of them and it's 20mb. Document, settings, method of issueing the commands to output the files are all the same. The only difference is the list of names and those are all almost identical in length. Anyone know what could be happening?
    One clue is that it takes about a minute to run when the result is going to be a small file and about 5 or more minutes when the result is going to be a large file.
    My guess is that sometimes it includes a copy of the images once per page, and sometimes it only includes them once per document, but I'd love to know why and how to control that. Thanks.

    And you verified that the links panel shows everything as up-to-date?
    The only other things I can suggest at the moment are the standard two trouble shooting steps: Remove minor corruption by exporting and Replace Your Preferences

  • Send mail by attaching a pdf fetching data from tables.

    Dear Team,
    I have a requirement to send a mail by attaching a pdf.
    Step1 : Getting the data fron tables based on some logic into internal tables. [DONE]
    Step2 : Using this internal and making a pdf  [At present I am making an excel sheet, But client requires non editable well formatted pdf]
    Step3 : Attach this PDF and send it as a mail. [At present I am sending the attched excel but want to send pdf]
    Sample code used is
    **  Body of the mail
    WA_TEXT-LINE = 'Note : This is an autogenerated mail. Please do not reply to this mail.'.
          APPEND WA_TEXT TO TEXT.
          CLEAR WA_TEXT.
    *     create document from internal table with text
          DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
                          I_TYPE    = 'RAW'
                          I_TEXT    = TEXT
                          I_LENGTH  = '12'
                          I_SUBJECT = I_SUBJECT1 ).
    **  Excel Attachemnt
    ***  Preparing the xcel
    CONCATENATE 'SNO' 'Request' 'Data1' INTO WA_TEXT-LINE SEPARATED BY CON_TAB.
                CONCATENATE CON_CRET WA_TEXT-LINE  INTO WA_TEXT-LINE.
                APPEND WA_TEXT TO TEXT.
                CLEAR WA_TEXT.
    CONCATENATE WA_SNO WA_REQUEST WA_DATA1 INTO WA_TEXT-LINE SEPARATED BY CON_TAB.
                  CONCATENATE CON_CRET WA_TEXT-LINE  INTO WA_TEXT.
                  APPEND WA_TEXT TO TEXT.
                  CLEAR : WA_TEXT, TEMP_TYPE .
    *** Attaching the excel
    DATA : COUNTER TYPE I.
          DESCRIBE TABLE TEXT LINES COUNTER.
          LOOP AT TEXT INTO WA_TEXT.
            SIZE =  255 + STRLEN( WA_TEXT-LINE ) + SIZE .
          ENDLOOP.
          CALL METHOD DOCUMENT->ADD_ATTACHMENT
            EXPORTING
              I_ATTACHMENT_TYPE    = 'XLS'
              I_ATTACHMENT_SUBJECT = I_SUBJECT
              I_ATTACHMENT_SIZE    = SIZE
              I_ATT_CONTENT_TEXT   = TEXT.
    ** Semding Mail
       CALL METHOD SEND_REQUEST->SET_DOCUMENT( DOCUMENT ).
    IF REQUESTER_MAIL IS NOT INITIAL.
    *       create recipient for cc
            RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS(
              I_ADDRESS_STRING = REQUESTER_MAIL ).
    *       add recipient with its respective attributes to send request
            CALL METHOD SEND_REQUEST->ADD_RECIPIENT
              EXPORTING
                I_RECIPIENT = RECIPIENT
                I_COPY      = 'X'
                I_EXPRESS   = 'X'.
          ENDIF.
    SEND_REQUEST->SET_SEND_IMMEDIATELY('X').
    *     ---------- send document ---------------------------------------
          CALL METHOD SEND_REQUEST->SEND(
            EXPORTING
              I_WITH_ERROR_SCREEN = 'X'
            RECEIVING
              RESULT              = SENT_TO_ALL ).
          IF SENT_TO_ALL = 'X'.
            WRITE TEXT-003.
          ENDIF.
          COMMIT WORK.
    Please help me in this regard.
    Thanks in advance.
    Sai

    Hi,
    You can convert the data into spool and then pdf,
    please go through this link in this data from an internal
    table of an script or an smartform is converted into spool
    and then sended into mail,
    https://wiki.sdn.sap.com/wiki/display/sandbox/ConversionofSpoolRequestDataintoPDFandExcelFormatandSenditintoMail
    Hope it helps
    Regards
    Mansi

  • Formatting and alignment issues in Crystal Reports when exported to PDF

    Hi Experts,
    When we export the crystal reports 2013 reports to PDF we are facing issues with formatting and alignment. The columns are overlapping and also for some column's data, we are able to see only some parts of text when exported to PDF.
    Data source for these reports is EHP 7 (SAP ECC 6.0), BO 4.1, Crystal reports 2013.
    As these reports are on priority, your help and suggestions are much appreciated.
    Looking forward to hear from you guys.
    Thanks & Regards,
    Vijay.

    Hi Vijay,
    Search for the following in the search bar at the top right of SCN's page:
    ForceLargerFonts
    UsePrecisePositioningForText
    TruncationAdjustment
    All these are registry keys that you might need to apply on the machine.
    -Abhilash

  • How to Covert PDF! file format into XSTRING format in SAP UI5?

    HI All,
    I Am ABAPer. I don't have any idea on front end system.
    Can any buddy guide me how to convert PDF file into XSTRING or BINARY in SAP UI5 (either it may be XML or Script )?
    My requirement is, I have to upload file in SAP-UI5. Those file should upload in back end system (MIME repository (SAP-ECC) or  DMS).
    I have created below screen for PDF! upload in SAP-UI5.
    Below code I have written in SAP gateway system.
    * Get MIME repository information
    lr_mime_rep = cl_mime_repository_api=>if_mr_api~get_api( ).
    * Upload FILE into MIME repository.
    lr_mime_rep->put(
       EXPORTING
         i_url                     = p_path
         i_content                 = lv_content
       EXCEPTIONS
         parameter_missing         = 1
         error_occured             = 2
         cancelled                 = 3
         permission_failure        = 4
         data_inconsistency        = 5
         new_loio_already_exists   = 6
         is_folder                 = 7
         OTHERS                    = 8 ).
    Back end system required file name with extension and XSTRING(Converted PDF data).
    How to convert  PDF file into XSTRING or BINARY in SAP-UI5?
    Kindly help me on this...

    Hi Karthikeyan,
    If you have PDF internal table with you, You can follow the below method to upload into Unix directory.
        DATA:file_path TYPE char100 VALUE '/usr/sap/tmp/rep_out.PDF'.
        OPEN DATASET file_path FOR OUTPUT IN BINARY MODE.
        IF sy-subrc EQ 0.
          LOOP AT it_pdf.
            TRANSFER it_pdf TO file_path.
          ENDLOOP.
        ENDIF.
        CLOSE DATASET file_path.
    Thanks
    Venkat.O

  • Unable to fetch data in embedded Xcelsius PDF file on disconnected system

    I have an Xcelsius 2008 document with QaaWS. I am able to export it to the PDF and fetch data using QaaWS.
    I would like to know, it is possible for the embedded Xcelsius file in PDF to fetch data when the PDF file is sent to customers outside the network.
    We are using Business Objects XI 3.1, Xcelsius 2008, QaaWS, MS SQL Server 2008
    Thanks in advance.

    Hi,
    When you send the PDF file for the dashboard you have created in Xcelsius, it takes it with the data available in embeded excel.  You need not send the data separetly with the PDF.
    However, if the data changes, you need to save the dashboard again in PDF format and send it to the user community.
    Hope I answered your question.
    Regards,
    Rashmi

  • Fetching Data from SAP ECC to BODS 4.0

    HI,
    I am trying to fetch tables like LFA1 and ADRC into BODS from ECC. I am able to connect to the ECC system from BODS.
    In Data services Designer I go to Datastore and add a new datastore as SAP Applications.
    I am able to connect to ECC using this. After that when I select the datastore and select import by name i get the following error
    Data Services Designer
    Error: Cannot import the metadata table <name=LFA1>.
    RFC CallReceive error <Function Z_AW_RFC_ABAP_INSTALL_AND_RUN: RFC_ABAP_MESSAGE- SAP System has status 'not modifiable'[SAP NWRFC 711][SAP Partner 701 ][PET][hicgudb3][BOBJDS][4102]>. (BODI-1112339)
    OK  
    Can you please help me in resolving this.
    What kind of access does the user need to have for fetching data from ECC using BODS
    Thanks in advance.
    Regards
    Sudip.

    Please refer to the [documentation|http://help.sap.com/businessobject/product_guides/boexir4/en/sbo401_ds_sap_en.pdf] that discusses that in quite a lot of detail.

  • Xcelsius-Export to pdf-opens with default data

    HI All,
    We have Xcelsius dashboard pulling data from webi reports using Live Office connection.
    Data is coming from SAP BW so every time when I run the dashboard it asks for user/pw and based on that it shows me data.
    Till here everything is fine as expected. Now when I take the pdf export of this dashboards to distribute it among users it saves the data within pdf file. So when a user opens this pdf, it initially show him some set of data though he is not authorized to see that. Later it asks for user/pw based when which he can see data relevant to him.
    Am I missing something here. This is so because the requirement here is to export just the template of this dashboard without any data and let the users provide their credentials while opening the pdf so that they could see what they are authorized to see.
    Please suggest. Also let me know if you need more info.
    Thanks in advance !!
    -Chandra

    Thanks Matt for your response. Here in this dashboard we are using live office connection pointing to a webi report.
    Don't know if there is way to clear out data from excel in this case before taking export to pdf.
    And ,another thing  that I have noticed is that everytime i take export it first generates swf file and ask for user credentials and after that it export the same to a pdf.Pls let me know if I am missing some important properties here that could give me the desired result.
    -Chandra

  • Exporting pdf form data to a web server via Submit Button

    Hi
    I am working on a project where a pdf form is dynamically filled by user information. So, when the user click Print Application on the web, it will create a pdf with form data and download to the user computer.
    After that, users will have to add more data (since not all user data is captured). Then, after that I'll want user to hit the Submit button so that the filled pdf form is exported as an xml file to a folder on the web server.
    I've been looking at the forum. There is a solution where I add a submit button on the form and add a submit form action with the link to localhost since I'm trying to test it out on my local server. But I keep getting the security certificate exception. I'm using Adobe Acrobat Pro 9.0.0. , Max OS x and Firefox. My question is that is there a way for user to just click submit button and the pdf is exported as xml to the server? Does it require additional scripting language?

    HI again,
    I want to have a pdf fillable form opened on a link.Once user has entered data, the user clicks a button(or some action to invoke saving). At this point I want the filled pdf file to be saved on a certain directory.
    How can save a filled pdf form in pdf format on a certain directory?
    Is it possible to dynamically give the final pdf a name so that it doesnt overwrite everytime it saves the file?

  • IDCS6/IDCC MACOSX 10.6 and up: Inability to create tagged PDF during "Export PDF" in Data Merge

    I have a rather odd question concerning an obscure feature of InDesign but have to ask it concerning a somewhat over-engineered solution to an ongoing problem. I will try to give an abridged version but forgive me if I ramble...
    I have a solution that splits a large PDF based on bookmarks in the document. The InDesign file doesn't use bookmarks itself; but has paragraph styles that have been tagged using the expert tagging feature of the paragraph style. Once in Acrobat, I am able to make new bookmarks from structure and voila... bookmarks that were based on tags.
    For this solution to work, a checkbox in the General window of the export PDF dialog box called "Create Tagged PDF" needs to be checked
    This checkbox is normally available when exporting PDFs from InDesign. However, when attempting to export PDF from the Data Merge panel, the dialog changes.
    The parts highlighted in green I expect to change; but the red change is unexpected and for my purposes, fouls up what I'm trying to do.
    I should stress that if the data merge file is merged to one large new InDesign file, then this problem doesn't happen. However, the amount of data that I'm dealing with (tens of thousands of records) would take too much time and be double-handling.
    Is this greying out of the checkbox a glitch;  is it intentional; or am I missing something?
    Concerning alternative ways of making bookmarks from a data merged PDF:
    I have tried using manual bookmarks applied to form fields and only the actual words that were made as a bookmark appear in the PDF;
    Merging to a new InDesign file is not an option given the record lengths that I work with (from 10,000 - 100,000)
    Acrobat does have a way of automatically tagging an untagged document; however the results have been less than desirable so far.
    There are a few third party applications for Acrobat that allow dynamic bookmarks based on type in certain positions, but many of these applications are Windows based. Mac compatible PDF-SAM looks promising but have had no testimonials on whether or not tasks like mine are possible.
    Colin

    Can also confirm that too Uwe. I thought those particular issues may just have to do with using the default [High Quality Print] setting... but no, Create Acrobat Layers and Include Hyperlinks can't be done regardless of how sophisticated the options within the export Adobe PDF dialog box (during data merge) is.
    I know this is a user-to-user forum but from time to time I see Dov Isaacs on here and was hoping he may have some insight. Even if the answer still remains that it can't be done, at least I can then consider more alternatives for this uncanny and frustrating procedure.
    Colin

  • How to fetch data from a SAP BW Cube via Perl/PHP on a Linux machine?

    Hi all,
    here's the scenario:
    I need to fetch data from a cube of a remote SAP NetWeaver 7.  The data will later be used in a web application based on  Linux and  Perl/PHP. (I'd prefer using perl for the backend and doing the business logic of the web application.)
    I have:
    A Linux system with all its on-board tools and scripting languages.
    A user for the SAP BW which allows me to logon (very,very limited user rights, no se37,no se80,no rsaX and so on)
    Access to http://<SAP BW Server>:<Port>/sap/bw/xml/soap/xmla with the above mentioned user.
    My questions:
    - Could you please push me into the right direction how I can realize this? E.g. by pointing to tutorials / HowTos / sample code / CPAN modules etc..  (Most information I found so far referred to software based on a different operating system and on remote function calls using custom functions.)
    - I'm aware of the  SAPNW::RFC CPAN module, but do I necessarily have to perform a remote function call? ( If so, is there a "standard" function I could call for accessing a cube?)
    Thanks a lot in advance!

    You can take through the RFCS .check for some system function modules...but why do you need to route it through XI?How huge z the files?

  • Export to PDF from Infoview does not show correct data - CRS 2008

    I have a problem where users attempt to export a report from the Infoview interface to a PDF.  The report shows correctly in Infoview while in Crystal Reports format, but when the use exports the data, the data changes and shows different values.  To troubleshoot, I have tried this on different clients - without a change in the result.  I have also pulled the latest instance of the report from this history on the Central Management Console.  Interestingly enough, the same thing happens when I export to a PDF from there as well.  Any insight or help would be greatly appreciated.  Thanks!

    Hello,
    I can't tell you offhand on what the issue is here, as various factors come into play.
    Here are a few troubleshooting steps you can try:
    - Try opening the report in Crystal Report designer and export to pdf from there. Does this work?
    - Instead of viewing the report and export; schedule a report to PDF and check the results.
    - there is currently a know issue in regards of certain formulas and using font type "arial Unicode MS" that gives incorrect export to pdf. Maybe alter the font used.. or see if you take out any questionable formulas and try again to export.
    Regards,
    Duncan

  • Error when exporting a pdf in SAP

    She sends me the error when exporting a pdf from the SAP system, this is the message:
    X Object reference not set to an instance of an object.
    I hope I can support.
    Annex image

    See your other thread.

  • Fetch data from table(ET_) which is exporting parameter of function module

    Hi,
    I m new to ABAP programming.
    I have to develop a smartform that has to be filled in with fields from few tables.
    These tables have the naming convention ET_<XXX> (i.e. exporting parameter of function module).
    I m not able to directly view its contents in se11 or use select query for it.
    I have a report program which i can execute to view these parameter names.
    Now, how do i fetch data from these parameters/tables and pass it from my driver program to smartform??
    Someone pls guide me...
    Thank You.

    Hi,
    I have done that using Field-Symbols.
    Thanks,
    Preetha

  • Exporting to PDF from browser is showing junk data

    Hi Ted,
    I am using cross tab in my report and when value 2 has to be displayed for a column, i have to show 'Tick' mark. It is displaying properly when i use <font face="Bookshelf Symbol 7">p</font>. It is showing tick mark. Even when i export directly from Crystal Reports software it is exporting properly. After integration with Java and export to PDF, i am getting junk data for tick mark (it is showing a dot in place of tick mark).
    Could you please let me know how i can resolve this.
    Edited by: Kishore  Manthangod on Jun 27, 2008 3:05 PM

    Thanks for detailed explanation Merry.
    I have to use this so many times and i have to use this in the cross tab where i was unable to embed images.
    Here is my formula:
    if {PerformanceSnapshot.LEVELSCOREID}=1 then
    else if {PerformanceSnapshot.LEVELSCOREID}=2 then
    'tick mark should come here'
    else if {PerformanceSnapshot.LEVELSCOREID}=3 then
    '+'
    else if {PerformanceSnapshot.LEVELSCOREID} =4 then
    else '  '
    And i am using LEVELSCOREID in the cross-tab. Can you please tell me how could i embed image in cross tab.
    Please help me?
    -Kishore

Maybe you are looking for