Simple list won't compile with -template=wholeclass

I have narrowed this down to a simple program:
#include <rw/cstring.h>
#include <list>
void dave()
std::list<RWCString> daveStr;
When I compile with:
CC -template=wholeclass -library=rwtools7_std -g -c Dave.cc
I get errors:
/opt/SUNWspro/WS6U2/include/CC/Cstd/./list.cc, line 351:Error:
Too many arguments in call to "std::list<RWCString, std::allocator<RWCString>>::
__adjacent_merge(std::list<RWCString, std::allocator<RWCString>>::iterator,
std::list<RWCString, std::allocator<RWCstring>>::iterator, std::list<RWCString,
std::allocator<RWCString>>::iterator)
/opt/SUNWspro/WS6U2/include/CC/Cstd/./list, line 465: Where: While instantiating
"std::list<RWCString, std::allocator<RWCString>>sort(bool(*)(const RWCString&,
const RWCString &))
/opt/SUNWSpro/WS6U2/include/CC/Cstd/./list, line 465: Where: Instantiated from
non-template code.
1 Error(s) detected.
The temporary work-around is to not use- template=wholeclass, but isn't
this something that should work. Has anyone else encountered this?

Hello There,
111685-0
I compiled your testcase on our machine that has 111685-04 patch
installed for C++ workshop 6 Update 2. I do not get any error message. It compiles fine.
% CC6u2 -V -template=wholeclass -library=rwtools7_std -g -c template.wholeclass.cpp
CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-04 2001/12/13
ccfe: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-04 2001/12/13
Please check your system if it requires to install patch.
....jagruti
Developers Technical Support
Sun Microsystems, http://www.sun.com/developers/support

