C++ STL library error: Non-const function ... called for const object

Hello,
I'm using the Forte Developer 6 Update 2 C++ compiler and standard library on Solaris 9 SPARC. I've installed the recommended patch set for C++ (both the workshop and platform patches).
In my code, I have a STL set with some elements that I want to modify, say:
typedef set<SomeClass> MySet;
typedef MySet::iterator MySetIter;
I'm trying to look for an element, then update some of its fields:
MySet theSet;
SomeClass sci;
MySetIter it = theSet.find(sci);
if (it != theSet.end()) {
it->update_some_fields();
The above code fails with the following error (some details scrapped):
Error: Non-const function SomeClass::update_some_fields() called for const object
Which is weird, since set::find() seems to return a set<...>::iterator, not a set<...>::const_iterator!
If I try a workaround, like this:
if (it != theSet.end()) {
SomeClass &tmp = *it;
tmp->update_some_fields();
I get this other error:
Initializing SomeClass& requires an lvalue.
Is there some way to convince the Forte compiler to work around this situation (most likely a compiler / library bug)?

This was fixed, too, by replacing the set with a map. It seems that the issue was related to the fact that any change made to a set member is supposed to not modify the elements that make up the key (the elements that are used in the comparison function to determine the ordering). The Windows (dinkumware) implementation of the STL allows set modifications, though I don't know how they check that the key fields are not modified. The Solaris implementation (and the GNU implementation, too) disallows any modifications made to set members. At least that's what a person more knowledgeable of C++ in our office found out. So I don't think the issue was related to template constructors or any unimplemented features after all.

Similar Messages

  • Error "pure virtual function call"

    Hi,
    Windows7, PCI-GPIB, NI-488.2 Version 3.1.1, Visual Studio 2010 C++ Application.
    Randomly between 10 minuntes and 4 hours I get the error "pure virtual function call"
    With the debbuger attached to the process in error I identified NI4882.dll as the source of the error.
    Then I deinstalled NI-488.2 Version 3.1.1 and installed NI488.2 July 2000. Then my application runs without any error!
    I tried to attach the source files which represents the interface between my application and the NI-4882 driver but it did not work for the C++ file.
    Any help appreciated.
    Best Regards
    Walter
    Attachments:
    _GPIB.h ‏4 KB

    Part 2:
    Int TGpib::Open (UShort adr, ULong timeoutMs)
    if (mDevices.empty ())
    Reset ();
    Int ud = ibdev (mBoardID, adr, 0, TimeoutCode (timeoutMs), 1, 0);
    if (ud < 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("open device '%d' failed"), adr);
    GPIBError (-1, FCTX, true);
    return -1;
    SDevInfo devInf;
    devInf.mGpibAdr = adr;
    mDevices[ud] = devInf;
    if (!DeviceClear (ud))
    MCTraceLib (this, eTraceError, TFCTX, _T("no device on address '%d'"), adr);
    GPIBError (ud, FCTX, true);
    Close (ud);
    return -1;
    if (Send (ud, "*IDN?"))
    Tstring s = String2Tstring (Enter (ud));
    StringList l = Split (s, _T(','));
    if (l.size () == 4)
    mDevices[ud].mVendorName = l[0];
    mDevices[ud].mModelName = l[1];
    else
    MCTraceLib (this, eTraceError, TFCTX, _T("no device on address '%d'"), adr);
    GPIBError (ud, FCTX, true);
    Close (ud);
    return -1;
    Local (ud);
    return ud;
    bool TGpib::Close (Int ud)
    GPIBDevMap::iterator it = mDevices.find (ud);
    if (it != mDevices.end ())
    Local (ud);
    Int stat = ibonl (ud, 0);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("close device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    mDevices.erase (it);
    return true;
    return false;
    bool TGpib::SetTimeout (Int ud, ULong timeoutMs)
    Int stat = ibtmo (ud, TimeoutCode (timeoutMs));
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("set timeout device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    return true;
    ULong TGpib::Timeout ()
    return mTimeout;
    bool TGpib::EnableSRQ (Int ud, HANDLE srqEvent)
    if (srqEvent != INVALID_HANDLE_VALUE)
    GPIBDevMap::iterator it = mDevices.find (ud);
    if (it != mDevices.end ())
    (it->second).mSRQEvent = srqEvent;
    Int stat = ibnotify (mBoardID, SRQI, GpibSRQ, (void*)this);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    MCTraceLib (this, eTraceDebug, TFCTX, _T("(SRQ)on device ud = '%d' success"), ud);
    return true;
    else
    MCTraceLib (this, eTraceError, TFCTX, _T("srqEvent == INVALID_HANDLE_VALUE"));
    return false;
    bool TGpib::DisableSRQ (Int /*ud*/)
    return true;
    bool TGpib::Remote (Int ud)
    Int adr;
    ibask (ud, IbaPAD, &adr);
    adr += 32; // Talk Address = Listen Address + 32
    char cmdbuf[] = {MTA0, 0, LLO, UNT, UNL};
    cmdbuf[1] = char(adr);
    Int stat = ibcmd (mBoardID, &cmdbuf, 5);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    mDevices[ud].mRemote = true;
    return true;
    bool TGpib::Local (Int ud)
    mDevices[ud].mRemote = false;
    Int stat = ibloc (ud);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    return true;
    char TGpib::SerialPoll (Int ud)
    char pollChr;
    Int stat = ibrsp (ud, &pollChr);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    return static_cast<char> (pollChr & 0x9F); // VM QueryError eliminieren
    bool TGpib::DeviceClear (Int ud)
    Int stat = ibclr (ud);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    return true;
    bool TGpib::Trigger (Int ud)
    Int stat = ibtrg (ud);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    return true;
    bool TGpib::Send (Int ud, const std::string& str)
    Int stat = ibeot (ud, 1);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("'EOI on' on ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    stat = ibwrt (ud, (void*)str.c_str (), str.length ());
    Long sent = ThreadIbcntl ();
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    if (sent != static_cast<Long> (str.length ()))
    MCTraceLib (this, eTraceError, TFCTX, _T("only %d of %d characters sent"), sent, str.length ());
    return false;
    return true;
    bool TGpib::SendNoEOI (Int ud, const std::string& str)
    Int stat = ibeot (ud, 0);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("'EOI off' on ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    stat = ibwrt (ud, (void*)str.c_str (), str.length ());
    Long sent = ThreadIbcntl ();
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    if (sent != static_cast<Long> (str.length ()))
    MCTraceLib (this, eTraceError, TFCTX, _T("only %d of %d characters sent"), sent, str.length ());
    return false;
    return true;
    std::string TGpib::Enter (Int ud)
    std::string str = "";
    char* buf = new char[2048];
    Int stat = ibrd (ud, (void*)buf, 2047);
    Long got = ThreadIbcntl ();
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    else
    buf[got] = '\0';
    str = buf;
    // eventuelle LF und CR vom Ende entfernen!
    string::size_type idx = str.find_last_of (k_CR);
    str = str.substr (0, idx);
    idx = str.find_last_of (k_LF);
    str = str.substr (0, idx);
    delete[] buf;
    return str;

  • Intermittent Runtime error - pure virtual function call

    I have an intermittent runtime error - pure virtual function call & don't know what cause it? Since It only occurs & crashes once awhile therefore it's difficult to trap it for debugging.I suspect it come from TestStand ActiveX API which I use in my User Interface Application project but I'm not really sure.
    Does anyone experience this kind of problem when working with TestStand API ? If so any
    suggestion? I have noticed in the TestStand API header file teapi.tlh contain many raw_.... function defined as pure virtual function. What are these raw_... function ? I don't think I use any of these function in my project.
    Many thanks!

    Danh,
    I don't believe that your problem can be solved with the information you have provided unless someone else has experienced the same symtpoms which coincidentally have the same cause as in your case.
    Is there any other information you can provide that can help localize the problem?
    1) What is happening when the error occurs?
    2) Does the error always occur in the same place?
    3) Does it always occur with use of certain resources (e.g. DAQ, GPIB, VISA, printer)?
    4) Does it occur when using the sequence editor?
    5) Does it occur when using one of the shipping operator interfaces?
    6) Does it occur only when using your operator interfaces?
    7)Is it related to a specific sequence or any sequence?
    8) Does it happen when you executed your sequence with/without a process model entr
    y point (i.e. Execute>>Test UUTs, Execute>>Singal Pass or Execute>>Run MainSequence)?
    9) How often does it happen?
    10) What version of TestStand are you using?
    11) With what language (include versions) are you programming your code modules?
    12) With what language (include versions) are you programming your operator interface?
    13) Is there any error code reported with this error message?
    14) Is this error reported in a TS run-time error dialog or is it reported directly 1by the operating system?
    15) Have you searched the web for related errors? For example, the following link describes a particular programming mistake that can lead to this error
    http://support.microsoft.com/support/kb/articles/Q125/7/49.asp
    By investigating answers to the above questions you may be able to narrow the cause of this error, which might allow you or others to help solve the problem.

  • Error ERR-9131 Error in PLSQL function body for item default code, item=P24

    Hi All,
    Am getting the below error in my page 24
    ORA-01403: no data found
    Error ERR-9131 Error in PLSQL function body for item default code, item=P24_REQ_BY_ID
    OK
    I dont know what to do?:(
    Suddenly am getting this error in the page.
    Can anyone help me to understand why this error is coming?
    Thanks & Regards,
    Ramya
    Edited by: 901942 on Jan 29, 2012 10:16 PM

    Data stored in these tables is different. If Oracle says that there's no record that satisfies the WHERE condition, why do you think that it lies? It is too stupid to do that.
    Therefore, you need to handle the exception. There are several ways to do it. Here are some of them.
    The first one is the most obvious - EXCEPTION handling section.
    DECLARE
      default_value VARCHAR2(100);
    BEGIN
      SELECT ISID INTO default_value
        FROM USER_TBL
        WHERE UPPER(ISID) = UPPER(:APP_USER);
      RETURN default_value;
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        RETURN (null);  -- or whatever you find appropriate
    END;Another one is to use aggregate function (MAX is a good choice) as it won't return NO-DATA-FOUND, but NULL:
    DECLARE
      default_value VARCHAR2(100);
    BEGIN
      SELECT MAX(ISID) INTO default_value
        FROM USER_TBL
        WHERE UPPER(ISID) = UPPER(:APP_USER);
      RETURN default_value;
    END;

  • XML log: Error during temp file creation for LOB Objects

    Hi All,
    I got this exception in the concurrent log file:
    [122010_100220171][][EXCEPTION] !!Error during temp file creation for LOB Objects
    [122010_100220172][][EXCEPTION] java.io.FileNotFoundException: null/xdo-dt-lob-1292864540169.tmp (No such file or directory (errno:2))
         at java.io.RandomAccessFile.open(Native Method)
         at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
         at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)
         at oracle.apps.xdo.dataengine.LOBList.initLOB(LOBList.java:39)
         at oracle.apps.xdo.dataengine.LOBList.<init>(LOBList.java:30)
         at oracle.apps.xdo.dataengine.XMLPGEN.updateMetaData(XMLPGEN.java:1051)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:511)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:445)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroup(XMLPGEN.java:1121)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroup(XMLPGEN.java:1144)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:558)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:445)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:308)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    I have this query defined in my data template:
    <![CDATA[
    SELECT lt.long_text inv_comment
    FROM apps.fnd_attached_docs_form_vl ad,
    apps.fnd_documents_long_text lt
    WHERE ad.media_id = lt.media_id
    AND ad.category_description = 'Draft Invoice Comments'
    AND ad.pk1_value = :project_id
    AND ad.pk2_value = :draft_invoice_num
    ]]>
    Issue: The inv_comment is not printing on the PDF output.
    I had the temp directory defined under the Admin tab.
    I'm guessing if it's the LONG datatype of the long_text field that's causing the issue.
    Anybody knows how this can be fixed? any help or advice is appreciated.
    Thanks.
    SW
    Edited by: user12152845 on Dec 20, 2010 11:48 AM

    Hi All,
    I got this exception in the concurrent log file:
    [122010_100220171][][EXCEPTION] !!Error during temp file creation for LOB Objects
    [122010_100220172][][EXCEPTION] java.io.FileNotFoundException: null/xdo-dt-lob-1292864540169.tmp (No such file or directory (errno:2))
         at java.io.RandomAccessFile.open(Native Method)
         at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
         at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)
         at oracle.apps.xdo.dataengine.LOBList.initLOB(LOBList.java:39)
         at oracle.apps.xdo.dataengine.LOBList.<init>(LOBList.java:30)
         at oracle.apps.xdo.dataengine.XMLPGEN.updateMetaData(XMLPGEN.java:1051)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:511)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:445)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroup(XMLPGEN.java:1121)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroup(XMLPGEN.java:1144)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:558)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:445)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:308)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    I have this query defined in my data template:
    <![CDATA[
    SELECT lt.long_text inv_comment
    FROM apps.fnd_attached_docs_form_vl ad,
    apps.fnd_documents_long_text lt
    WHERE ad.media_id = lt.media_id
    AND ad.category_description = 'Draft Invoice Comments'
    AND ad.pk1_value = :project_id
    AND ad.pk2_value = :draft_invoice_num
    ]]>
    Issue: The inv_comment is not printing on the PDF output.
    I had the temp directory defined under the Admin tab.
    I'm guessing if it's the LONG datatype of the long_text field that's causing the issue.
    Anybody knows how this can be fixed? any help or advice is appreciated.
    Thanks.
    SW
    Edited by: user12152845 on Dec 20, 2010 11:48 AM

  • Error 0x80040707 - DLL function call crashed QTInstallCode

    Installing QuickTime Stand-Alone QuickTimeInstaller.exe Version 7.0.4.0 I get the following error and QuickTime will not load or function:
    Unhandled Exception
    Error Number: 0x80040707 - DLL function call crashed: QTInstallCode.QuickTimePostInstallProc
    Setup will now terminate.

    I was able to solve this, but I had to uninstall all instances of iTunes, ipod and QuickTime, delete their directories, use http://support.microsoft.com/kb/290301/
    to delete the installations of each and then use msconfig to remove them from the Startup.
    After that I rebooted and did a new install with the QuickTime Stand Alone and it worked!

  • Error: 0X80040707 DLL Function call crashed: QTInstallCode.QuickTimePostIns

    Hi,
    After installing the latest Quicktime on my XP 64-bit OS I get the following error message:
    Error: 0X80040707
    Description: DLL Function call crashed: QTInstallCode.QuickTimePostInstallProc
    Running quicktime and iTunes has not been a problem in the past.
    I done have absolutely everything that is avaliable on the support site. And I still have had no luck. Please help, I really appreciate it.

    That worked. Thanks for your help.
    I hope I dont have to encounter this problem again with Apples next release of iTunes or for that mater Microsofts next update patch.

  • RFC Assign Link As XML Multiple Input Error SAP JRA Function Call

    I am using SAP MII 12.1.0 (Build 201)
    I have a problem with SAP JRA Function Call Action in Link Assignment as assign XML.
    I need to assign multiple input but from local xml property to my RFC table as assign XML
    but when i am going to execute my transaction i am getting following errors.
    [WARN] Data buffer filter for this action does not exist or the interface is incorrect.
    [ERROR] Unable to make RFC call Exception: [com.sap.conn.jco.JCoException: (104) RFC_ERROR_SYSTEM_FAILURE:      Transferred IDoc data records are empty (internal error)            ]
    [WARN] [SAP_JRA_Function_Upload_Material_Consumption] Skipping execution of output links due to action failure.
    [ERROR] [UserEvent] : com.sap.conn.jco.JCoException: (104) RFC_ERROR_SYSTEM_FAILURE:      Transferred IDoc data records are empty (internal error)
    Please help me out in this issue.
    Regards,
    Manoj Bilthare

    Dear Jeremy
    Thanks for reply
    My Problem is got solved that problem is due to version problem now the MII version is Version 12.1.4 Build(46).
    Regards,
    Manoj Bilthare

  • Error in XXL_FULL_API function module for download report to excel

    Hi all,
    I am using XXL_FULL_API function module for download report to excel, In this FM we have to fill a table called sema        = t_gxxlt_s. in this table we have a fields called
    i_sema-col_no  = 19.
      i_sema-col_src = 19.
      i_sema-col_typ = 'STR'.
      i_sema-col_ops = 'DFT'
    here in 'col_typ' if we put STR in excel it will come as a text but i wnat the time field what i have to pass ?
    and for filed 'col_ops' also ??
    Thaks,
    Sridhar

    Hi sridhar joshi,
    Please check this program
    REPORT Excel.
    TABLES:
      sflight.
    * header data................................
    DATA :
      header1 LIKE gxxlt_p-text VALUE 'Suresh',
      header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
    * Internal table for holding the SFLIGHT data
    DATA BEGIN OF t_sflight OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA END   OF t_sflight.
    * Internal table for holding the horizontal key.
    DATA BEGIN OF  t_hkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_h.
    DATA END   OF t_hkey .
    * Internal table for holding the vertical key.
    DATA BEGIN OF t_vkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_v.
    DATA END   OF t_vkey .
    * Internal table for holding the online text....
    DATA BEGIN OF t_online OCCURS 0.
            INCLUDE STRUCTURE gxxlt_o.
    DATA END   OF t_online.
    * Internal table to hold print text.............
    DATA BEGIN OF t_print OCCURS 0.
            INCLUDE STRUCTURE gxxlt_p.
    DATA END   OF t_print.
    * Internal table to hold SEMA data..............
    DATA BEGIN OF t_sema OCCURS 0.
            INCLUDE STRUCTURE gxxlt_s.
    DATA END   OF t_sema.
    * Retreiving data from sflight.
    SELECT * FROM sflight
             INTO TABLE t_sflight.
    * Text which will be displayed online is declared here....
    t_online-line_no    = '1'.
    t_online-info_name  = 'Created by'.
    t_online-info_value = 'KODANDARAMI REDDY'.
    APPEND t_online.
    * Text which will be printed out..........................
    t_print-hf     = 'H'.
    t_print-lcr    = 'L'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the header'.
    APPEND t_print.
    t_print-hf     = 'F'.
    t_print-lcr    = 'C'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the footer'.
    APPEND t_print.
    * Defining the vertical key columns.......
    t_vkey-col_no   = '1'.
    t_vkey-col_name = 'MANDT'.
    APPEND t_vkey.
    t_vkey-col_no   = '2'.
    t_vkey-col_name = 'CARRID'.
    APPEND t_vkey.
    t_vkey-col_no   = '3'.
    t_vkey-col_name = 'CONNID'.
    APPEND t_vkey.
    t_vkey-col_no   = '4'.
    t_vkey-col_name = 'FLDATE'.
    APPEND t_vkey.
    * Header text for the data columns................
    t_hkey-row_no = '1'.
    t_hkey-col_no = 1.
    t_hkey-col_name = 'PRICE'.
    APPEND t_hkey.
    t_hkey-col_no = 2.
    t_hkey-col_name = 'CURRENCY'.
    APPEND t_hkey.
    t_hkey-col_no = 3.
    t_hkey-col_name = 'PLANETYPE'.
    APPEND t_hkey.
    t_hkey-col_no = 4.
    t_hkey-col_name = 'SEATSMAX'.
    APPEND t_hkey.
    t_hkey-col_no = 5.
    t_hkey-col_name = 'SEATSOCC'.
    APPEND t_hkey.
    t_hkey-col_no = 6.
    t_hkey-col_name = 'PAYMENTSUM'.
    APPEND t_hkey.
    * populating the SEMA data..........................
    t_sema-col_no  = 1.
    t_sema-col_typ = 'STR'.
    t_sema-col_ops = 'DFT'.
    APPEND t_sema.
    t_sema-col_no = 2.
    APPEND t_sema.
    t_sema-col_no = 3.
    APPEND t_sema.
    t_sema-col_no = 4.
    APPEND t_sema.
    t_sema-col_no = 5.
    APPEND t_sema.
    t_sema-col_no = 6.
    APPEND t_sema.
    t_sema-col_no = 7.
    APPEND t_sema.
    t_sema-col_no = 8.
    APPEND t_sema.
    t_sema-col_no = 9.
    APPEND t_sema.
    t_sema-col_no = 10.
    t_sema-col_typ = 'NUM'.
    t_sema-col_ops = 'ADD'.
    APPEND t_sema.
    CALL FUNCTION 'XXL_FULL_API'
      EXPORTING
    *   DATA_ENDING_AT          = 54
    *   DATA_STARTING_AT        = 5
       filename                = 'TESTFILE'
       header_1                = header1
       header_2                = header2
       no_dialog               = 'X'
       no_start                = ' '
        n_att_cols              = 6
        n_hrz_keys              = 1
        n_vrt_keys              = 4
       sema_type               = 'X'
    *   SO_TITLE                = ' '
      TABLES
        data                    = t_sflight
        hkey                    = t_hkey
        online_text             = t_online
        print_text              = t_print
        sema                    = t_sema
        vkey                    = t_vkey
    EXCEPTIONS
       cancelled_by_user       = 1
       data_too_big            = 2
       dim_mismatch_data       = 3
       dim_mismatch_sema       = 4
       dim_mismatch_vkey       = 5
       error_in_hkey           = 6
       error_in_sema           = 7
       file_open_error         = 8
       file_write_error        = 9
       inv_data_range          = 10
       inv_winsys              = 11
       inv_xxl                 = 12
       OTHERS                  = 13
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    please refer this link
    http://www.thespot4sap.com/Articles/Download_to_excel.asp
    Best regards,
    raam

  • Error while creating function filter for SAP R3 destination

    Hi All,
    I am using SAP Portal Add-in 1.0 Patch 3 for Visual Studio 2003 with SAP Portal Runtime 1.0 Patch 3 for Microsoft .NET and SAPDotNetConnector2.0.
    Portal server is successfully added to my server explorer.SAP R3 system  destination is also added succesfully ,but when i create a function filter  
    for my destination function to add my RFC enabled function module it  gives me an error message "Missing R3NAME=... or ASHOST=... in connect_param in RfcOpenEx",but when i log into the R3 system from portal system ,I am able to log successfully.
    please see the attached jpg file for your reference.
    what should I do,plz help me.

    3 things:
    1. When you say "but when i log into the R3 system from portal system ,I am able to log successfully"... what do you mean exactly? Do you mean you tried to do a "test connection"?
    2. Make sure the portal user mapping is set to "user & password" and not SSO. In order to work with the destination in design time you need to have it set to User and Password. Later, for run-time connection you can change it to SSO.
    3. If number 2 failed, can you please click on the destination in the server explorer and look at the property grid for the connection string property? make sure it's correct (you can post it here if you don't know).
    Regards,
    Ofer

  • Using non blocking connect() call for SCTP sockets in Solaris10

    Hi,
    I have a problem with non blocking connect call on SCTP socket.
    I am using the sctp stack support in Solaris10.
    When the connect is successful, I can get the pollout event on the socket.
    But there is no event observed when the peer does not exist. In other words, I could not get the pollout event on connection failure. This logic works fine with TCP sockets on both Solaris and Suse10.
    I am working with SCTP one-to-one style sockets.
    Is there any way to handle this issue?
    Do I need to load any patch to resolve this issue?
    It will be great if I get a solution in this regard.
    Thanks in advance.
    Best Regards,
    Bipin.

    There are at least two problems here.
    A. In the receiver you should test for -1 from the read() immediately, rather than continue with the loop and try to write -1 bytes to the file.
    B. In the sender you are ignoring the return value of client.write(), which can be anything from 0 to the buffer length. If you get 0 you should wait for another OP_WRITE to trigger; if you get a 'short write' you need to retry it until you've got nothing left to write from the current buffer, before you read any more data. This is where the data is vanishing.

  • Why does WFM_DB_Transfer generate an error 10803 after functioning well for a few iterations?

    I am outputing a waveform via the WFM_DB_Transfer function, and it functions fine for about the first fifty or so buffers. However afterwards it generates the error 10803. This happened when I had the oldDataStop set to 1 in the WFM_DB_Config. My situation is that I am trying to simulatenously acquire data while trying to send data so I am using double buffered waveform generation on an AT-AO-10 board with double buffered data acquisition on a PCI-6071E board which both are synchronized through the RTSI bus using an external update clock. The thing is everything works except after about 50 or so iterations of buffers later the 10803 error pops up. Sometimes the iterations
    last up to 300 before coughing up the error 10803. I am using NI-DAQ 6.9.1.

    Take a look at this Knowledgebase entry. It may be related to your problem.
    http://digital.natinst.com/public.nsf/fca7838c4500dc10862567a100753500/a1973fc28be27737862562210059bc32?OpenDocument
    Hope this helps.
    Regards,
    Erin

  • After Installing after effects I get a Runtime Error Pure Virtual Function Call

    I installed After Effects, the trial, onto my pc which meets all the requirments, and I keep getting a runtime error.  I have reinstalled windows, i have used several registry programs and still nothign.  Please help!

    onto my pc which meets all the requirments
    Well, if you are so sure, then why don't you tell us in more detail what PC it actually is? If you have re-installed the operating system and all and AE still doesn't run, then most likely your PC does not meet the requirements or at least uses some strange hardware/ software combination that is not compatible with AE... What operating system? Processor? Graphics card? Other components?
    Mylenium

  • Error: 0x80040707 DLL Function Call Crashed: PSAPI Enum Process

    can ANYONE help me with this one. Ive just bought an iPod Nano and have tried to install the cd. It tries to go through the process but then i get this error message.
    Its really irritating cause i have searched the internet for this error and can not seem to find a solution.
    From a few sites ive been on it looks like it might be the Service Pack I have on XP. I have SP1 and i read that i need SP2 to run itunes. Is this correct?
    Any help would be VERY much appreciated.
    Yvonne

    hi thank u for ur reply. i have gone to windows update and it gives me a list of things that can be updated. It mentions service pack 1 but does not say that it will update to service pack 2. Is this something that can be definitly done or does it depend on how old or updated the computer is?
    Apolgies if i sound stupid on this one, im not too hot with computers!!!!

  • Dynamically catch a function call from an object at runtime

    Hi,
    I have a bit of an interesting question.
    Say I have a dynamic object named Foo. It may have a set of explicitly defined functions:
    public function helloWorld():String
         return "hello world";
    public function get name():String
         return "My Name";
    etc.
    I want to be able to create a further function
    public function handleFunctionCall(functionCall:String, args:Array):*
         trace("Function: " + functionCall + " was called with the arguments:");
         for(var i:int=0; i<args.length; i++)
              trace(args[i]);
    The purpose of this is so that I can declare the object Foo and then call any function and handle it accordingly at runtime.
    e.g.
    var foo:Foo=new Foo();
    foo.bar();
    foo.whathaveyou();
    foo.whatever();
    Hope someone can point me in the right direction.

    I'd be interested to know more about what you are trying to achieve, but the code below should work:
    public function handleFunctionCall( functionName : String, args : Array ) : *
       var functionToCall : Function = this[ functionName ];
       return functionToCall.call( this, args );
    For alternative approaches you may want to take a look at behavioural design patterns. The command or strategy pattern may suit your needs.

