Attachment/LineText in PO(DI API)

Hi experts, just wondering if I can attached files in PO or in other Document module in SAP using DI API. I've search that attachment using DI API is available only on
Contacts, ContractTemplates, CustomerEquipmentCards, EmployeeInfo, KnowledgeBaseSolutions, Messages, Message, SalesOpportunities, and ServiceContracts.
And also, I want to add LineText(that save's in POR10 for example) in this document. Is that possible?
Thanks,

Hi Bryan,
There is no DI object that exposed the Attachment Entry in Documents Object until 88.2
I have checked that it is available in SBO9.0 PL3. (Not sure about the earlier PL thought).
        Dim oDoc As SAPbobsCOM.Documents = oC.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
        oDoc.AttachmentEntry = 1
You would need to create the attachment using the existing attachment object, then you pass the document entry to the code above.
Regards
Edy

Similar Messages

  • File attachment issue in MimeMessage [Mail API]

    Hi,
    I tried to attach PDF and XML file in MIME Message of MAIL API. I want attach encoded PDF and XML file with gzip format.
    I’m able to attached both the files but its not attached properly and when i tried to retrieved back from MIME Message, I’m getting error.
    Error is
    java.util.zip.ZipException: oversubscribed literal/length tree
         at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
         at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at com.asite.supernova.test.CreateReadMimeMessage.ReadMail1(CreateReadMimeMessage.java:145)
         at com.asite.supernova.test.CreateReadMimeMessage.main(CreateReadMimeMessage.java:48)
    Here my code
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.ByteArrayOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.io.Reader;
    import java.io.StringWriter;
    import java.io.Writer;
    import java.util.Date;
    import java.util.Enumeration;
    import java.util.Properties;
    import java.util.zip.CRC32;
    import java.util.zip.Deflater;
    import java.util.zip.GZIPInputStream;
    import java.util.zip.GZIPOutputStream;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    import javax.activation.DataHandler;
    import javax.activation.DataSource;
    import javax.mail.BodyPart;
    import javax.mail.Header;
    import javax.mail.Message;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import org.apache.commons.codec.binary.Base64;
    import com.sun.istack.internal.ByteArrayDataSource;
    public class CreateReadMimeMessage {
         public static void main(String[] args) {
              CreateMail();
              ReadMail1();
         public static void CreateMail(){
              try{
                   Properties properties = System.getProperties();
                 Session session = Session.getDefaultInstance(properties);
                 Message msg = new MimeMessage(session);
                 msg.setSentDate(new Date());            
                 Multipart multipart = new MimeMultipart();
                 BodyPart part1 = new MimeBodyPart();           
                 part1.setFileName("test.pdf");                               
                 part1.setHeader("Content-Type", "application/pdf");
                 part1.setHeader("Content-Encoding", "gzip");
                 part1.setHeader("Content-ID", "PDF");
                 //1
                 compressFile("test.pdf","testpdf.gzip");
                 String encodedData = new String(getBytesFromFile(new File("testpdf.gzip")));
                 //1
                 DataSource ds = new ByteArrayDataSource(encodedData.getBytes(), "application/pdf");            
                 DataHandler dh = new DataHandler(ds);
                 part1.setDataHandler(dh);
                 //part1.setText("This is only text data");
                 BodyPart part2 = new MimeBodyPart();
                 part2.setFileName("test.xml");
                 part2.setHeader("Content-Type", "application/xml;");
                 part2.setHeader("Content-Encoding", "gzip");
                 part2.setHeader("Content-ID", "XML");
                 part2.setHeader("Content-Transfer-Encoding", "base64");
                 //1
                 compressFile("test.xml","textxml.gzip");
                 String dataXML = new String(getBytesFromFile(new File("textxml.gzip")));
                 DataSource ds1 = new ByteArrayDataSource(dataXML.getBytes(), "application/xml");
                 DataHandler dh1 = new DataHandler(ds1);
                 part2.setDataHandler(dh1);            
                 multipart.addBodyPart(part1);
                 multipart.addBodyPart(part2);
                 msg.setContent(multipart);
                 msg.writeTo(new FileOutputStream(new File("MIMEMessage.xml")));
              }catch (Exception e) {
                   // TODO: handle exception
                   e.printStackTrace();
         public static void ReadMail1(){
              try{
                   Properties properties = System.getProperties();
                 Session session = Session.getDefaultInstance(properties);
                 InputStream inFile = new FileInputStream(new File("MIMEMessage.xml"));
                 Message msg = new MimeMessage(session,inFile);     
                Multipart multipart = (Multipart) msg.getContent();
                for (int i = 0; i < multipart.getCount(); i++) {              
                    BodyPart bodyPart = multipart.getBodyPart(i);
                    Enumeration enumHeader = bodyPart.getAllHeaders();
                    String fileExt="";
                    while(enumHeader.hasMoreElements()){
                         Header header = (Header) enumHeader.nextElement();
                         System.out.println(header.getName() + ":" + header.getValue());
                         if(header.getName().equalsIgnoreCase("Content-ID")){
                              if(header.getValue().equalsIgnoreCase("pdf")){
                                   fileExt=".pdf";
                              }else if(header.getValue().equalsIgnoreCase("xml")){
                                   fileExt=".xml";
                    BufferedInputStream inn = new BufferedInputStream(bodyPart.getInputStream());
                    GZIPInputStream gzin = new GZIPInputStream(inn);
                    // Open the output file
                       String target ="File"+i+fileExt;
                       OutputStream outf = new FileOutputStream(target);
                       // Transfer bytes from the compressed file to the output file
                       byte[] buff = new byte[128];
                       int lent;
                       while ((lent = gzin.read(buff)) > 0) {
                            outf.write(buff, 0, lent);
              }catch (Exception e) {
                   // TODO: handle exception
                   e.printStackTrace();
         public static void compressFile(String input,String output) {
              try {
                   // Create the GZIP output stream               
                   OutputStream out = new GZIPOutputStream(new FileOutputStream(output));
                   out =new BufferedOutputStream(out);
                   // Open the input file
                   //FileInputStream in = new FileInputStream(input);
                   InputStream in = new BufferedInputStream(new FileInputStream(input));
                   // Transfer bytes from the input file to the GZIP output stream
                   byte[] buf = new byte[524288];
                   /*int len;
                   while ((len = in.read(buf)) > 0) {
                        out.write(buf, 0, len);
                   int count;
                   while((count = in.read(buf, 0, 524288)) != -1) {
                        System.out.println(new String(buf, 0, count));
                        out.write(buf, 0, count);
                   out.flush();
                   in.close();
                   // Complete the GZIP file
                   //out.finish();
                   out.close();               
              } catch (Exception e) {
                   e.printStackTrace();
         public static byte[] getBytesFromFile(File file) throws IOException {
            InputStream is = new FileInputStream(file);
            // Get the size of the file
            long length = file.length();
            if (length > Integer.MAX_VALUE) {
                // File is too large
            System.out.println("File Len : " + length);
            // Create the byte array to hold the data
            byte[] bytes = new byte[(int)length];
            // Read in the bytes
            int offset = 0;
            int numRead = 0;
            while (offset < bytes.length
                   && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
                offset += numRead;
            System.out.println("offset : " + offset);
            // Ensure all the bytes have been read in
            if (offset < bytes.length) {
                throw new IOException("Could not completely read file "+file.getName());
            // Close the input stream and return bytes
            is.close();
            return bytes;
    }Please help me asap.
    Edited by: sabre150 on 10-Feb-2011 01:50
    Moderator action : added [ code] tags to make the code readable.

    String is not a suitable container for binary data so unless the two lines
                 compressFile("test.pdf","testpdf.gzip");
                 String encodedData = new String(getBytesFromFile(new File("testpdf.gzip")));actually Base64 encode the file content you are probably corrupting your file.
    I suspect you should be Base64 encoding the compressed file and modifying the mime-type to reflect this.

  • Attaching/Detaching libraries with Java API

    Hello,
    In my forms (Forms10g), sometimes, libraries had been attached in lower case although files are in upper case. This causes compilation errors on UNIX systems.
    I'm trying to detach these libraries with Java APIs and then reattach them in upper case.
    But I get an error when I want to save the module.
    Here is my code :
    public class UpperPll {
         public UpperPll (String formName) {
              try
                   FormModule form = FormModule.open("C:/AttachPll/" + formName);
                   System.out.println("Form Name is " + form.getName());
                   JdapiIterator AttachPll = form.getAttachedLibraries();
                   while(AttachPll.hasNext())
                        try
                             JdapiObject jo = (JdapiObject)AttachPll.next();
                             System.out.println(jo.getName());
                             if (jo.getName().toLowerCase().equals(jo.getName()))
                                  AttachedLibrary.find(form,jo.getName().toUpperCase()).detach();
                                  System.out.println(jo.getName().toUpperCase());
                                  new AttachedLibrary(form,jo.getName().toUpperCase());
                        catch (JdapiIllegalStateException jdise)
                             jdise.printStackTrace();
                   form.save("C:/AttachPll/New/" + form.getName() + ".fmb");
                   Jdapi.shutdown();
              catch (JdapiException jde)
                   jde.printStackTrace();
         public static void main (String[] args) {
              try {
                   FileReader r = new FileReader( "C:/AttachPll/listemodule.txt" );
                   BufferedReader br = new BufferedReader( r );
                   try {
                        String module;
                        while ( ( module = br.readLine() ) != null ) {
                             new UpperPll(module);
                   } finally {
                        r.close();
              } catch (FileNotFoundException fnfe) {
                   fnfe.printStackTrace();
              } catch (IOException ioe) {
                   ioe.printStackTrace();
    And here are the errors I get :
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x2FBBDCB
    Function=icobad+0xB
    Library=C:\DevSuiteHome_1\bin\frmcom.dll
    Current Java thread:
         at oracle.forms.jdapi.BaseAPI._jni_save_form(Native Method)
         at oracle.forms.jdapi.FormModule.save(Unknown Source)
         at UpperPll.<init>(UpperPll.java:39)
         at UpperPll.main(UpperPll.java:55)
    Dynamic libraries:
    0x00400000 - 0x0040B000      C:\DevSuiteHome_1\jdk\bin\javaw.exe
    0x7C910000 - 0x7C9C7000      C:\WINDOWS\system32\ntdll.dll
    0x7C800000 - 0x7C904000      C:\WINDOWS\system32\kernel32.dll
    0x77DA0000 - 0x77E4C000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77E50000 - 0x77EE1000      C:\WINDOWS\system32\RPCRT4.dll
    0x77D10000 - 0x77DA0000      C:\WINDOWS\system32\USER32.dll
    0x77EF0000 - 0x77F37000      C:\WINDOWS\system32\GDI32.dll
    0x77BE0000 - 0x77C38000      C:\WINDOWS\system32\MSVCRT.dll
    0x62DC0000 - 0x62DC9000      C:\WINDOWS\system32\LPK.DLL
    0x753C0000 - 0x7542B000      C:\WINDOWS\system32\USP10.dll
    0x08000000 - 0x08139000      C:\DevSuiteHome_1\jdk\jre\bin\client\jvm.dll
    0x76AE0000 - 0x76B0F000      C:\WINDOWS\system32\WINMM.dll
    0x6BD00000 - 0x6BD0D000      C:\WINDOWS\system32\SYNCOR11.DLL
    0x10000000 - 0x10007000      C:\DevSuiteHome_1\jdk\jre\bin\hpi.dll
    0x00940000 - 0x0094E000      C:\DevSuiteHome_1\jdk\jre\bin\verify.dll
    0x00950000 - 0x00969000      C:\DevSuiteHome_1\jdk\jre\bin\java.dll
    0x00970000 - 0x0097D000      C:\DevSuiteHome_1\jdk\jre\bin\zip.dll
    0x02F60000 - 0x02F6F000      C:\DevSuiteHome_1\BIN\frmjapi.dll
    0x02F70000 - 0x02F8C000      C:\DevSuiteHome_1\bin\frmd2f.dll
    0x663D0000 - 0x66414000      C:\DevSuiteHome_1\bin\CA.dll
    0x66340000 - 0x6636A000      C:\DevSuiteHome_1\bin\mmc.dll
    0x64CA0000 - 0x64CB1000      C:\DevSuiteHome_1\bin\UTL.dll
    0x60730000 - 0x607DC000      C:\DevSuiteHome_1\bin\oracore10.dll
    0x608D0000 - 0x60963000      C:\DevSuiteHome_1\bin\oranls10.dll
    0x62B40000 - 0x62B53000      C:\DevSuiteHome_1\bin\oraunls10.dll
    0x60C40000 - 0x60C47000      C:\DevSuiteHome_1\bin\orauts.dll
    0x719F0000 - 0x71A07000      C:\WINDOWS\system32\WS2_32.dll
    0x719E0000 - 0x719E8000      C:\WINDOWS\system32\WS2HELP.dll
    0x774A0000 - 0x775DD000      C:\WINDOWS\system32\ole32.dll
    0x616B0000 - 0x61891000      C:\DevSuiteHome_1\bin\oraclient10.dll
    0x62B60000 - 0x62B66000      C:\DevSuiteHome_1\bin\oravsn10.dll
    0x60D30000 - 0x60DE8000      C:\DevSuiteHome_1\bin\oracommon10.dll
    0x60300000 - 0x60720000      C:\DevSuiteHome_1\bin\orageneric10.dll
    0x629C0000 - 0x629D2000      C:\DevSuiteHome_1\bin\orasnls10.dll
    0x62B80000 - 0x62C86000      C:\DevSuiteHome_1\bin\oraxml10.dll
    0x02F90000 - 0x02FA1000      C:\WINDOWS\system32\MSVCIRT.dll
    0x607E0000 - 0x608CC000      C:\DevSuiteHome_1\bin\oran10.dll
    0x62000000 - 0x6202C000      C:\DevSuiteHome_1\bin\oranl10.dll
    0x62030000 - 0x62042000      C:\DevSuiteHome_1\bin\oranldap10.dll
    0x62090000 - 0x62184000      C:\DevSuiteHome_1\bin\orannzsbb10.dll
    0x61E10000 - 0x61E52000      C:\DevSuiteHome_1\bin\oraldapclnt10.dll
    0x61F30000 - 0x61F47000      C:\DevSuiteHome_1\bin\orancrypt10.dll
    0x71A10000 - 0x71A1A000      C:\WINDOWS\system32\WSOCK32.dll
    0x76D10000 - 0x76D29000      C:\WINDOWS\system32\iphlpapi.dll
    0x770E0000 - 0x7716C000      C:\WINDOWS\system32\OLEAUT32.dll
    0x621A0000 - 0x621D7000      C:\DevSuiteHome_1\bin\oranro10.dll
    0x621F0000 - 0x621FC000      C:\DevSuiteHome_1\bin\orantcp10.dll
    0x61F70000 - 0x61F76000      C:\DevSuiteHome_1\bin\oranhost10.dll
    0x61F20000 - 0x61F26000      C:\DevSuiteHome_1\bin\orancds10.dll
    0x62210000 - 0x62216000      C:\DevSuiteHome_1\bin\orantns10.dll
    0x60970000 - 0x60C31000      C:\DevSuiteHome_1\bin\orapls10.dll
    0x62500000 - 0x62507000      C:\DevSuiteHome_1\bin\oraslax10.dll
    0x627B0000 - 0x628B3000      C:\DevSuiteHome_1\bin\oraplp10.dll
    0x618B0000 - 0x61905000      C:\DevSuiteHome_1\bin\orahasgen10.dll
    0x622B0000 - 0x622E6000      C:\DevSuiteHome_1\bin\oraocr10.dll
    0x622F0000 - 0x62315000      C:\DevSuiteHome_1\bin\oraocrb10.dll
    0x6FEE0000 - 0x6FF34000      C:\WINDOWS\system32\NETAPI32.dll
    0x76BA0000 - 0x76BAB000      C:\WINDOWS\system32\PSAPI.DLL
    0x62A80000 - 0x62AF6000      C:\DevSuiteHome_1\bin\orasql10.dll
    0x662F0000 - 0x66320000      C:\DevSuiteHome_1\bin\mmi.dll
    0x64F10000 - 0x64F21000      C:\DevSuiteHome_1\bin\UIIM.dll
    0x64CE0000 - 0x64DBD000      C:\DevSuiteHome_1\bin\UIW.dll
    0x64CD0000 - 0x64CD7000      C:\DevSuiteHome_1\bin\UTC.dll
    0x64CC0000 - 0x64CC9000      C:\DevSuiteHome_1\bin\UTJ.dll
    0x72F50000 - 0x72F76000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x58B50000 - 0x58BE7000      C:\WINDOWS\system32\COMCTL32.dll
    0x64ED0000 - 0x64EF6000      C:\DevSuiteHome_1\bin\UIOLE.dll
    0x76340000 - 0x7638A000      C:\WINDOWS\system32\comdlg32.dll
    0x77F40000 - 0x77FB6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x7C9D0000 - 0x7D1F3000      C:\WINDOWS\system32\SHELL32.dll
    0x64AD0000 - 0x64C05000      C:\DevSuiteHome_1\bin\VGS.dll
    0x64E30000 - 0x64E93000      C:\DevSuiteHome_1\bin\UIREM.dll
    0x659A0000 - 0x659EE000      C:\DevSuiteHome_1\bin\ROS.dll
    0x66250000 - 0x6627E000      C:\DevSuiteHome_1\bin\mmw.dll
    0x662A0000 - 0x662B0000      C:\DevSuiteHome_1\bin\mmv.dll
    0x73AA0000 - 0x73AB7000      C:\WINDOWS\system32\AVIFIL32.dll
    0x77BB0000 - 0x77BC5000      C:\WINDOWS\system32\MSACM32.dll
    0x75BA0000 - 0x75BC1000      C:\WINDOWS\system32\MSVFW32.dll
    0x662C0000 - 0x662DF000      C:\DevSuiteHome_1\bin\mms.dll
    0x66810000 - 0x66A2B000      C:\DevSuiteHome_1\bin\DE.dll
    0x627A0000 - 0x627AF000      C:\DevSuiteHome_1\bin\oraplc10.dll
    0x64F50000 - 0x64F66000      C:\DevSuiteHome_1\bin\UICC.dll
    0x64FB0000 - 0x64FDA000      C:\DevSuiteHome_1\bin\UCOL.dll
    0x02FB0000 - 0x030CA000      C:\DevSuiteHome_1\bin\frmcom.dll
    0x66380000 - 0x66389000      C:\DevSuiteHome_1\bin\mma.dll
    0x64FF0000 - 0x65003000      C:\DevSuiteHome_1\bin\UAT.dll
    0x66220000 - 0x6623C000      C:\DevSuiteHome_1\bin\nn.dll
    0x64F70000 - 0x64F94000      C:\DevSuiteHome_1\bin\UIA.dll
    0x64F30000 - 0x64F45000      C:\DevSuiteHome_1\bin\UIDC.dll
    0x030D0000 - 0x03194000      C:\DevSuiteHome_1\bin\frmdig.dll
    0x031A0000 - 0x0324D000      C:\DevSuiteHome_1\bin\frmdug.dll
    0x66210000 - 0x66215000      C:\DevSuiteHome_1\bin\obs.dll
    0x77390000 - 0x77492000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x5B090000 - 0x5B0C8000      C:\WINDOWS\system32\uxtheme.dll
    0x74690000 - 0x746DB000      C:\WINDOWS\system32\MSCTF.dll
    0x76BE0000 - 0x76C0E000      C:\WINDOWS\system32\WINTRUST.dll
    0x779E0000 - 0x77A76000      C:\WINDOWS\system32\CRYPT32.dll
    0x77A80000 - 0x77A92000      C:\WINDOWS\system32\MSASN1.dll
    0x76C40000 - 0x76C68000      C:\WINDOWS\system32\IMAGEHLP.dll
    0x72C70000 - 0x72C79000      C:\WINDOWS\system32\wdmaud.drv
    0x72C60000 - 0x72C68000      C:\WINDOWS\system32\msacm32.drv
    0x77BA0000 - 0x77BA7000      C:\WINDOWS\system32\midimap.dll
    0x5D3F0000 - 0x5D491000      C:\WINDOWS\system32\DBGHELP.dll
    0x77BD0000 - 0x77BD8000      C:\WINDOWS\system32\VERSION.dll
    Heap at VM Abort:
    Heap
    def new generation total 576K, used 35K [0x10010000, 0x100b0000, 0x104f0000)
    eden space 512K, 6% used [0x10010000, 0x10017c90, 0x10090000)
    from space 64K, 7% used [0x10090000, 0x10091348, 0x100a0000)
    to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000)
    tenured generation total 1408K, used 122K [0x104f0000, 0x10650000, 0x14010000)
    the space 1408K, 8% used [0x104f0000, 0x1050e930, 0x1050ea00, 0x10650000)
    compacting perm gen total 4096K, used 1642K [0x14010000, 0x14410000, 0x18010000)
    the space 4096K, 40% used [0x14010000, 0x141aaac8, 0x141aac00, 0x14410000)
    Local Time = Wed Apr 12 10:35:49 2006
    Elapsed Time = 5
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode)
    # An error report file has been saved as hs_err_pid3184.log.
    # Please refer to the file for further information.
    Can anyone help me ?
    Message was edited by:
    dbouchier

    We do something very simular. We rename everything to lowercase for the same reasons. I've pasted a snippet of the code we're using at the end of this post.
    To get the full source code of our converter have a look at http://www.oratransplant.nl/2005/05/30/custom-built-forms-migration-assistant/#comment-642
    Here is the code snippet:
    while (attachedLibs.hasNext()) {
    AttachedLibrary attachedLib = (AttachedLibrary)attachedLibs.next();
    String attachedLibLocation = attachedLib.getLibraryLocation();
    out("Found attached library " + attachedLibLocation, logLevel,
    false);
    if (attachedLib.getName().equalsIgnoreCase("obsolete_forms6")) {
    obsoleteAttached = true;
    if (attachedLib.getName().equalsIgnoreCase("webreports")) {
    webReportsAttached = true;
    // converted name of attached lib to lowercase
    if ((!attachedLibLocation.equals(attachedLibLocation.toLowerCase())) &&
    lowerLib) {
    out(attachedLib,
    "Converting filename to lowercase (" + attachedLibLocation.toLowerCase() +
    ")", logLevel + 1, true);
    attachedLibLocation = attachedLibLocation.toLowerCase();
    pllChanged = true;
    // attachedLibLocation = attachedLibLocation.toUpperCase();
    pldText.append(".attach LIBRARY " + attachedLibLocation +
    " END NOCONFIRM\n");
    out("Re-attaching library " + attachedLibLocation, logLevel + 1,
    false);
    }

  • Download attachment from MTM(TFS) using API.

    Hi,
    I want to download the attachment from executed test cases from MTM using API.
    Can you please help me with correct API to download the attachments.
    Should it be from TestCase, TestResult or TestRun... i am confused.
    Thanks,
    Priyank

    Your running into a bug in the BinaryDecode method when using binaryStringResponseBody:true. This is in the SP.RequestExecutor.Debug.js. You can read more about how to get around this here:
    http://techmikael.blogspot.com/2013/07/how-to-copy-files-between-sites-using.html
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Attaching User ComboBox to TestStand API

    I am using a custom interface that gives my application an Office 2003 look incliding the dockable panels and toolbars, I would like to use the ComboBox controls that I normally use rather than the NI ComboBox that comes with TestStand, How do I connect those custom Combo boxes to the TestStand API?

    There is no simply way to connect non-TestStand UI control to a manager control such that it behaves the same way as a connected TestStand UI control. Instead, you must implement the desired behavior in the usual way you program your controls.
    This means you have to use the methods and events that your combo box offers to add and remove items and to respond to user selections.
    To obtain the data to populate the combobox or to perform an action in response to a user selection, you might need to call the TestStand API. Which methods you call would of course depend on what you are showing in the combo box.

  • Attachment support thru Payables Open Interface(POI)-urgent pls..

    All,
    Version: 11.5.10.2
    We have a requirement that we need to integrate a 3rd party application to push invoices to Oracle payables thru POI. From 3rd party appln there are chances that it may send a attachment (ex: supplier catalogue in pdf/file format along with invoice). When I gone thru the POI interface tables, I couldn't see any relavant attributes field to push an attachment. May I know if anyone come across this, if so kindly share your views/suggestion on this.
    thanks
    sen

    All,
    I tested the attachment using the fnd_webattch.add_attachment API. I can successfully loaded the attachment to AP Payables using the invoice id as primary key. But when I try to open the attachment from UI, it opens a blank page!!
    What i did was i kept a file in one of the location of my oracle apps server, then i gave the file location in the API as /home2/system1/orafin11i_H.txt. .
    my api is like this
    fnd_webattch.add_attachment(seq_num => v_seq_num,
    category_id => v_category_id,
    document_description => p_document_desc,
    datatype_id => v_datatype_id,
    text => NULL,
    file_name =>'/home2/system1/orafin11i_H.txt',
    url => NULL,
    function_name => 'APXINWKB',
    entity_name => v_entity_name,
    pk1_value => to_char(p_entity_id),
    pk2_value => NULL,
    pk3_value => NULL,
    pk4_value => NULL,
    pk5_value => NULL,
    media_id => v_media_id,
    user_id => fnd_global.user_id);
    anything i did wrong? pls let me know
    thanks
    sen
    Edited by: Sen2008 on Feb 29, 2012 11:11 PM

  • Workflow API: adding and accessing file Attachments to a Human Task

    Hi there,
    I am using the Workflow Services Java API (11.1.1) for SOA Suite to access and manipulate human tasks. I would like to be able to access and add file attachments to existing human tasks. I am using the methods provided in the AttachmentType interface.
    When adding an attachment, the problem I am running into is that an attachment does created and associated with the task, however it is empty and has no content. I have attempted both setting the input stream of the attachment, as well as the content string and in each case have had no success.
    I have successfully added and accessed an attachment using the worklist application, however when trying to access the content of this attachment through code I receive an object with mostly null/0 values throughout, apart from the attachment name.
    As the API's are not overly rich in documentation I may well be using them incorrectly. I would really appreciate any help/suggestions/alternatives in dealing with BPEL task attachments.
    Thanks
    The code I am using resembles:
    List attachments = taskWithAttachments.getAttachment();
    for(Object o : attachments){
    AttachmentType a = (AttachmentType) o;
    String content = a.getContent(); +// NULL+
    InputStream str = a.getInputStream(); +// NULL+
    String name = a.getName(); +// Has the attachment name+
    String mime = a.getMimeType(); +// Has the mime type+
    long size = a.getSize(); +// 0+
    Edited by: 855489 on May 2, 2011 4:23 PM
    Edited by: 855489 on May 2, 2011 8:48 PM

    I am also facing the same issue, using 11.1.1.6, anyone managed to solve this?
    Regards
    Venkat

  • How to allow user to see attachment without login in 11i through browser ?

    Hi,
    I have one requirement where I need to show attachment to user even if He is not logged in.
    We created Function which return Attachment File URL using seeded API.
    When we paste that URL in browser it asks for login for Oracle Apps version 11i but for version R12 when we do the same the attachment gets downloaded.
    Regards,
    Ajay Sharma

    HI Ajay,
    I have one requirement where I need to show attachment to user even if He is not logged in.
    We created Function which return Attachment File URL using seeded API.
    When we paste that URL in browser it asks for login for Oracle Apps version 11i but for version R12 when we do the same the attachment gets downloaded.I think its not possible in 11i
    this is how it is designed
    we cant bypass login credentials
    correct me if I'm wrong
    ;) AppsMasti ;)
    Sharing is Caring

  • Help With API Integration

    Our company has decided to use Business Catalyst but we need help with an activation wizard for our product.  This activation is also used to create a recurring monthly billing order.
    We're thinking we need to use the API, here's our basic flow:
    Customer Clicks Activation Button
    Prompted to Login or Register
    Customer looks up unit number (Can be called via a provider API)
           Unit  number is placed into field
    Customer fills in billing information (or can it be pulled via BC API?)
              Name
              Address
              Phone
              Email
              Credit Card Info
    Order is sent to BusinessCatalyst WebServices API to create recurring order
    Billing Information is attached to Provider Database via API
    Customer is forwarded to Subscription_thank_you page (url to be determined later)
    Our team has never worked with the BC API and would like to know the best route to handle this scenario...should we embed the application in an iframe and put the iframe on a page in a secure zone or should we use the API to push user information from our BC site to an app residing on a subdomain?  If anyone has experience with this type of situation or can point us to someone that has, please let me know, it would be greatly appreciated!
    Thanks,
    Andy

    Ok, we have a solution in the works that includes javascript, but would like to know if we can pass custom arguments through the  /FormProcessv2.aspx script.url so that we could invoke a different receipt - buy page based on url arguments.  We would want to include two hidden field entries that we will be including in the form and will add them using a custom onclick event for the check out form submit button.  This would allow the javascript planted on the receipt - buy page to know what path the buyer is coming from.  We'll have buyers that are buying the normal route, simply adding items to their cart, but will also have people activating their device which includes purchasing a recurring product for which we will use javascript to automatically add to cart.  The receipt - buy page will stay in the original form for all buyers simply adding items to their cart and purchasing, but will change when they are activating.  The passed url arguments will tell our javascript which type of customer they are and will load the page accordingly.  Will  /FormProcessv2.aspx strip out our customer arguments and resort back to the default?
    Thanks,
    Andy

  • Error when compiling my API Programm thant i want to generate DLL for use in Labview!

    Pls see the attachment!!I use API "GetComputerName" to programm in vc6.0 to make a dll file for use in Labview.But i get the error in the attachment. Pls give me a hand!
    Attachments:
    machinename.zip ‏1493 KB
    error_when_compiling.txt ‏1 KB

    Hi,
    If you are using the CVI libraries on this you can use the GetCompName() function from the programmer's toolbox. However, your code looks fine, the only thing that you need to change is the data type of the paramenters in CompNameLength. Just declare them using the predefined Windows data types; like this:
    LPTSTR computerName;
    DWORD compNameLength = MAX_COMPUTERNAME_LENGTH+1;
    computerName = malloc(MAX_COMPUTERNAME_LENGTH+1);
    GetComputerName(computerName,&compNameLength);
    printf("%s",computerName);
    free(computerName);
    Don't forget to include windows.h where those types are defined.
    Good Luck!
    Juan Carlos
    N.I.

  • Opening default Client Email with Attachment

    Hello Everyone,
    I am trying to to create an email programmatically, i.e the user clicks on a button and then the default client email(outlook, gmail, hotmail, etc..) opens the "new message" with an excel file attached to it.
    I read that using the Java Desktop Api 6 you can open the default client email, with the following code:
    Desktop.getDesktop().mail(URI dest = new URI("mailto", "[email protected]", null););However I have not found so far any way to attach a file using this API.
    I also saw the JavaMail allows to attach, however I am not user if this is suitable for me as it does not open the default browser.
    Has anyone ever done it? I really appreciate any help.
    Thanks.

    BalusC wrote:
    In theory, only way is to pass the attachment path as an attribute of the URI, like [email protected]?attachment="c:/passwords.txt", but this is not specified by RFC specification as it is a huge security hole (which might be obvious).
    Hey, first of all thanks of your anwer. Actually, i have already tried this as well, but it didnt work. It opens the email without any attachement.

  • Opening OA page in new window using Image Bean

    Hi All,
    We have a requirement to open a new window in one of our application. It is working when I use a link but I am not able to achieve the same functionality with an image bean. Is it possible to achieve this using an image bean?
    Thanks in advance,
    Sundeep

    Sundeep,
    If you wanna use imagebean, you would have to attach action using bound values API and open secondary window in OAF.Here is the same ple code:
    OAImageBean btn= (OAImageBean)webBean.findChildRecursive("<item id of image icon bean>");
    //page url
    String page1 = "/xx/oracle/apps/XX/webui/XXPg&retainAM=Y";
    String destURL = APPS_HTML_DIRECTORY + OAWebBeanConstants.APPLICATION_JSP + "?"+ OAWebBeanConstants.JRAD_PAGE_URL_CONSTANT+ "=" + page1;
    OABoundValueEmbedURL jsBound = new OABoundValueEmbedURL(btn,"openWindow(self, '", destURL, "' , 'longTipWin', {width:"+900+", height:"+500+"}, true); return false;");
    btn.setAttributeValue(oracle.cabo.ui.UIConstants.ON_CLICK_ATTR, jsBound);
    I received your mail, and replied the same in the mail too.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • E-mail button using something other then Outlook

    My question is simple when using an e-mail button you can send the PDF or XML through e-mail to a certain address such as a gmail, yahoo, msn or etc.. email account but the host e-mail server it is using is the Outlook on your local machine. My question is if I did not have Outlook installed on my machine and had my yahoo or gmail e-mail accounts logged in on the web browser and then I click on the e-mail button on a certain form could they use the gmail or e-mail account for sending or will it not work. Simply put to send e-mail using the E-mail submit button you always use Outlook is there a way to use a script to make the submit button using gmail or yahoo instead.

    There is a dialog that pops up that indicates that we can use the default enail client on your machine or if you do not have one or you want to use a web mail client then it is up to you to save the file and create your own email and add this file as an attachment. There is no api available to be able to automate the web mail.
    Paul

  • How to check mails send or not

    Dear All,
    I am Using Java Mail API to send mail even if there are some invalid mailids in the cc list, But some time mail are not sending because of some mail server issues(eg insuffcent storage), Is there any fuction to handle this issues,Please advice me how to identify.
    Is there any other way apart from catching the "SMTPSendingFailedException"
    with Regards,
    Prakash Shanmugam

    ksp wrote:
    Now I have 2 more questions now
    1) When we use attach option in java mail API, the junck are displayed in our java server console, how to block this unwanted junck characters.What junk characters? Maybe you need to disable debugging or not log to the console, but to file or something.
    2) Is there any function to store the mail contant and send it automatically to the mail server, when the mail server gets ready.No, you will need to write that yourself.

  • Javax.mail.MessagingException: 451 Error while writing spool file??

    Hi all friends,
    Can any one plz tell me why Iam getting below error when Iam trying to send mail with attachment.Iam using Java Mail API.
    javax.mail.MessagingException: 451 Error while writing spool file
    Plz tell me what are the reasons behind it.
    Regards
    Bikash

    The problem here is that the SMTP server was unable to write its spool file.
    The error is probably on the OS side of things and has nothing to do with email except that the lack of the system resource is causing email to fail.
    Have the server admin take a look at his error log to find out why the the user that smtp is running as could not write the file.

Maybe you are looking for

  • Entourage no longer syncing with iCal..

    I deleted all my MS Office prefs due to an Excel issue. Entourage no longer syncs with iCal. I turned synching on in Entourage. In iSync "reset sync services" is grayed out.. help?

  • How to handle fieldnames ending with # in JDBC receiver?

    Hello Experts,   I am developing a scenario JDBC to IDOC. I have 2 tables for  header & line item. I have to retrieve a header record first using sender JDBC & then for that header need to fetch the corresponding lineitems from second table.     We c

  • Problem while creating user

    Hi We have installed a SAP Netweaver 2004s system on AIX box. We have installed the J2EE + ABAP Engine. While creating the user from the portal we get the following error: #1.5#1E656000400200710000008E000890AC00042D27C0FEBD4D#1175548671736#com.sap.se

  • Can I-Tunes cope with multiple I-Pods?

    Hi. I want to purchase another I-Pod (5G) but am concerned that if I do, the version of I-Tunes I have on my PC will be shared with the (2G) older version I have. My main worry is that if the I-Tunes works with the 2G machine today, will it work for

  • Why is my Informatica Repository Connect button is disabled?

    I am installing OBI Apps on Windows and am on section 4.15 when my problem started. I have created the Repository in Informatica however the Connect button is disabled. I checked the Informatica Service on the Services Control Panel and I find it sta