Similar Messages

  • AIR app won't compile with custom icons

    My AIr app won't compile when I choose anything but the
    default icons. I created 4 pngs in Photoshop and it gives me the
    error: Useage error (incorrect arguments)
    Any help? I've tried using only 1 icon, all 4, and no icons.
    Only no icons works.

    You dont have to use the GUI to set it, you can use the air
    appliation XML.
    inside your air-app.xml file look for something like:
    <icon>
    <image128x128>icons/myIcon128.png</image128x128>
    <image48x48>icons/myIcon48.png</image48x48>
    <image32x32>icons/myIcon32.png</image32x32>
    <image16x16>icons/myIcon16.png</image16x16>
    </icon>
    if its not there add it, but replace the myIcon128.png with
    your 128 point png image etc.
    also the above assumes your icons are in a folder called
    "icons" in the same directory as your air file.
    Hope it helps.

  • Something simple which won't compile

    I downloaded the new beta, why won't the following code compile (copied from 1.5 in a nutshell)?
    Thanks
    import java.util.ArrayList;
    public class Test
         public static void main(String[] args)
              ArrayList<Integer> list =  new ArrayList<Integer>();
    javac -version Test.java
    javac 1.5.0-beta
    C:\Documents and Settings\HPPAV\Desktop\Test.java:7: '(' or '[' expected
              ArrayList<Integer> list =  new ArrayList<Integer>();
                                                            ^
    1 error

    Compile with -source 1.5

  • Strange behaviour of CC compiler with templates

    Hello!
    I have noticed a strange behaviour of CC compiler.
    The followint test-case compiles normally:
    #include <stdio.h>
    #include <complex>
    using namespace std;
    extern "C++" {
    template <class FLOAT> complex<FLOAT>
    cos (const complex<FLOAT>& x)
    return complex<FLOAT> (cos (real (x)) * cosh (imag (x)),
    - sin (real (x)) * sinh (imag (x)));
    int main(){
    return 0;
    But if you commenty string
    "using namespace std;" it gives error:
    /opt/ss11/SUNWspro/bin/CC test.cc
    "test.cc", line 8: Error: Templates can only declare classes or functions.
    "test.cc", line 14: Error: A declaration was expected instead of "}".
    2 Error(s) detected.
    make: *** [test.o] Error 2
    ----

    Class 'complex' is defined in the 'std' namespace. When you comment out 'using namespace std' compiler can't find definition of 'complex' and so treats function declaration as invalid construction. But I agree the error message is not quite clear.

  • My recent calls list won't work with iOS 7 update

    I downloaded my iOS 7 update but my recent calls don't show up anymore. My husband downloaded his update and he has recent calls and an edit at the top of his list but I have nothing. Did this happen to anyone else and how do I fix it?

    Try this help article here:
    Troubleshooting FaceTime & iMessage Activation: http://support.apple.com/kb/TS4268??

  • A simple list with seven time buckets starting from the date report is run.

    Hi All,
    I am new to ABAP.Recently i have planned to write a progam which will help in planning the delivery of scheduled items.For a given sales Org. it will display all the undelivered,delivered items in a simple list and sort them with delivery dates.it will also provide a summary report at material group.For that i have used selection screen(LIKP-VKORG-Obligatory).when i enter VKORG Details i should get all the delivery docs for which delivery is not done or partially done.For this i have taken one more table LIPS
    (LIPS-MATKL,LIPS-MATNR,LIPS-VBELN,LIPS-POSNR,LIPS-WERKS,LIPS-LFIMG,LIPS-MEINS) for tables LIKP and LIPS VBELN is the key field.when i enter VKORG Data in the selection screen ,how can i get the data from LIPS Table.Please explain?
    Also report should be simple list with seven time buckets starting from the date when the report is run.The amount of quantity to be delivered should be displayed under appropriate bucket i.e within the bucket where its delivery date falls in.for ex:If the report is run on Tuesday 15th march 2010 then the start date 1 should be starting date of the week which is Monday 14th March.
    The report will be summarized at Material Group and Material Number.
    Appreciate your help
    Thanks and Regards,
    Shakeer Hussain

    Sorry, sounds too much like a complete requirement you want done for you by the community.
    Please work on it yourself and search for available information before posting specific problems only.
    Thread locked.
    Thomas

  • Compilation problem with templates while using option -m64

    Hi,
    I have compilation problem with template while using option -m64.
    No problem while using option -m32.
    @ uname -a
    SunOS snt5010 5.10 Generic_127111-11 sun4v sparc SUNW,SPARC-Enterprise-T5220
    $ CC -V
    CC: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25
    Here is some C++ program
    ############# foo5.cpp #############
    template <typename T, T N, unsigned long S = sizeof(T) * 8>
    struct static_number_of_ones
    static const T m_value = static_number_of_ones<T, N, S - 1>::m_value >> 1;
    static const unsigned long m_count = static_number_of_ones<T, N, S - 1>::m_count + (static_number_of_ones<T, N, S - 1>::m_value & 0x1);
    template <typename T, T N>
    struct static_number_of_ones<T, N, 0>
    static const T m_value = N;
    static const unsigned long m_count = 0;
    template <typename T, T N>
    struct static_is_power_of_2
    static const bool m_result = (static_number_of_ones<T,N>::m_count == 1);
    template <unsigned long N>
    struct static_number_is_power_of_2
    static const bool m_result = (static_number_of_ones<unsigned long, N>::m_count == 1);
    int main(int argc)
    int ret = 0;
    if (argc > 1)
    ret += static_is_power_of_2<unsigned short, 16>::m_result;
    ret += static_is_power_of_2<unsigned int, 16>::m_result;
    ret += static_is_power_of_2<unsigned long, 16>::m_result;
    ret += static_number_is_power_of_2<16>::m_result;
    else
    ret += static_is_power_of_2<unsigned short, 17>::m_result;
    ret += static_is_power_of_2<unsigned int, 17>::m_result;
    ret += static_is_power_of_2<unsigned long, 17>::m_result;
    ret += static_number_is_power_of_2<17>::m_result;
    return ret;
    Compiation:
    @ CC -m32 foo5.cpp
    // No problem
    @ CC -m64 foo5.cpp
    "foo5.cpp", line 20: Error: An integer constant expression is required here.
    "foo5.cpp", line 36: Where: While specializing "static_is_power_of_2<unsigned long, 16>".
    "foo5.cpp", line 36: Where: Specialized in non-template code.
    "foo5.cpp", line 26: Error: An integer constant expression is required here.
    "foo5.cpp", line 37: Where: While specializing "static_number_is_power_of_2<16>".
    "foo5.cpp", line 37: Where: Specialized in non-template code.
    "foo5.cpp", line 20: Error: An integer constant expression is required here.
    "foo5.cpp", line 43: Where: While specializing "static_is_power_of_2<unsigned long, 17>".
    "foo5.cpp", line 43: Where: Specialized in non-template code.
    "foo5.cpp", line 26: Error: An integer constant expression is required here.
    "foo5.cpp", line 44: Where: While specializing "static_number_is_power_of_2<17>".
    "foo5.cpp", line 44: Where: Specialized in non-template code.
    4 Error(s) detected.
    Predefined macro:
    @ CC -m32 -xdumpmacros=defs foo5.cpp | & tee log32
    @ CC -m64 -xdumpmacros=defs foo5.cpp | & tee log64
    @ diff log32 log64
    7c7
    < #define __TIME__ "09:24:58"
    #define __TIME__ "09:25:38"20c20
    < #define __sparcv8plus 1
    #define __sparcv9 1[snipped]
    =========================
    What is wrong?
    Thanks,
    Alex Vinokur

    Bug 6749491 has been filed for this problem. It will be visible at [http://bugs.sun.com] in a day or two.
    If you have a service contract with Sun, you can ask to have this bug's priority raised, and get a pre-release version of a compiler patch that fixes the problem.
    Otherwise, you can check for new patches from time to time at
    [http://developers.sun.com/sunstudio/downloads/patches/]
    and see whether this bug is listed as fixed.

  • SunStudio 12 Fails to compile template function with template argument

    Hi
    Look at the code below:
    #include <iostream>
    template<class InIt, class OutIt>
    InIt copy_n(InIt first,  typename  std::iterator_traits<InIt>::difference_type  length, OutIt dest)
       for (;length--; ++dest, ++first)
          *dest = *first;
       return first;
    int main()
            char str1[]="Sumit";
            char str2[20];
            copy_n(str1,6,str2);
            std::cout << str2;
            return 0;
    }I have simplified this to pin point the problem, This code dosent compile with SunStudio12 C++ Compiler, (however this works fine on g++ and vc++). The problem is with second parameter
    typename std::iterator_traits<InIt>::difference_type  lengthinstead if we specify any simple type as below, it works fine
    int lengthSuns "http://developers.sun.com/sunstudio/documentation/ss12/whatsnew.html" says :
    Support for the following open-source libraries:
    BOOST http://www.boost.org
    The above code snippet is picked from "boost/boost_1_35_0/boost/interprocess/detail/algorithms.hpp" line number 65.
    Any Suggestions or work arounds??+
    The above Suns link also says:
    Complex expressions in template parameters.
    The compiler was previously unable to handle expressions in non-type template arguments in certain cases.
    I did not use any compilation flag, am I missing something?
    Edited by: sumitkumar on May 20, 2008 12:20 PM
    Edited by: sumitkumar on May 20, 2008 12:25 PM
    Edited by: sumitkumar on May 20, 2008 12:25 PM

    >
    Suns "http://developers.sun.com/sunstudio/documentation/ss12/whatsnew.html" says :
    Support for the following open-source libraries:
    BOOST http://www.boost.org
    Boost 1.34.1 should work OK. I haven't tried Boost 1.35 yet.
    The above code snippet is picked from "boost/boost_1_35_0/boost/interprocess/detail/algorithms.hpp" line number 65.
    Any Suggestions or work arounds??+
    The above Suns link also says:
    Complex expressions in template parameters.
    The compiler was previously unable to handle expressions in non-type template arguments in certain cases.
    I did not use any compilation flag, am I missing something?
    Make sure that you compile and link with -library=stlport4, otherwise you will be limited in the Boost libraries that you will be able to use.
    Paul

  • Issues with Simple Lists in service requests

    We are using Service Manager 2012 and have run into a problem with simple lists within the service requests we created.  We believe the issues started after we upgraded to Service Manager SP1 and Silverlight 5.1.  What happens is you can select
    one of the options in the simple list, but if you decide to change back to the original option, the system won't allow it.  In the case where there might be three options in the simple list (i.e. New, Change, Delete), you can select each one once, but
    if we try to change it back to any of the other options the system won't allow it.  We tested all of this before going live and everything was working, but just before we went live SP1 came out and so we elected to upgrade to it first.  We then needed
    to upgrade to Silverlight SP1 to work with Service Manager SP1.  We retested all of our service requests again just before going live, but didn't think we needed to go through every simple list so we didn't retest this.  Since then the simple lists
    are problematic.  Has anyone else experienced this and if so is there a fix that will correct this issue?

    Yes!
    We submitted a business impact statement back in February and after pushing them on a weekly basis, we finally received word that we will be receiving a hot fix next week.  Until we actually receive the hot fix and confirm that it works, I will wait
    to post another update on this.
    With that said, they came up with a temporary workaround about 2-3 weeks ago.  This is the message regarding the temporary fix that we received from the engineer that has been working on the issue:
    After doing code review I identified the regression was introduced in the binaries that are included as part of this Silverlight XAP file:
    RequestOfferingSilverlightModule.xap. As we discussed on the phone going back to the pre SP1 version means you will lose any enhancements/fixes that were introduced in SP1. Looking at the Change history for this module I only see two changes
    that were introduced in SP1 and those changes are as follows:
    The text field control only shows the first three lines.
    Hierarchical support for List Items in Portal
    To confirm my findings I replaced this XAP file with a pre SP1 version and I couldn’t repro the issue in my lab. I also confirmed implementing this module I lose the
    above fixes that were introduced in Sp1.
    To implement the workaround, please follow the below steps:
    Connect to the Web Content Server,  locate the following directory:
    C:\inetpub\wwwroot\System Center Service Manager Portal\ContentHost\Clientbin
    Rename the following file RequestOfferingSilverlightModule.xap
    to RequestOfferingSilverlightModule.xap.org
    Copy the attached file RequestOfferingSilverlightModule.xap to the folder:
    C:\inetpub\wwwroot\System Center Service Manager Portal\ContentHost\Clientbin
    Restart IIS by issuing the following command at the command prompt:
    iisreset
    Clear the client side cache and see if you can reproduce the issue.
    Once confirmed the issue doesn’t reproduce, please proceed with testing all scenarios that make use of the Self Service Portal.
    If you don't have the pre SP1 version of the file I'm sure you can get it from Microsoft.  We are not using hierarchical lists so the temporary fix is currently working for us without any issues.

  • Example code for java compiler with a simple GUI

    There is no question here (though discussion of the code is welcome).
    /* Update 1 */
    Now available as a stand alone or webstart app.! The STBC (see the web page*) has its own web page and has been improved to allow the user to browse to a tools.jar if one is not found on the runtime classpath, or in the JRE running the code.
    * See [http://pscode.org/stbc/].
    /* End: Update 1 */
    This simple example of using the JavaCompiler made available in Java 1.6 might be of use to check that your SSCCE is actually what it claims to be!
    If an SSCCE claims to display a runtime problem, it should compile cleanly when pasted into the text area above the Compile button. For a compilation problem, the code should show the same output errors seen in your own editor (at least until the last line of the output in the text area).
    import java.awt.BorderLayout;
    import java.awt.Font;
    import java.awt.EventQueue;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JLabel;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.JButton;
    import javax.swing.SwingWorker;
    import javax.swing.border.EmptyBorder;
    import java.util.ArrayList;
    import java.net.URI;
    import java.io.ByteArrayOutputStream;
    import java.io.OutputStreamWriter;
    import javax.tools.ToolProvider;
    import javax.tools.JavaCompiler;
    import javax.tools.SimpleJavaFileObject;
    /** A simple Java compiler with a GUI.  Java 1.6+.
    @author Andrew Thompson
    @version 2008-06-13
    public class GuiCompiler extends JPanel {
      /** Instance of the compiler used for all compilations. */
      JavaCompiler compiler;
      /** The name of the public class.  For 'HelloWorld.java',
      this would be 'HelloWorld'. */
      JTextField name;
      /** The source code to be compiled. */
      JTextArea sourceCode;
      /** Errors and messages from the compiler. */
      JTextArea output;
      JButton compile;
      static int pad = 5;
      GuiCompiler() {
        super( new BorderLayout(pad,pad) );
        setBorder( new EmptyBorder(7,4,7,4) );
      /** A worker to perform each compilation. Disables
      the GUI input elements during the work. */
      class SourceCompilation extends SwingWorker<String, Object> {
        @Override
        public String doInBackground() {
          return compileCode();
        @Override
        protected void done() {
          try {
            enableComponents(true);
          } catch (Exception ignore) {
      /** Construct the GUI. */
      public void initGui() {
        JPanel input = new JPanel( new BorderLayout(pad,pad) );
        Font outputFont = new Font("Monospaced",Font.PLAIN,12);
        sourceCode = new JTextArea("Paste code here..", 15, 60);
        sourceCode.setFont( outputFont );
        input.add( new JScrollPane( sourceCode ),
          BorderLayout.CENTER );
        sourceCode.select(0,sourceCode.getText().length());
        JPanel namePanel = new JPanel(new BorderLayout(pad,pad));
        name = new JTextField(15);
        name.setToolTipText("Name of the public class");
        namePanel.add( name, BorderLayout.CENTER );
        namePanel.add( new JLabel("Class name"), BorderLayout.WEST );
        input.add( namePanel, BorderLayout.NORTH );
        compile = new JButton( "Compile" );
        compile.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
              (new SourceCompilation()).execute();
        input.add( compile, BorderLayout.SOUTH );
        this.add( input, BorderLayout.CENTER );
        output = new JTextArea("", 5, 40);
        output.setFont( outputFont );
        output.setEditable(false);
        this.add( new JScrollPane( output ), BorderLayout.SOUTH );
      /** Compile the code in the source input area. */
      public String compileCode() {
        output.setText( "Compiling.." );
        enableComponents(false);
        String compResult = null;
        if (compiler==null) {
          compiler = ToolProvider.getSystemJavaCompiler();
        if ( compiler!=null ) {
          String code = sourceCode.getText();
          String sourceName = name.getText().trim();
          if ( sourceName.toLowerCase().endsWith(".java") ) {
            sourceName = sourceName.substring(
              0,sourceName.length()-5 );
          JavaSourceFromString javaString = new JavaSourceFromString(
            sourceName,
            code);
          ArrayList<JavaSourceFromString> al =
            new ArrayList<JavaSourceFromString>();
          al.add( javaString );
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          OutputStreamWriter osw = new OutputStreamWriter( baos );
          JavaCompiler.CompilationTask task = compiler.getTask(
            osw,
            null,
            null,
            null,
            null,
            al);
          boolean success = task.call();
          output.setText( baos.toString().replaceAll("\t", "  ") );
          compResult = "Compiled without errors: " + success;
          output.append( compResult );
          output.setCaretPosition(0);
        } else {
          output.setText( "No compilation possible - sorry!" );
          JOptionPane.showMessageDialog(this,
            "No compiler is available to this runtime!",
            "Compiler not found",
            JOptionPane.ERROR_MESSAGE
          System.exit(-1);
        return compResult;
      /** Set the main GUI input components enabled
      according to the enable flag. */
      public void enableComponents(boolean enable) {
        compile.setEnabled(enable);
        name.setEnabled(enable);
        sourceCode.setEnabled(enable);
      public static void main(String[] args) throws Exception {
        Runnable r = new Runnable() {
          public void run() {
            JFrame f = new JFrame("SSCCE text based compiler");
            f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            GuiCompiler compilerPane = new GuiCompiler();
            compilerPane.initGui();
            f.getContentPane().add(compilerPane);
            f.pack();
            f.setMinimumSize( f.getSize() );
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        EventQueue.invokeLater(r);
    * A file object used to represent source coming from a string.
    * This example is from the JavaDocs for JavaCompiler.
    class JavaSourceFromString extends SimpleJavaFileObject {
      * The source code of this "file".
      final String code;
      * Constructs a new JavaSourceFromString.
      * @param name the name of the compilation unit represented
        by this file object
      * @param code the source code for the compilation unit
        represented by this file object
      JavaSourceFromString(String name, String code) {
        super(URI.create(
          "string:///" +
          name.replace('.','/') +
          Kind.SOURCE.extension),
          Kind.SOURCE);
        this.code = code;
      @Override
      public CharSequence getCharContent(boolean ignoreEncodingErrors) {
        return code;
    }Edit 1:
    Added..
            f.setMinimumSize( f.getSize() );Edited by: AndrewThompson64 on Jun 13, 2008 12:24 PM
    Edited by: AndrewThompson64 on Jun 23, 2008 5:54 AM

    kevjava wrote: Some things that I think would be useful:
    Suggestions reordered to suit my reply..
    kevjava wrote: 2. Line numbering, and/or a line counter so you can see how much scrolling you're going to be imposing on the forum readers.
    Good idea, and since the line count is only a handful of lines of code to implement, I took that option. See the [line count|http://pscode.org/stbc/help.html#linecount] section of the (new) [STBC Help|http://pscode.org/stbc/help.html] page for more details. (Insert plaintiff whining about the arbitrary limits set - here).
    I considered adding line length checking, but the [Text Width Checker|http://pscode.org/twc/] ('sold separately') already has that covered, and I would prefer to keep this tool more specific to compilation, which leads me to..
    kevjava wrote: 1. A button to run the code, to see that it demonstrates the problem that you wish for the forum to solve...
    Interesting idea, but I think that is better suited to a more full blown (but still relatively simple) GUId compiler. I am not fully decided that running a class is unsuited to STBC, but I am more likely to implement a clickable list of compilation errors, than a 'run' button.
    On the other hand I am thinking the clickable error list is also better suited to an altogether more abled compiler, so don't hold your breath to see either in the STBC.
    You might note I have not bothered to update the screenshots to show the line count label. That is because I am still considering error lists and running code, and open to further suggestion (not because I am just slack!). If the screenshots update to include the line count but nothing else, take that as a sign. ;-)
    Thanks for your ideas. The line count alone is worth a few Dukes.

  • [svn] 3246: Fix fasttrack bug SDK-16910 - Simple List populated with strings throws RTE .

    Revision: 3246
    Author: [email protected]
    Date: 2008-09-17 15:31:25 -0700 (Wed, 17 Sep 2008)
    Log Message:
    Fix fasttrack bug SDK-16910 - Simple List populated with strings throws RTE. This is fallout from the Group/DataGroup split. DefaultItemRenderer now uses a TextBox instead of a Group to show the list data.
    QE: Any List tests that depended on the default item renderer to support anything other than text must be updated.
    Bugs: SDK-16910
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-16910
    http://bugs.adobe.com/jira/browse/SDK-16910
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/DefaultItemRenderer.mxml

    BTW, I do not experience the bug you had mentioned at
    http://www.cs.rit.edu/~cxb0025/flex/TreeControlBugs.html
    Can submit a video of my actions recorded

  • Email simple list with formating

    I wanted to email formated o/p of simple list..
    thanks

    Hope the below code helps you.
    *& Report  ZMUB_EMAIL_TEST                                             *
    REPORT  ZMUB_EMAIL_TEST                         .
    INCLUDE zmubinc_email.
    * DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    * SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case.
    PARAMETERS : p_file LIKE rlgrap-filename OBLIGATORY.
    * AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CLEAR p_file.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = p_file.
    * START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM ml_customize USING 'Tst' 'Testing'.
      PERFORM ml_addrecp USING receiver 'U'.
      PERFORM upl.
      PERFORM doconv TABLES itab objbin.
      PERFORM ml_prepare USING 'X' extension name.
      PERFORM ml_dosend.
      SUBMIT rsconn01 WITH mode EQ 'INT' AND RETURN.
    * FORM
    FORM upl.
      file_name = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = file_name
          filetype                = 'BIN'
        TABLES
          data_tab                = itab
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
        path = file_name.
        CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
          EXPORTING
            complete_filename = path
    *   CHECK_DOS_FORMAT =
          IMPORTING
    *   DRIVE =
            EXTENSION = extension
            NAME = name
    *   NAME_WITH_EXT =
    *   PATH =
          EXCEPTIONS
            INVALID_DRIVE = 1
            INVALID_EXTENSION = 2
            INVALID_NAME = 3
            INVALID_PATH = 4
            OTHERS = 5  .
    ENDFORM. "upl
    *&  Include           ZMUBINC_EMAIL                                    *
    * Data
    DATA: docdata LIKE sodocchgi1,
          objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
          objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
          objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
          objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
          objhex LIKE solix OCCURS 10 WITH HEADER LINE,
          reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
          doc_size TYPE i,
          att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    * FORM
    FORM ml_customize USING objname objdesc.
    *----------- Clear Variables
      CLEAR docdata.
      REFRESH objpack.
      CLEAR objpack.
      REFRESH objhead.
      REFRESH objtxt.
      CLEAR objtxt.
      REFRESH objbin.
      CLEAR objbin.
      REFRESH objhex.
      CLEAR objhex.
      REFRESH reclist.
      CLEAR reclist.
      REFRESH listobject.
      CLEAR listobject.
      CLEAR tab_lines.
      CLEAR doc_size.
      CLEAR att_type.
    *  --------- Set Variables
      docdata-obj_name = objname.
      docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    * FORM
    FORM ml_addrecp USING preceiver prec_type.
      CLEAR reclist.
      reclist-receiver = preceiver.
      reclist-rec_type = prec_type.
      APPEND reclist.
    ENDFORM. "ml_customize
    * FORM
    FORM ml_addtxt USING ptxt.
      CLEAR objtxt.
      objtxt = ptxt.
      APPEND objtxt.
    ENDFORM. "ml_customize
    * FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
      IF bypassmemory = ''.
    *--------- Fetch List From Memory
        CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
        listobject = listobject
        EXCEPTIONS
        OTHERS = 1.
        IF sy-subrc <> 0.
        MESSAGE ID '61' TYPE 'E' NUMBER '731'
        WITH 'LIST_FROM_MEMORY'.
        ENDIF.
        CALL FUNCTION 'TABLE_COMPRESS'
    *     IMPORTING
    *     COMPRESSED_SIZE =
        TABLES
        in = listobject
        out = objbin
        EXCEPTIONS
        OTHERS = 1
        IF sy-subrc <> 0.
        MESSAGE ID '61' TYPE 'E' NUMBER '731'
        WITH 'TABLE_COMPRESS'.
        ENDIF.
      ENDIF.
    * Header Data
    * Already Done Thru FM
    * Main Text
    * Already Done Thru FM
    * Packing Info For Text Data
      DESCRIBE TABLE objtxt LINES tab_lines.
      READ TABLE objtxt INDEX tab_lines.
      docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
      CLEAR objpack-transf_bin.
      objpack-head_start = 1.
      objpack-head_num = 0.
      objpack-body_start = 1.
      objpack-body_num = tab_lines.
      objpack-doc_type = 'TXT'.
      APPEND objpack.
    * Packing Info Attachment
      att_type = whatatt_type..
      DESCRIBE TABLE objbin LINES tab_lines.
      READ TABLE objbin INDEX tab_lines.
      objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
      objpack-transf_bin = 'X'.
      objpack-head_start = 1.
      objpack-head_num = 0.
      objpack-body_start = 1.
      objpack-body_num = tab_lines.
      objpack-doc_type = att_type.
      objpack-obj_name = 'ATTACHMENT'.
      objpack-obj_descr = whatname.
      APPEND objpack.
    * Receiver List
    * Already done thru fm
    ENDFORM. "ml_prepare
    * FORM
    FORM ml_dosend.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data = docdata
          put_in_outbox = 'X'
          commit_work = 'X' "used from rel. 6.10
    *   IMPORTING
    *   SENT_TO_ALL =
    *   NEW_OBJECT_ID =
        TABLES
          packing_list = objpack
          object_header = objhead
          contents_bin = objbin
          contents_txt = objtxt
    *   CONTENTS_HEX = objhex
    *   OBJECT_PARA =
    *   object_parb =
          receivers = reclist
          EXCEPTIONS
          too_many_receivers = 1
          document_not_sent = 2
          document_type_not_exist = 3
          operation_no_authorization = 4
          parameter_error = 5
          x_error = 6
          enqueue_error = 7
          OTHERS = 8  .
      IF sy-subrc <> 0.
        MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
        WITH docdata-obj_name.
      ENDIF.
    ENDFORM. "ml_customize
    * FORM
    FORM ml_spooltopdf USING whatspoolid.
      DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    *  -------------- Call Function
      CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid = whatspoolid
        TABLES
          pdf = pdf
        EXCEPTIONS
          err_no_otf_spooljob = 1
          OTHERS = 12.
    *  ------------- Convert
      PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    * FORM
    FORM doconv TABLES
      mypdf STRUCTURE tline
      outbin STRUCTURE solisti1.
    *  -------- Data
      DATA : pos TYPE i.
      DATA : len TYPE i.
    *  ------------ Loop And Put Data
      LOOP AT mypdf.
        pos = 255 - len.
        IF pos > 134. "length of pdf_table
        pos = 134.
        ENDIF.
        outbin+len = mypdf(pos).
        len = len + pos.
        IF len = 255. "length of out (contents_bin)
        APPEND outbin.
        CLEAR: outbin, len.
        IF pos < 134.
        outbin = mypdf+pos.
        len = 134 - pos.
        ENDIF.
        ENDIF.
      ENDLOOP.
      IF len > 0.
        APPEND outbin.
      ENDIF.
    ENDFORM. "doconv
    Above program fetches data from a file into internal
    table, format and send it in a mail.
    Instead you can directly use from the step after upload.
    Kind Regards
    Eswar

  • HT1937 Hi . I am using a carrier that is not listed in my country which is Saudi Arabia and I'm using Mobily line it won't work with me ..what should I do ?

    Hi . I am using a carrier that is not listed in my country which is Saudi Arabia and I'm using Mobily line it won't work with me ..what should I do ?

    Contact that carrier's technical support people.  It sounds like your issue is with that specific carrier, so only they will be able to help you make a particular device work on their network.
    P.S. if you mean you bought a phone from Mobily and are trying to use it with another carrier, you cannot.  A mobily phone will be locked to mobily, and according to Apple's list, they do not offer unlocking of their iPhones (http://support.apple.com/kb/ht1937).

  • SSIS Data Flow task using SharePoint List Adapter Setting SiteUrl won't work with an expression

    Hi,
    I'm trying to populate the SiteUrl from a variable that has been set based on a query to a SQL table that has a URL field.  Here are the steps I've taken and the result.
    Created a table with a url in it to reference a SharePoint Task List.
    Created a Execute SQL Task to grab the url putting the result set in a variable called SharePointUrl
    Created a For Each container and within the collection I use the SharePointUrl as the ADO object source variable and select rows in the first table.
    Still in the For Each container within the Variable mappings I have another Package Variable called PassSiteUrl2 and I set that to Index 0 or the value of the result set.
    I created a script task to then display the PassSiteUrl2 variable and it works great I see my url
    This is where it starts to suck eggs!!!!
    I insert a Data Flow Task into my foreach loop.
    I Insert a SharePoint List Adapter into my Data Flow
    Within my SharePoint List Adapter I set my list to be "Tasks", My list view to be "All Tasks" and then I set the url to be another SharePoint site that has a task list just so there is some default value to start with.
    Now within my Data Flow I create an expression and set the [SharePoint List Source].[SiteUrl] equal to my variable @[User::PassSiteUrl2].
    I save everything and run my SSIS package and it overlays the default [SharePoint List Source].[SiteUrl] with blanks in the SharePoint List Adapter then throws the error that its missing a url
    So here is my question.  Why if my package variable displays fine in my Control Flow is it now not seen or seen as blanks in the Data Flow Expression.  Anyone have any ideas???
    Thanks
    Donald R. Landry

    Thanks Arthur,
    The scope of the variable is at a package level and when I check to see if it can be moved Package level is the highest level.  The evaluateasexpression property is set to True.  Any other ideas?
    I also tried to do the following.  Take the variable that has the URL in it and just assign it to the description of the data flow task to see if it would show up there (the idea being the value of my @[User::PassSiteUrl] should just show in the
    description field when the package is run. That also shows up blank. 
    So i'm thinking its my expression.  All I do in the expression is set [SharePoint List Source].[SiteUrl] equal to @[User::PassSiteUrl] by dragging and dropping the variable into the expression box.  Maybe the expression should be something
    else or is their a way to say  @[User::PassSiteUrl] = Dts.Variables("User::PassSiteUrl2").Value.ToString() 
    In my script task I use Dts.Variables("User::PassSiteUrl2").Value.ToString() to display
    the value in the message box and that works fine.
    Donald R. Landry

  • Java 6u24 won't launch signed JNLP app with classes compiled with JDK 1.4.2

    Anyone else having a problem launching a JNLP app compiled with Java 1.4 using Java 6u24 on the client? Anyone have a Java 1.4-compiled app that does launch with Java 6u24?
    I am, and I have isolated the problem to some change in 6u24's java web start launching logic. The splash screen appears and then javaws just quits with no error. Trace shows it is not getting past checking of the first .jar. My JNLP app, fully signed with CA-issued certificate, when compiled with Java 1.4.2 will not launch on JRE 6u24 (or 6u25-b03). The same exact app launches perfectly fine when it is compiled with JDK 1.5 or 1.6. It is not a signing problem, though it is related to certificate checking logic or a concurrency flaw in javaws' AppPolicy and TrustDecider classes. It is not a host server or network problem as those have been varied with same results. It is not a specific .jar problem as I have varied what is the first .jar with same results. I have eliminated all other variables to find the only difference is what Java version the app is compiled with. Well, all but one other variable - I have not tried with apps other than mine.
    My app is compiled with JDK 1.4.2 so I can still support older platforms. That requirement is going away soon but this is still a regression from 6u23 that is causing a big problem for at least this developer.

    You can try to use the version of the jarsigner JDK 1.5 or later.
    Has changed the management of files in META-INF.
    So compile with 1.4 but sign with 1.5 or later

Maybe you are looking for