Create an outbound flat file .txt file from SAP to UAPM.

How to Create an outbound flat file .txt file from SAP to UAPM (Unicenter Asset Portfolio Management).

What do u want in flat file and what is your doubt please let me know as iam working i can help u

Similar Messages

  • Issue in creating Credit Note for road carrier invoice from SAP TM system

    Dear All,
    I am facing issue in creating Credit Note for road carrier invoice from SAP TM system.
    The following steps I have performed:
    1)  
    1)    1) Create Freight order with Amount 20,100
    2)     2) Create Freight Settlement Doc and send it to ECC. Hence PO and SES will be created in ECC with Amount 20,100
    3)     3) Invoice verification (MIRO) done w.r.t. FO in ECC with Amount 20,100 and following entries posted :
    Carrier A/c - 20,100Cr
    GR/IR A/c – 20,100 Dr
    4)    4) Created Credit Note in SAP TM against freight order with Amount 1,010 and transfer it to SAP ECC.
    5)    5)  By this a new PO and SES was created with negative values (with amount 1,010) in SAP ECC
    6)    6)  In transaction MIRO, Credit Memo was created against the freight order.
    7)    7)  By this it is showing value 21,110 by adding the line items of Original Purchase Order and Credit Note Purchase Order as 20,100 and 1,010 respectively.
    8)    8)  By posting this following are the accounting entries which is not correct:
    Carrier A/c – 21,110 Dr
    GR/IR – 20,100 Cr
    GR/IR – 1,010 Cr
    9)    9)  In report FBL1N which is showing the remaining liability of value 1,010(21,100 – 20,100) instead of 19,090 (20,100-1,010=19,090) for the carrier.
    Please suggest how to resolve the issue and get the correct accounting for credit memo?
    Regards,
    Vibhu Gupta

    Hello,
    Like my reply in Linkedin group, I got the same issue and solved with BADI in TM side(REQREQ...).
    Regards, Marcelo Lauria

  • How to convert from SQL Server table to Flat file (txt file)

    I need To ask question how convert from SQL Server table to Flat file txt file

    Hi
    1. Import/Export wizened
    2. Bcp utility
    3. SSIS 
    1.Import/Export Wizard
    First and very manual technique is the import wizard.  This is great for ad-hoc and just to slam it in tasks.
    In SSMS right click the database you want to import into.  Scroll to Tasks and select Import Data…
    For the data source we want out zips.txt file.  Browse for it and select it.  You should notice the wizard tries to fill in the blanks for you.  One key thing here with this file I picked is there are “ “ qualifiers.  So we need to make
    sure we add “ into the text qualifier field.   The wizard will not do this for you.
    Go through the remaining pages to view everything.  No further changes should be needed though
    Hit next after checking the pages out and select your destination.  This in our case will be DBA.dbo.zips.
    Following the destination step, go into the edit mappings section to ensure we look good on the types and counts.
    Hit next and then finish.  Once completed you will see the count of rows transferred and the success or failure rate
    Import wizard completed and you have the data!
    bcp utility
    Method two is bcp with a format file http://msdn.microsoft.com/en-us/library/ms162802.aspx
    This is probably going to win for speed on most occasions but is limited to the formatting of the file being imported.  For this file it actually works well with a small format file to show the contents and mappings to SQL Server.
    To create a format file all we really need is the type and the count of columns for the most basic files.  In our case the qualifier makes it a bit difficult but there is a trick to ignoring them.  The trick is to basically throw a field into the
    format file that will reference it but basically ignore it in the import process.
    Given that our format file in this case would appear like this
    9.0
    9
    1 SQLCHAR 0 0 """ 0 dummy1 ""
    2 SQLCHAR 0 50 "","" 1 Field1 ""
    3 SQLCHAR 0 50 "","" 2 Field2 ""
    4 SQLCHAR 0 50 "","" 3 Field3 ""
    5 SQLCHAR 0 50 ""," 4 Field4 ""
    6 SQLCHAR 0 50 "," 5 Field5 ""
    7 SQLCHAR 0 50 "," 6 Field6 ""
    8 SQLCHAR 0 50 "," 7 Field7 ""
    9 SQLCHAR 0 50 "n" 8 Field8 ""
    The bcp call would be as follows
    C:Program FilesMicrosoft SQL Server90ToolsBinn>bcp DBA..zips in “C:zips.txt” -f “c:zip_format_file.txt” -S LKFW0133 -T
    Given a successful run you should see this in command prompt after executing the statement
    Starting copy...
    1000 rows sent to SQL Server. Total sent: 1000
    1000 rows sent to SQL Server. Total sent: 2000
    1000 rows sent to SQL Server. Total sent: 3000
    1000 rows sent to SQL Server. Total sent: 4000
    1000 rows sent to SQL Server. Total sent: 5000
    1000 rows sent to SQL Server. Total sent: 6000
    1000 rows sent to SQL Server. Total sent: 7000
    1000 rows sent to SQL Server. Total sent: 8000
    1000 rows sent to SQL Server. Total sent: 9000
    1000 rows sent to SQL Server. Total sent: 10000
    1000 rows sent to SQL Server. Total sent: 11000
    1000 rows sent to SQL Server. Total sent: 12000
    1000 rows sent to SQL Server. Total sent: 13000
    1000 rows sent to SQL Server. Total sent: 14000
    1000 rows sent to SQL Server. Total sent: 15000
    1000 rows sent to SQL Server. Total sent: 16000
    1000 rows sent to SQL Server. Total sent: 17000
    1000 rows sent to SQL Server. Total sent: 18000
    1000 rows sent to SQL Server. Total sent: 19000
    1000 rows sent to SQL Server. Total sent: 20000
    1000 rows sent to SQL Server. Total sent: 21000
    1000 rows sent to SQL Server. Total sent: 22000
    1000 rows sent to SQL Server. Total sent: 23000
    1000 rows sent to SQL Server. Total sent: 24000
    1000 rows sent to SQL Server. Total sent: 25000
    1000 rows sent to SQL Server. Total sent: 26000
    1000 rows sent to SQL Server. Total sent: 27000
    1000 rows sent to SQL Server. Total sent: 28000
    1000 rows sent to SQL Server. Total sent: 29000
    bcp import completed!
    BULK INSERT
    Next, we have BULK INSERT given the same format file from bcp
    CREATE TABLE zips (
    Col1 nvarchar(50),
    Col2 nvarchar(50),
    Col3 nvarchar(50),
    Col4 nvarchar(50),
    Col5 nvarchar(50),
    Col6 nvarchar(50),
    Col7 nvarchar(50),
    Col8 nvarchar(50)
    GO
    INSERT INTO zips
    SELECT *
    FROM OPENROWSET(BULK 'C:Documents and SettingstkruegerMy Documentsblogcenzuszipcodeszips.txt',
    FORMATFILE='C:Documents and SettingstkruegerMy Documentsblogzip_format_file.txt'
    ) as t1 ;
    GO
    That was simple enough given the work on the format file that we already did.  Bulk insert isn’t as fast as bcp but gives you some freedom from within TSQL and SSMS to add functionality to the import.
    SSIS
    Next is my favorite playground in SSIS
    We can do many methods in SSIS to get data from point A, to point B.  I’ll show you data flow task and the SSIS version of BULK INSERT
    First create a new integrated services project.
    Create a new flat file connection by right clicking the connection managers area.  This will be used in both methods
    Bulk insert
    You can use format file here as well which is beneficial to moving methods around.  This essentially is calling the same processes with format file usage.  Drag over a bulk insert task and double click it to go into the editor.
    Fill in the information starting with connection.  This will populate much as the wizard did.
    Example of format file usage
    Or specify your own details
    Execute this and again, we have some data
    Data Flow method
    Bring over a data flow task and double click it to go into the data flow tab.
    Bring over a flat file source and SQL Server destination.  Edit the flat file source to use the connection manager “The file” we already created.  Connect the two once they are there
    Double click the SQL Server Destination task to open the editor.  Enter in the connection manager information and select the table to import into.
    Go into the mappings and connect the dots per say
    Typical issue of type conversions is Unicode to non-unicode.
    We fix this with a Data conversion or explicit conversion in the editor.  Data conversion tasks are usually the route I take.  Drag over a data conversation task and place it between the connection from the flat file source to the SQL Server destination.
    New look in the mappings
    And after execution…
    SqlBulkCopy Method
    Sense we’re in the SSIS package we can use that awesome “script task” to show SlqBulkCopy.  Not only fast but also handy for those really “unique” file formats we receive so often
    Bring over a script task into the control flow
    Double click the task and go to the script page.  Click the Design script to open up the code behind
    Ref.
    Ahsan Kabir Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread. http://www.aktechforum.blogspot.com/

  • Create hyperlink to text in .txt file

    I purchased a template for my company website.  I am editing the text (headers, body, etc) in the .txt file (template creator's directions to do this).  I now need to make some of that text in the .txt file a hyperlink (one to a pdf document on my server and several to external websites).  When I highlight the text in the .txt file, I am not given the option to create a hyperlink.  Obviously, when I try to create a hyperlink in the code, I can.  The problem is that the desired text is only contained in the .txt file.
    What can I do?  Am I prevented from using text because all of the text is in the .txt file?
    Thank you in advance!!!!!

    1) Open yourfilename.txt. 
    2) SaveAs yourfilename.html
    3) This will give you an HTML document you can work with in Design View (albeit an un-styled one).
    Add your links to the page.  Ctrl+S to save.
    4) SaveAs yourfilename.txt.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Strange question mark error while opening pdf files in adobereader from SAP

    Hi Gurus
    We are having a strange intermittent problem with Adobe Reader. When we try to open PDF files from SAP Frontend we get an error pop-up. The pop-up does not have any text. The title of the pop-up has "Adobe Reader". There is a blue question mark and an OK button.
    This issue occurs few times a day
    This issue does not occur in Windows XP.
    Since past few weeks, we have been trying to find some error/warning/atleast some text in log files of SAP, OS, Adobe Reader, Registry entries, Event Viewer. So far, we have not found anything.
    SAP is not able to help as this issue occurs intermittently and said when they tried, the issue did not occur. They made two attempts and in each attempt they tried 10 times to reproduce the issue. This issue occurs intermittently.
    Environment
    SAP R/3 4.7 EE SAP_Basis 620 Support Package 61
    Windows Vista Enterprise
    Adobe Reader 9.0 and Adobe Reader 9.1 (tried with both versions)
    SAPGUI 710 Patch 12 (latest patch). It also occured in Patch 11. 
    Please suggest
    Thank you
    Pavan

    Thank you for the quick reply.
    We tried many notes from Service Market Place. Also, Windows Team is in contact with Adobe.
    As per Adobe's suggestions, we tried changing preferences of Adobe Reader. We think it might be a problem with SAP Frontend.
    Present status - Issue still exists. nothing works.
    Thank you

  • Creating Proxy Classes in Visual Studio 2010 from SAP ES

    I am having problems with Microsoft's Visual Studio 2010 creaating a proxy class when importing a WSDL file from SAP's Enterprise Services.  
    When attempting to define the proxy class by pointing it to the endpoint WSDL, the import seems to work OK but the proxy class is not created.    I don't have this problem with other WSDL's from non-SAP sources.   There seems to be something "special" about the ES endpoint WSDL.
    Is anyone else having this problem?

    not always the 18th. For me it is the 14th. I think it is because I have  some buttons hidden already. But seems like it is always the last one.
      // The SAP Crystal Report logo is the last item on the 4th control.
    System.Windows.Forms.ToolStrip oToolStrip = (System.Windows.Forms.ToolStrip)crystalReportViewer.Controls[4];
                    oToolStrip.Items[oToolStrip.Items.Count-1].Visible = false;

  • Download excel file to pc from sap

    Hi Experts,
    My requirement is After running the load program, if there are any errors with any of the records in Excel file, create an error file in Excel format and download to the selected file location.  Give an information message to the user if the load was successful or any error file was generated. A output of the report should show how many records were created and a kick out list of those with error.
    Thanks in Advance.
    Moderator message : Spec dumping is not allowed, search for available information. Thread locked.
    Edited by: Vinod Kumar on Sep 19, 2011 9:25 AM

    Hi,
    get error records into an internal table and pass that internal table to function module
    CALL FUNCTION 'GUI_DOWNLOAD'

  • Open word file in desktop from SAP

    Halo ,
    I have a requirement in which I have got a word file in my desktop . I have the location path . Is there any FM in which I can give this Path so that it opens up the word file by itself.
    Moreover is there any way to execute the file in the application server.
    Regards
    Arshad

    Hello,
    You can use GUI_RUN for desktop. provide the file path in command parameter and execute it to invoke the file on desktop.
    Also, you can use WS_EXECUTE to open file on application server.
    " For desktop:
    CALL FUNCTION 'GUI_RUN'
      EXPORTING
        COMMAND          =
    *   PARAMETER        =
    *   CD               =
    * IMPORTING
    *   RETURNCODE       =
    *For application server:
    CALL FUNCTION 'WS_EXECUTE'
    * EXPORTING
    *   DOCUMENT                 = ' '
    *   CD                       = ' '
    *   COMMANDLINE              = ' '
    *   INFORM                   = ' '
    *   PROGRAM                  = ' '
    *   STAT                     = ' '
    *   WINID                    = ' '
    *   OSMAC_SCRIPT             = ' '
    *   OSMAC_CREATOR            = ' '
    *   WIN16_EXT                = ' '
    *   EXEC_RC                  = ' '
    * IMPORTING
    *   RBUFF                    =
    * EXCEPTIONS
    *   FRONTEND_ERROR           = 1
    *   NO_BATCH                 = 2
    *   PROG_NOT_FOUND           = 3
    *   ILLEGAL_OPTION           = 4
    *   GUI_REFUSE_EXECUTE       = 5
    *   OTHERS                   = 6
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Both the function modules are obsolute!
    Also, check for there alternatives.
    Thanks,
    Augustin.

  • Send a File(Report Output) From Sap as an Email

    Hi,
    Appreciate if someone can point me to a direction of finding a Function, which can email the File residing on the Application Server or  Presentation Server.
    Exact Requirement:
    We have some  (.dat) files on the Unix Application Server Folder and we want the ability to email these files in excel format.
    Thanks,
    Vasu

    Hi Sastry,
    I have explored this option of reading the data into Internal Table and handle the Descriptions field and then send via SO_NEW_DOCUMENT_ATT_SEND_API1.
    I am looking for a better and if any easy option available where i dont have to handle any string operations.

  • How to open and edit "*.txt" file with "Notepad"

    Hello guys!
    I'm facing problem with SharePoint 2010 Enterprise and got no clue how to solve it.
    What I want to do is to open "*.txt" (which is placed to "Documents Library") in "Notepad", so I could edit it and save (publish) directly to SharePoint from "Notepad".
    If I upload any Microsoft office File, such as "*.docx", "*.xls", etc - it works as it should - document opens in appropriate application and everybody is happy.
    But, when I create documents library, put some "*.txt" file there and click on it - it opens in new browser's tab as text, so I cannot edit the file.
    What I tried to do is to activate feature "Open Documents in Client Applications by Default" - not happy.
    Edit "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML\DOCICON.XML" - I've modified "txt" entry as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <DocIcons>
        <ByProgID>
        </ByProgID>
        <ByExtension>
    <Mapping Key="txt" Value="ictxt.gif" EditText="Notepad" OpenControl="SharePoint.OpenDocuments"/>
        </ByExtension>
        <Default>
            <Mapping Value="icgen.gif"/>
        </Default>
    </DocIcons>
    Still not happy.
    So, how do I make this stuff work?

    Found this link which has more information on this scenario:
    http://sharepoint.stackexchange.com/questions/1427/open-txt-file-in-notepad-from-sharepoint
    A programmatic workaround:
    http://weblogs.asp.net/bsimser/archive/2005/01/24/359911.aspx
    Andrew Milsark, MCITP,MCTS
    Fpweb.net - The SharePoint Hosting Pioneer
    Blog : http://blog.fpweb.net
    Twitter : http://www.twitter.com/amilsark

  • Updated record should come in txt file

    Hi Friends,
    My requirements like this way, any changes make in mara, mard, mbew, makt, vbak, vbap, vbrk and abrp table. that newly created data should come in .txt file of application server.
    I have already developed a program for that. it is downloading data in every 3 hours slots. it is running in background. whatever changes made during these hours it will download.
    now, my requirement has been changed, instance data should come in .txt file of app server. e.g. when newly created record save in database table, same time that record should come in .txt file with proper format.
    is it possible? please let me know.
    Thanks in advance,
    Parag

    Hi Parag,
    To obtain changes you know you can get the details from the tables CDHDR and CDPOS.
    Also you have questions about performance and so. SO here are some details.
    - When you flag a data element for change document (is checked) it is ONLY a marker that allows for registration of this field's changes into CDHDR and CDPOS. The actual control is done on datafile level in its technical settings (Transaction SE11 with datafile name and then push button "Technical Settings" or CtrlShiftF9). Herein you will find a flag "Log data changes".
    Within the CDHDR file and CDPOS file a field OBJECTCLAS is used. Only for existing OBJECTCLAS values the changes are logged.
    - Now obvious this is the trick for standard SAP (as Subramanian has already pointed out you can find "OBJECTCLAS" values with transaction SCDO). If you want to know on how to create your own "OBJECTCLAS" values with working logging on your own designed fields follow Subramanian suggestion and read the documentation.
    Now to your questions:
    You gave some tables you need to track changes (and now also for initial creation) like MARA, MARD, MAKT and others.
    To get changes for these tables use the following "OBJECTCLAS" values:
    - MATERIAL (Tables MARA, MARC, MARD, MBEW, MFHM, MLGN, MLGT, MPGD, MPOP and MVKE). By-the-way, this object will be replaced by MATERIAL_N  (available from release 4.6x).
    - VERKBELEG (Tables VBAK, VBAP, VBEP, VBKD, VBLB, VBPA, VBPA2 and VBUK).
    To collect changes (suggested by Andreas) you could use function module CHANGEDOCUMENT_READ. This is very usefull if also archiving is active for the objects you need to track changes for and your changes are scattered through time, but for your problem it is better to approach the log data directly.
    1. First select the main change documents from CDHDR table for a given "OBJECTCLAS" and "OBJECTID". Here you can use additional filtering on DATE (field UDATE) and TIME (field (UTIME). Even filtering on a specific transaction is possible (field TCODE).
    This gives you a number of change documents (field CHANGENR).
    2a. Secondly select the specific field changes from table CDPOS by using the found fields from CDHDR and additionally fill TABNAME with the specific table and if required FNAME with the specific field name. 2b. Since in your case the values will not be known, you need to track changes, you have to be very carefull in your selections. If you track the object MATERIAL or MATERIAL_N, you best loop over the MARA table and for each MATNR fill the OBJECTID field of CDHDR with this MATNR value.
    3. In order to find NEWLY created items you need to check the CHANGE_IND flag. When 'I' it is an new insert, when 'U' it is an update. Now this rule applies ONLY to key fields, since SAP first creates the key record (CHANGE_IND = 'I') and then the other fields (CHANGE_IND = 'U').
    Finally the warning given by Andreas (runtime increases - you MUST select with OBJECTCLAS and OBJECTID) is very important. Not supplying OBJECTID will have a very heavy impact on the runtime.
    Hope this gives you some clues on how to approach your problem.
    Regards,
    Rob.

  • Enquiry on converting a *.txt file to a *.pdf file

    Enquiry on converting a *.txt file to a *.pdf file
    Aim of this software: Let the user to choose a *.txt file to convert it to a *.pdf file.
    1. User clicks a choose file button. [chooseFileButton]
    2. User clicks the Export 2 button [exportButton2]
    3. User clicks the Text -> PDF button [pdfConverterButton]
    After choosing the file and click the choose file button:
    System prints out (for debbuging use...)
    ---------------------------Print from Trans.java - method transMemory--------------------
    File's name: file.txt
    File's path: C:\Users\charles\Desktop\netbean\Pdfproject1\file.txt
    After clicking the Export 2 button, system prints out:
    ---------------Print out the File's name - from DataOut.java - getData() Method-------------------------
    File's Name: file.txt
    ----------------Print out the file's path - from DataOut.java - getData() Method--------------
    File's path: C:\Users\charles\Desktop\netbean\Pdfproject1\file.txt
    The file now being read by the system: transNameData.txt
    The data being copied to this file: copyOfFileName.txt Destination
    This file has been copied: file.txt Original
    The following content has been copied:
    ---start of content - from TheFile.java - save2() method---
    Some content.....................................
    --------end of content--------
    Jul 18, 2010 3:32:04 PM mainFrame1 exportButton2ActionPerformed
    SEVERE: null
    java.io.IOException: Permission denied
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:199)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at java.io.BufferedReader.fill(BufferedReader.java:136)
    at java.io.BufferedReader.readLine(BufferedReader.java:299)
    at java.io.BufferedReader.readLine(BufferedReader.java:362)
    at TheFile.save2(TheFile.java:144)
    at mainFrame1.exportButton2ActionPerformed(mainFrame1.java:168)
    at mainFrame1.access$200(mainFrame1.java:30)
    at mainFrame1$3.actionPerformed(mainFrame1.java:79)
    at java.awt.Button.processActionEvent(Button.java:392)
    at java.awt.Button.processEvent(Button.java:360)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    After clicking the text -> PDF button, system prints out:
    The following data is called by the PDF converter button...
    ---------------Print out the File's name - from DataOut.java - getData() Method-------------------------
    File's Name: file.txt
    ----------------Print out the file's path - from DataOut.java - getData() Method--------------
    File's path: C:\Users\charles\Desktop\netbean\Pdfproject1\file.txt
    MakePdf.java is loading... - createPdf() method
    File you have chosen and this file will be converted to a PDF file: file.txt
    And the content of the file is:
    ---start of content--- (Info from MakePdf.java)
    Some content.....................................
    ---end of content---
    Print out the content again: Some content..................................... ---> Info from SubClass DocToPdf of MakePdf.java
    Exception in thread "AWT-EventQueue-0" ExceptionConverter: java.io.IOException: The document has no pages.
    at com.lowagie.text.pdf.PdfPages.writePageTree(Unknown Source)
    at com.lowagie.text.pdf.PdfWriter.close(Unknown Source)
    at com.lowagie.text.pdf.PdfDocument.close(Unknown Source)
    at com.lowagie.text.Document.close(Unknown Source)
    at MakePdf$DocToPdf.createDoc(MakePdf.java:140)
    at MakePdf.createPdf(MakePdf.java:97)
    at TheFile.forPdfUse(TheFile.java:267)
    at mainFrame1.pdfConverterButtonActionPerformed(mainFrame1.java:184)
    at mainFrame1.access$300(mainFrame1.java:30)
    at mainFrame1$4.actionPerformed(mainFrame1.java:86)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6263)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6028)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    BUILD SUCCESSFUL (total time: 1 minute 41 seconds)

    Source code: MakePdf.java
    import com.lowagie.text.DocumentException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.*;
    import java.lang.String;
    import java.io.*;
    public class TheFile {
    String pathData;
    String nameData;
         public void PrepareJFileChooserData2(){
            try {
                // Create a object for JFileChooser.
                final JFileChooser choose = new JFileChooser();
                choose.showOpenDialog(null);
                File file = new File(choose.getSelectedFile(), "");
                pathData = file.getPath(); //get the path of the chosen file
                nameData = file.getName(); //get the name of the chosen file
                //Try to copy file to a temp file.
                Cfile2 cfile = new Cfile2();
                cfile.writeFile(nameData); // write nameData into the temp.txt file.
                //return pathData;
            } catch (IOException ex) {
                Logger.getLogger(TheFile.class.getName()).log(Level.SEVERE, null, ex);
          public String getPathName(){
                return pathData;
          public String getNameData(){
              return nameData;
        public class Cfile2{
        public void writeFile(String fName) throws IOException {
            PrintWriter pr = new PrintWriter(new File("temp.txt"));
            pr.println();
            pr.print("\n");
            pr.write("-------------------From SubClass - Cfile2 in TheFile.java----------------------");
            pr.write("File Name: " +nameData); // write the value of nameData to temp.txt
            pr.print("\n");
            pr.write("File's Path: "+pathData); // write the value of pathData to temp.txt
            pr.print("\n");
            pr.print("-------------------------------------------------------------------------------");
            pr.flush();  // Flush the data.
            pr.close();  // Close to unlock and flush to disk.
        public void save2() throws FileNotFoundException, IOException{
           // Copy and print out the file's name only
           String fileName = "transNameData.txt";
           File originFile = new File(fileName); //open the file to read
           System.out.println("The file now being read by the system: " +originFile);  //originFile = transNameData.txt
           File destinationFile = new File("copyOfFileName.txt"); // open another file and prepare to write in
        try {
            //Start trying to write data to file - copyOfFileName.txt
          byte[] readData = new byte[2048];
          FileInputStream fis = new FileInputStream(new File(fileName)); // Seems it writes the value of transNameData.txt to copy.txt
          int count = fis.available();
          if(count>0){
          FileOutputStream fos = new FileOutputStream(destinationFile);
          int i = fis.read(readData);
          while (i != -1) {
            fos.write(readData, 0, i);
            i = fis.read(readData);
          System.out.println("The data being copied to this file: " +destinationFile+ " Destination");
          fos.flush();
          fos.close();
          fis.close();
            }else{
              System.out.print("Error");
        } catch (IOException e) {
          System.out.println(e);
        // Copy the content of the file only
        FileInputStream fstream = new FileInputStream("transNameData.txt");
        // Get the object of DataInputStream
        DataInputStream in = new DataInputStream(fstream);
        BufferedReader br = new BufferedReader(new InputStreamReader(in));
        String strLine;
        //Read File Line By Line
        while ((strLine = br.readLine()) != null)   {
          // Print the content on the console
          System.out.println ("This file has been copied: " +strLine+ " Original"); //Work successfully, strLine has the value [file's title]
          File newDestinationFile = new File("ContentCopy.txt"); //Open the newCopy.txt file
          byte[] newReadData = new byte[2048];
          FileInputStream newFileInputStream = new FileInputStream(new File(strLine)); // See whether it can write it in... ok done!
          //String newString = newReadData.toString();
          //System.out.print("Content that has been copied: " +newString); //It prints out data in byte form...?!
          FileOutputStream newFileOutputStream = new FileOutputStream(newDestinationFile);
          int i = newFileInputStream.read(newReadData);
          while (i != -1) {
            newFileOutputStream.write(newReadData, 0, i);
            i = newFileInputStream.read(newReadData);
        FileInputStream newfstream = new FileInputStream(strLine);
        // Get the object of DataInputStream
        DataInputStream newin = new DataInputStream(newfstream);
            BufferedReader newbr = new BufferedReader(new InputStreamReader(newin));
        String content;
        //Read File Line By Line
        while ((content = newbr.readLine()) != null)   {
          // Print the content on the console
            System.out.println("\n");
            System.out.println("The following content has been copied: ");
            System.out.println(" ");
            System.out.println("---start of content - from TheFile.java - save2() method---");
            System.out.println(" ");
            System.out.println(content);
            System.out.println(" ");
            System.out.println("--------end of content--------");
        //Close the input stream
        in.close();
        //Close the input stream
        in.close();
    //----------- start PDF parser  ---> to txt format -------
       public void pdf() throws FileNotFoundException, IOException{
        //-----again--
       FileInputStream inStream = new FileInputStream("transNameData.txt");
        // Get the object of DataInputStream
        DataInputStream in = new DataInputStream(inStream);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
        String strLine;
        //Read File Line By Line
        while ((strLine = br.readLine()) != null)   {
          // Print the content on the console
          System.out.println ("Watch out: " +strLine+ "  ---> It should be printed successfully!!"); //Work successfully
        //---again......
        PDFTextParser pdftextparser = new PDFTextParser();
        pdftextparser.pdftoText(strLine);
        public void forPdfUse() throws FileNotFoundException, IOException, DocumentException{
            MakePdf makePdf = new MakePdf();
            makePdf.createPdf();
    }

  • FTP put leaving garbage in a .txt file

    Hi,
    I'm working with LiveCycle, Workbench ES 8.5.2. I'm doing an FTP put of a file to a server. The FTP seems to works fine, the file is in the server, but the service created some garbage after my data. I tried both transfer mode - binary, ascii - but the problem persists. Any hint ?
    ps. I'm sure is the FTP who creates the garbage because I saw the file before calling the FTP put and has no garbage
    Thanks

    Hello Jasmin,
    Thanks for your answer. I finally got it: I changed the File Transfer Mode to ASCII instead of binary and is no longer creating bad characters in the txt file. But the worst thing is that I had already tried this solution before and it didn't work the first time....a strange behaviour.
    anyway thanks again

  • StringTokenizer, chopping up content of a txt file

    I'm working on a project here, making program(java) to read and run assembly. I have opened the file, but I'm having trouble extracting the content from the txt file.
    txt-file looks like this:
    IN 200
    IN 200
    LDA 200
    ADD 201
    HLT
    The file is bigger, but you see my point. I need to read the content and chop the content in to properly tokens. Splitting the lines by " " does not work for me, neither by "\b". Is it possible to split two times? Second part of the program is the assembly coder, where i have to convert IN to a function to receive input from user(ill use JOptionPane when i get there).
    For fun I'm posting my work so far: http://paste.dprogramming.com/dpqe83x3.php

    Okey, I got the splitter to work(yay!). but since this is a program "converting" assembly to java i need some way to reccon commands(like IN 200).
    I have no idea on how to do that(there a lot of things i dont know really). this my try/catch
    try
                             BufferedReader in = new BufferedReader(new FileReader(fileDir));
                             String input = in.readLine(); // reads first line, IN 200
                             StringTokenizer st = new StringTokenizer(input, " ");
                             while(st.hasMoreTokens())
                                  int x = 0;
                                  String[] array = new String[x];     
                                  for(x = 0; x <= 1; x++)
                                       array[x] = st.nextToken();
                        catch (IOException event)
                             event.printStackTrace();
                        }As you see(and how i think i could solve the problem) is that i run the program like this:
    get the file
    open and read the first line(that is IN 200) in our case.
    put each of the tokens inside an array, since i want to compare tokens to a assambly command libary(so if token = IN then get input from user and store input in 200(simple int mem1)).
    And yeah, the code above isn't working. but i hope you all see what I want to do and can guide me to the right thing to do. the code above does not read more than the first line since if i cant get it to work then i cant get the rest to work, its the concept.

  • How to output PDF file through XI from PDF form generated in SAP

    Hi, All,
    I need to generate and send out PDF file to other system through XI. The PDF file source come from SAP PDF form which type is XSTRING. I see there is a similar thread posted here /message/527877#527877 [original link is broken]
    but it seems does not have good solution there. Can anybody give a hand?
    Useful information will be surely awarded.
    Yang

    Hi,
    Please check the links below to know about conversion agent tool,it is a third party tool which helps to convert the PDF,word doc,HL7 doc......etc into xml format.
    This s/w u have to buy from SAP and do the convertion in the convertion agent tool and deploy it in the xi server.
    Check the links
    http://help.sap.com/saphelp_nw04/helpdata/en/43/6d95e0ac846fcbe10000000a1553f6/CMGetStart.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/content.htm
    More on the SAP Conversion Agent by Itemfield
    Integrate SAP Conversion Agent by Itemfield with SAP XI
    Conversion Agent a Free Lunch?
    How to get started using Conversion Agent from Itemfield
    Conversion Agent - Handling EDI termination characters
    https://websmp102.sap-ag.de/~sapdownload/011000358700001090982006E/ConvAgentDocSP16.zip
    https://websmp102.sap-ag.de/~sapdownload/011000358700004921152005E/ConversionAgent.pdf
    Regards,
    Phani

Maybe you are looking for

  • Can I have we have our own Apple ID and use the same iTunes account

    I have an iTunes account my son has recently got an iPad and I've notices he's synced with me can we both have our own iCloud accounts and if so how do I do this thanks

  • Error code XML file

    When I use a custom error file xxx-errors.txt.How do I get the general error handler to choose the codes from this specific file? I am not clear on what tells the vi to use this file. Thanks Jim

  • Crystal report parameter usage

    Hi all, I am facing a issue in designing crystal report. I want to display records in report as per user entered value of date parameter but  in database if data is not present for given input date value then the report should run for value which is

  • Ds_RowNumber start at 0 / Image title short

    Some notes about how I have been using spry and how I have got around some issues. Although simple it can take a non JS expert like me a while to figure them out! If you know there is a better way round any of these then let me know. ds_RowNumber sta

  • TS2634 I can only get sound through my ipad with the head phones.

    I can only get sound through my ipad with the head phones. I haven't had this problem before. I upgraded about a week ago, but this is the first time the sound has been an issue. When I turn up the volume it shows that it is the volume for the headph