Maybe you are looking for

  • Screen disappears

    hi I m installing oracle 10.2.0.3.0 on windows vista home edition.. i m having strange problem while installation. on the 1st screen of installation if i m clicking next tab it just disappears.. how do i install oracle software.. i dont understatnd..

  • How can I tell if I have the right restore disks for Intel Mac Mini

    I have an "early 2006" (confirmed by S/N YM609***) Intel Mac Mini 1.66mhz Core Duo. I bought it used and the hard drive had been wiped. Both the HD and the DVD drive seem to work fine; hard drive passes SMART tests. I was able to boot using "Drive Ge

  • Issue with .GIF images in Adobe Reader 10

    Hello, It seems when you open our PDFs (created in Adobe Acrobat 4) with Adobe Reader X (version 10), .GIF images appear to be greyed out. This doesn't happen with .JPGs, only GIFs. Anyone have any insight into why this is happening? It is causing a

  • Date display problems

    Hello, I have notice some date display problems with browsers when visiting a Podcast page : https://itunes.apple.com/fr/podcast/euronews-no-comment/id193275779 For exemples : 8/45/13 8/32/13 4/49/13 Date problems available on other podcasts : https:

  • VPC 7/XP Home won't run H & R Block Tax Cut Premium

    Hello, I have a G4/733/10.4.4/superdrive/40g & 250g Mac.I installed vpc7/xp home on my mac.I then installed Tax Cut PC version in the virtual machine. I double click on the desktop icon and i keep getting this error .(Oxc0000005)Application failed to