PInvoke - Issue while calling DJVU function from C# Code - Attempted to read or write protected memory

Hi,
I know there are many questions in this subject but none of them help to resolve the issue I am currently facing.
Below is the signature of C Function from DJVULibre added in .NET code
[DllImport("C:\\Program Files\\DJVULIBRE\\LIBDJVULIBRE.dll", CharSet=CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
private unsafe static extern int ddjvu_page_render(IntPtr page, ddjvu_render_mode_t mode, IntPtr pagerect,
IntPtr renderrect,
IntPtr pixelformat,
ulong rowsize,
[Out][MarshalAs(UnmanagedType.LPArray)]byte[] imagebuffer);Below is how I am calling this function in the c# codebyte* buffer = (byte *)Memory.Alloc(nSize);
try
IntPtr ptr1 = (IntPtr)Memory.Alloc(Marshal.SizeOf(prect));
Marshal.StructureToPtr(prect, ptr1, false);
IntPtr ptr2 = (IntPtr)Memory.Alloc(Marshal.SizeOf(rrect));
Marshal.StructureToPtr(rrect, ptr2, false);
byte[] array = new byte[nSize];
fixed (byte* p = array) Memory.Copy(buffer, p, nSize);
ddjvu_page_render(page, ddjvu_render_mode_t.DDJVU_RENDER_MASKONLY, ptr1, ptr2, fmt, (ulong)stride, array);
finally
Memory.Free(buffer);
}call to ddjvu_page_render in above code is throwing "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Prior to this post I must have tried all the option could find in various blogs.
Appreciate any help, is almost a day I am clueless, your timely help could save my job

Thanks Viorel, below is the definition of original C function
DDJVUAPI int
ddjvu_page_render(ddjvu_page_t *page,
const ddjvu_render_mode_t mode,
const ddjvu_rect_t *pagerect,
const ddjvu_rect_t *renderrect,
const ddjvu_format_t *pixelformat,
unsigned long rowsize,
char *imagebuffer );below is how the code is calling this function in C#, the in pointers are all valid pointer I checked in debugging window byte* buffer = (byte *)Memory.Alloc(nSize);
try
IntPtr ptr1 = (IntPtr)Memory.Alloc(Marshal.SizeOf(prect));
Marshal.StructureToPtr(prect, ptr1, false);
IntPtr ptr2 = (IntPtr)Memory.Alloc(Marshal.SizeOf(rrect));
Marshal.StructureToPtr(rrect, ptr2, false);
byte[] array = new byte[nSize];
fixed (byte* p = array) Memory.Copy(buffer, p, nSize);
ddjvu_page_render(page, ddjvu_render_mode_t.DDJVU_RENDER_MASKONLY, ptr1, ptr2, fmt, (ulong)stride, array);
finally
Memory.Free(buffer);

Similar Messages

  • Attempted to read or write protected memory while adding an existingMessage

    Hi,
    does anyone know what the reason for this exception might be?
    24.11.2009 16:23:04 Error Attempted to read or write protected
    memory. This is often an indication that other memory is corrupt.
    at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
    BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
    msgData)
    at GroupwareTypeLibrary.DIGWMessages.AddExistingMessa ge(String
    SenderDisplayName, String SenderEmailAddress, String
    SenderEmailAddressType, DateTime CreationDate, MessageBoxTypeConstants
    MessageBoxType, MessageStatusConstants MessageStatus,
    MessagePriorityConstants MessagePriority, MessageSecurityConstants
    MessageSecurity, Object DraftMsg, Object LastModificationDate)
    at
    com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.AddMail(GWMail
    message, Mail5 draftmsg)
    at
    com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.AddMessage(GWMessage
    message)
    at
    com.vivex.archiveconnector.groupwise.Agent.Archive Message(GWMessage msg,
    User user, Group group, ArchiveSettings archSettings,
    GroupWiseArchiveFilter arcFilter)
    Best regards, Martin Schmidt.

    I don't think this is a GroupWise error.
    We would need steps to duplicate the problem.
    >>> On Friday, November 27, 2009 at 7:13 AM, Martin
    Schmidt<[email protected]> wrote:
    > Hi,
    >
    > does anyone know what the reason for this exception might be?
    >
    > 24.11.2009 16:23:04 Error Attempted to read or write protected
    > memory. This is often an indication that other memory is corrupt.
    > at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
    > BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
    > msgData)
    > at GroupwareTypeLibrary.DIGWMessages.AddExistingMessa ge(String
    > SenderDisplayName, String SenderEmailAddress, String
    > SenderEmailAddressType, DateTime CreationDate, MessageBoxTypeConstants
    > MessageBoxType, MessageStatusConstants MessageStatus,
    > MessagePriorityConstants MessagePriority, MessageSecurityConstants
    > MessageSecurity, Object DraftMsg, Object LastModificationDate)
    > at
    >
    com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.AddMa
    > il(GWMail
    > message, Mail5 draftmsg)
    > at
    >
    com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.AddMe
    > ssage(GWMessage
    > message)
    > at
    > com.vivex.archiveconnector.groupwise.Agent.Archive Message(GWMessage msg,
    > User user, Group group, ArchiveSettings archSettings,
    > GroupWiseArchiveFilter arcFilter)
    >
    > Best regards, Martin Schmidt.

  • Attempted to read or write protected memory calling GetCompanyService() C#

    I am getting the error;
    "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
    when running the code;
    if (sboCompany.GetCompanyService().GetAdminInfo().RoundingMethod == SAPbobsCOM.BoYesNoEnum.tYES)
      // My code here
    This is happening on a Terminal server session on Server 2003 R2 Std x64 Edition Service Pack 2 running SAP Business One 2007 A (8.00.232)  SP: 01  PL: 07
    but works OK on a standard Windows XP Professional 2002 SP3 Machine running SAP Business One 2007 A (8.00.181) SP:00 PL:46
    I have managed to resolve this by accessing the Roundmthd field in the OADM table directly using a recordset object, but would like to abe able to use the proper api if possible!
    Can anyone help?

    Within IF clause, it is better comparing two values indirectly that you have already assigned them to your own variables.  try it to see.
    Thanks,
    Gordon

  • Issue while calling COBOL program from Component Interface in PeopleSoft HRMS 9.2

    In HRMS 9.2, I am facing problem while calling the remote call function through component interface. In GP_ABS_EESS_REQ (Navigation Main Menu > Self Service > Time Reporting > Report Time > Absence Request) component, we have “Forecast Balance” button as shown below:
    This button checks for eligibility for leave being applied. While using component interface, it executes FORCAST_PB field change event peoplecode which contains a remote call to a cobol program as below:
    RemoteCall("PSRCCBL", "PSCOBOLPROG", "GPPOLRUN", "NET_RETURN_CD", &NET_RETURN_CD, "NET_TXN_ID", &NET_TXN_ID, "NET_TXN_NUM", &NET_TXN_NUM, "NET_MSG_ID", &NET_MSG_ID, "NET_MSG_PRM_CNT", &NET_MSG_PRM_CNT, "NET_MSG_PRM1", &NET_MSG_PRM1, "NET_MSG_PRM2", &NET_MSG_PRM2, "NET_MSG_PRM3", &NET_MSG_PRM3);
    I am getting following error while executing it via component interface:
    (2,148) - Think-time PeopleCode event (RemoteCall), but a SQL update has occurred in the commit interval. (2,148) FUNCLIB_GP_ABS.FCST_PB.FieldFormula Name:Abs_ForecastExec  PCPC:5311  Statement:60
    Called from:GP_ABS_EESS_REQ.GBL.DERIVED_ABS_SS.FCST_PB.FieldChange  Statement:26
    (91,34) - Error changing value. {Z_GP_ABS_EESS_REQ_CI.FCST_PB} (91,34)
    (18,2) - Data being added conflicts with existing data. (18,2)
    (91,37) - Error saving Component Interface. {Z_GP_ABS_EESS_REQ_CI} (91,37)
      After commenting out this line of code, I was able to save the CI successfully. But I need to execute this statement before saving CI so that I can check the eligibility for leave being applied. Can anyone help me on this issue?

    When I tried to read the file using `CAT -vt <filename>`, I could see that the file contains special characters such as ^M and ^I. This may be because of the file transfer mode(but I transferred in ASCII mode, still the special characters where appearing).
    I opened a VI editor and pasted the same script. Save the file, tried to run the script, It was working fine.
    I still didn't get how the special characters appeared. I used notepad++ as my editor.

  • Problem while calling java function from html

    when i tried to call a java function from html i'm getting an error
    object don't support this property.
    what could be the reason.
    This is my html.
    I got this from this forum only.
    My applet is accessing the system property "user.home".
    I ran it in IE
    <DIV id="dvObjectHolder">Applet comes here</DIV>
    <br><br>
    <script>
    if(window.navigator.appName.toLowerCase().indexOf("netscape")!=-1){ // set object for Netscape:
         document.getElementById('dvObjectHolder').innerHTML = " <object ID='appletTest1' classid=\"java:test.class\"" +
    "height=\"0\" width=\"0\" onError=\"changeObject();\"" +
              ">" +
    "<param name=\"mayscript\" value=\"Y\">" +
    "<param name=\"archive\" value=\"sTest.jar\">" +
    "</object>";
    }else if(window.navigator.appName.toLowerCase().indexOf('internet explorer')!=-1){ //set object for IE
         document.getElementById('dvObjectHolder').innerHTML = "<object ID='appletTest1' classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"" +
              " height=\"0\" width=\"0\" >" +
              " <param name=\"code\" value=\"test.class\" />" +
         "<param name=\"archive\" value=\"sTest.jar\">" +
              " </object>"
    </script>
    <LABEL id="lblOutputText">This text will be replaced by the applet</LABEL>
    <BR>
    <input value="Javascript to java" type=button onClick="document.appletTest1.fromJavaScript()">

    I tried this example using the repy given to an earlier post.
    But its not working with me.
    What i did in addition was adding plugin.jar to classpath to import netscape.javascript.*;
    Let me add some more details
    1) I'll add the stack trace
    2) my java progrma
    3) batch file to sign the applet.
    1) This is the stack trace i don't know whether u will undertand this
    load: class test.class not found.
    java.lang.ClassNotFoundException: test.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: C:\FastranJava\AppletObject\bin\test\class.class (The system cannot find the path specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    Exception in thread "Thread-5" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    2) Java Program
    import netscape.javascript.*;
    import java.applet.*;
    public class test extends Applet
         private JSObject win;
         private JSObject outputLabel;
         private boolean buttonFromJavaClicked=false;
         checkJavaScriptEvent evt=new checkJavaScriptEvent();
         public void init()
              try
                   evt.start();
                   win=JSObject.getWindow(this);
                   outputLabel=(JSObject)win.eval("document.getElementById('lblOutputText')");
                   outputLabel.setMember("innerHTML", "<center><h1>From Init<br>Your Home directory" + System.getProperty("user.home") + "</h1></center>");
              catch(Exception e)
                   e.printStackTrace();
         public void fromJavaScript()
              buttonFromJavaClicked=true;          
         public void fromJavaScript2()
              System.out.println("Started Form JavaScript2");
              try
                   String strLbl="<center><h1>From JavaScript<br>Your Homedir:" + System.getProperty("user.home") + "</h1></center>";
                   outputLabel.setMember("innerHTML", strLbl);
              catch(Exception e)
                   e.printStackTrace();
         class checkJavaScriptEvent extends Thread
              public void run()
                   while(true)
                        if(test.this.buttonFromJavaClicked)
                             System.out.println("OK buttonfromjava is true");
                             test.this.buttonFromJavaClicked=false;
                             fromJavaScript2();
                        try
                             Thread.sleep(3000);
                        catch(Exception e)
                             e.printStackTrace();
    3) Batch file
    del *.cer
    del *.com
    del *.jar
    del *.class
    javac -classpath ".;C:\Program Files\Java\jre1.5.0_06\lib\plugin.jar" test.java
    keytool -genkey -keystore harm.com -keyalg rsa -dname "CN=Harm Meijer, OU=Technology, O=org, L=Amsterdam, ST=, C=NL" -alias harm -validity 3600 -keypass password -storepass password
    jar cf0 test.jar *.class
    jarsigner -keystore harm.com -storepass password -keypass password -signedjar sTest.jar test.jar harm
    del *.class

  • Call peoplesoft function from java code

    Can we call the peoplesoft decrypt function from within java code ?

    Hi Sumit,
    For getting the connection, I would use something like:
    import com.sap.mw.jco.JCO;
    public class R3Connector {
         private JCO.Client jcoclient = null;
         public  R3Connector () {
                   super();
         public JCO.Client getClient() {
              if (jcoclient == null) {
                   /* get connection from Pool */
                   jcoclient = JCO.getClient (POOL_NAME);
              return jcoclient;
         public void releaseClient() {
              if (jcoclient != null) {
                   JCO.releaseClient(jcoclient);     
    and of course you will have to define your POOL property somewhere (portalapp.xml presumably)
    Hope this helps!

  • Issue While Calling a Function in Crystal from Oracle

    Post Author: digik
    CA Forum: Crystal Reports
    Hi there,
    I have a function in Oracle which fetches values in to table type. When I run this query in Oracle SQL Plus it is giving me records. But the same query in Crystal is giving zero records?
    Function SQL
    Create or Replace Function getReport(numTrades IN NUMBER,AsOfDateFrom IN DATE,AsOfDateTo IN DATE,compareDate IN DATE,productType IN VARCHAR2,dataGrade IN NUMBER,DataGradeThreshold IN NUMBER)Return top_movers_type_tableAStableRow top_movers_type := top_movers_type(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,  NULL,NULL,NULL);resulttable top_movers_type_table := top_movers_type_table(); IDvar              VARCHAR2(12);         CURR_DATEvar         DATE;        PRODUCTvar          VARCHAR2(6);        DESCRIPTIONvar      VARCHAR2(100);        COUPONvar           NUMBER(14,10);        SETLMNT_DATEvar      DATE;        CURR_PRICEvar       NUMBER(14,10);        COMPARE_PRICEvar    NUMBER(14,10);        PRICE_DELTAvar      NUMBER(24,20);        PRICE_DELTA_PCTvar  NUMBER(24,20);        TRD_AMT_OR_UPBvar   NUMBER(20,2);        UPB_PRICE_DELTAvar   NUMBER(35,15);        COMPARE_DATEvar     DATE;        DATA_GRADEvar       NUMBER(4,0);        TRADE_PRICEvar     NUMBER(14,10);        TRADE_DATEvar      DATE;        PROD_SPECIFIC_FLDvar VARCHAR2(10);           COMPARE_PRICE_FROMvar  VARCHAR2(10);        TOT_COUNTvar NUMBER(10);                        CURSOR TopmoversCursor IS        select ID,CURR_DATE,  PRODUCT, DESCRIPTION, COUPON, SETLMNT_DATE,         CURR_PRICE, COMPARE_PRICE, PRICE_DELTA, PRICE_DELTA_PCT,         TRD_AMT_OR_UPB, UPB_PRICE_DELTA, COMPARE_DATE, DATA_GRADE,         TRADE_PRICE, TRADE_DATE, PROD_SPECIFIC_FLD, COMPARE_PRICE_FROM,   TOT_COUNT  from ( select SECU_CUSIP_ID ID,  FA_MTM_EFF_DT CURR_DATE, FA_TYP_DESC PRODUCT , FA_PTR COUPON,  TRD_STLM_DT SETLMNT_DATE,  CURR_PRC CURR_PRICE, DATA_QLTY_CD DATA_GRADE,  TRD_PRC_PCT TRADE_PRICE,  SECU_TRD_DT TRADE_DATE,  SECU_STAMPS_TYP_DESC DESCRIPTION,  COMPARE_PRC COMPARE_PRICE,   UPB TRD_AMT_OR_UPB, COMPARE_DATE COMPARE_DATE,  COMPARE_PRC_FROM COMPARE_PRICE_FROM,  PROD_SPC_FLD PROD_SPECIFIC_FLD,  PRC_DELTA PRICE_DELTA, ABS_PRC_DELTA,  UPB_PRICE_DELTA, PRC_DELTA_PCT PRICE_DELTA_PCT, dense_rank() over (order by ABS_PRC_DELTA desc) as TOPN, count(SECU_CUSIP_ID) over () as TOT_COUNT from ( select SECU_CUSIP_ID, FA_MTM_EFF_DT,FA_TYP_DESC,FA_PTR,  TRD_STLM_DT, CURR_PRC ,DATA_QLTY_CD, TRD_PRC_PCT ,  SECU_TRD_DT, SECU_STAMPS_TYP_DESC , COMPARE_PRC,  UPB,  COMPARE_DATE, COMPARE_PRC_FROM, PROD_SPC_FLD,  (CURR_PRC - COMPARE_PRC) as PRC_DELTA, abs(CURR_PRC - COMPARE_PRC) as ABS_PRC_DELTA, ((CURR_PRC - COMPARE_PRC)*100)/COMPARE_PRC as PRC_DELTA_PCT, ((CURR_PRC - COMPARE_PRC) *  UPB)/100000000  as UPB_PRICE_DELTA from ( select F1.SECU_CUSIP_ID, F1.FA_MTM_EFF_DT,F1.FA_TYP_DESC,F1.FA_PTR,  F1.TRD_STLM_DT, F1.FA_MTM_PRC_PCT as CURR_PRC ,F1.DATA_QLTY_CD, F1.TRD_PRC_PCT ,  F1.SECU_TRD_DT, decode(MVS.SECU_STAMPS_TYP_DESC,null,'N/A','','N/A',MVS.SECU_STAMPS_TYP_DESC) SECU_STAMPS_TYP_DESC , NVL(F2.FA_MTM_PRC_PCT,F1.TRD_PRC_PCT) COMPARE_PRC,  F1.FA_CURR_UPB_AMT/1000000 as UPB, NVL(F2.FA_MTM_EFF_DT,F1.SECU_TRD_DT) as COMPARE_DATE, Decode(F2.FA_MTM_PRC_PCT,null,'TRADE','INVENTORY') as COMPARE_PRC_FROM, DECODE(F1.FA_TYP_DESC,        'AGNCY',REMIC_AGNC_DTL.REMIC_CLS_PRIN_PMT_TYP_CD,        'MBS',MBS_DTL.MBS_WALA_NO,        'ARM',ARM_DTL.MBS_WALA_NO,        'REMIC',REMIC_DTL.REMIC_TYP_CD,        'MFMBS',MF_MBS_DTL.SECU_YLD_MANT_DELTA_TERM,        'CAB','N/A',        'PCERT','N/A',        'MRB','N/A',        'STRIP','N/A',        'SFWL','N/A',        'ARMWL','N/A',        'MFWL','N/A','NULL') as PROD_SPC_FLD from FA_MARK F1 , FA_MARK F2, MV_SEC_TYP MVS, MBS_DTL, MRB_DTL,  MF_MBS_DTL ,REMIC_AGNC_DTL ,REMIC_DTL, ARM_DTL where F1.SECU_CUSIP_ID = F2.SECU_CUSIP_ID () and F1.FA_MTM_ID = MBS_DTL.FA_MTM_ID () and F1.FA_MTM_ID = MRB_DTL.FA_MTM_ID () and F1.FA_MTM_ID = MF_MBS_DTL.FA_MTM_ID () and F1.FA_MTM_ID = REMIC_AGNC_DTL.FA_MTM_ID () and F1.FA_MTM_ID = REMIC_DTL.FA_MTM_ID () and F1.FA_MTM_ID = ARM_DTL.FA_MTM_ID () and F1.FA_TYP_DESC = F2.FA_TYP_DESC () and F1.TRD_STAT_CD = F2.TRD_STAT_CD () and F1.SECU_STAMPS_TYP_CD = MVS.SECU_STAMPS_TYP_CD () and F1.FA_MTM_EFF_DT >= '01-May-2007' and F1.FA_MTM_EFF_DT <= '31-May-2007' and F1.DATA_QLTY_CD >= 1 and F1.DATA_QLTY_CD <= 10 and F1.TRD_STAT_CD = 5 and F1.FA_TYP_DESC = 'MBS' and F2.FA_MTM_EFF_DT() = '30-Apr-2007' and F2.DATA_QLTY_CD ()>= 1        and F2.DATA_QLTY_CD (+)<= 10 ) where COMPARE_PRC > 0  order by ABS_PRC_DELTA desc )        ) where TOPN <= numTrades;BEGIN
    OPEN TopmoversCursor(numTrades ,AsOfDateFrom ,AsOfDateTo ,compareDate ,productType ,dataGrade ,DataGradeThreshold); LOOP  FETCH TopmoversCursor INTO IDvar,CURR_DATEvar,  PRODUCTvar, DESCRIPTIONvar, COUPONvar, SETLMNT_DATEvar,         CURR_PRICEvar, COMPARE_PRICEvar, PRICE_DELTAvar, PRICE_DELTA_PCTvar,         TRD_AMT_OR_UPBvar, UPB_PRICE_DELTAvar, COMPARE_DATEvar, DATA_GRADEvar,         TRADE_PRICEvar, TRADE_DATEvar, PROD_SPECIFIC_FLDvar, COMPARE_PRICE_FROMvar,   TOT_COUNTvar;  EXIT WHEN TopmoversCursor%NOTFOUND;  ResultTable.extend;  ResultTable(resultTable.Last):= top_movers_type(IDvar,CURR_DATEvar,  PRODUCTvar, DESCRIPTIONvar, COUPONvar, SETLMNT_DATEvar,         CURR_PRICEvar, COMPARE_PRICEvar, PRICE_DELTAvar, PRICE_DELTA_PCTvar,         TRD_AMT_OR_UPBvar, UPB_PRICE_DELTAvar, COMPARE_DATEvar, DATA_GRADEvar,         TRADE_PRICEvar, TRADE_DATEvar, PROD_SPECIFIC_FLDvar, COMPARE_PRICE_FROMvar,   TOT_COUNTvar); END LOOP;CLOSE TopmoversCursor;RETURN resultTable;END getReport;/
    Select Query
    select * from (getReport(1,sysdate,sysdate,sysdate,0,2,4))

    Post Author: digik
    CA Forum: Crystal Reports
    Hi there,
    I have a function in Oracle which fetches values in to table type. When I run this query in Oracle SQL Plus it is giving me records. But the same query in Crystal is giving zero records?
    Function SQL
    Create or Replace Function getReport(numTrades IN NUMBER,AsOfDateFrom IN DATE,AsOfDateTo IN DATE,compareDate IN DATE,productType IN VARCHAR2,dataGrade IN NUMBER,DataGradeThreshold IN NUMBER)Return top_movers_type_tableAStableRow top_movers_type := top_movers_type(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,  NULL,NULL,NULL);resulttable top_movers_type_table := top_movers_type_table(); IDvar              VARCHAR2(12);         CURR_DATEvar         DATE;        PRODUCTvar          VARCHAR2(6);        DESCRIPTIONvar      VARCHAR2(100);        COUPONvar           NUMBER(14,10);        SETLMNT_DATEvar      DATE;        CURR_PRICEvar       NUMBER(14,10);        COMPARE_PRICEvar    NUMBER(14,10);        PRICE_DELTAvar      NUMBER(24,20);        PRICE_DELTA_PCTvar  NUMBER(24,20);        TRD_AMT_OR_UPBvar   NUMBER(20,2);        UPB_PRICE_DELTAvar   NUMBER(35,15);        COMPARE_DATEvar     DATE;        DATA_GRADEvar       NUMBER(4,0);        TRADE_PRICEvar     NUMBER(14,10);        TRADE_DATEvar      DATE;        PROD_SPECIFIC_FLDvar VARCHAR2(10);           COMPARE_PRICE_FROMvar  VARCHAR2(10);        TOT_COUNTvar NUMBER(10);                        CURSOR TopmoversCursor IS        select ID,CURR_DATE,  PRODUCT, DESCRIPTION, COUPON, SETLMNT_DATE,         CURR_PRICE, COMPARE_PRICE, PRICE_DELTA, PRICE_DELTA_PCT,         TRD_AMT_OR_UPB, UPB_PRICE_DELTA, COMPARE_DATE, DATA_GRADE,         TRADE_PRICE, TRADE_DATE, PROD_SPECIFIC_FLD, COMPARE_PRICE_FROM,   TOT_COUNT  from ( select SECU_CUSIP_ID ID,  FA_MTM_EFF_DT CURR_DATE, FA_TYP_DESC PRODUCT , FA_PTR COUPON,  TRD_STLM_DT SETLMNT_DATE,  CURR_PRC CURR_PRICE, DATA_QLTY_CD DATA_GRADE,  TRD_PRC_PCT TRADE_PRICE,  SECU_TRD_DT TRADE_DATE,  SECU_STAMPS_TYP_DESC DESCRIPTION,  COMPARE_PRC COMPARE_PRICE,   UPB TRD_AMT_OR_UPB, COMPARE_DATE COMPARE_DATE,  COMPARE_PRC_FROM COMPARE_PRICE_FROM,  PROD_SPC_FLD PROD_SPECIFIC_FLD,  PRC_DELTA PRICE_DELTA, ABS_PRC_DELTA,  UPB_PRICE_DELTA, PRC_DELTA_PCT PRICE_DELTA_PCT, dense_rank() over (order by ABS_PRC_DELTA desc) as TOPN, count(SECU_CUSIP_ID) over () as TOT_COUNT from ( select SECU_CUSIP_ID, FA_MTM_EFF_DT,FA_TYP_DESC,FA_PTR,  TRD_STLM_DT, CURR_PRC ,DATA_QLTY_CD, TRD_PRC_PCT ,  SECU_TRD_DT, SECU_STAMPS_TYP_DESC , COMPARE_PRC,  UPB,  COMPARE_DATE, COMPARE_PRC_FROM, PROD_SPC_FLD,  (CURR_PRC - COMPARE_PRC) as PRC_DELTA, abs(CURR_PRC - COMPARE_PRC) as ABS_PRC_DELTA, ((CURR_PRC - COMPARE_PRC)*100)/COMPARE_PRC as PRC_DELTA_PCT, ((CURR_PRC - COMPARE_PRC) *  UPB)/100000000  as UPB_PRICE_DELTA from ( select F1.SECU_CUSIP_ID, F1.FA_MTM_EFF_DT,F1.FA_TYP_DESC,F1.FA_PTR,  F1.TRD_STLM_DT, F1.FA_MTM_PRC_PCT as CURR_PRC ,F1.DATA_QLTY_CD, F1.TRD_PRC_PCT ,  F1.SECU_TRD_DT, decode(MVS.SECU_STAMPS_TYP_DESC,null,'N/A','','N/A',MVS.SECU_STAMPS_TYP_DESC) SECU_STAMPS_TYP_DESC , NVL(F2.FA_MTM_PRC_PCT,F1.TRD_PRC_PCT) COMPARE_PRC,  F1.FA_CURR_UPB_AMT/1000000 as UPB, NVL(F2.FA_MTM_EFF_DT,F1.SECU_TRD_DT) as COMPARE_DATE, Decode(F2.FA_MTM_PRC_PCT,null,'TRADE','INVENTORY') as COMPARE_PRC_FROM, DECODE(F1.FA_TYP_DESC,        'AGNCY',REMIC_AGNC_DTL.REMIC_CLS_PRIN_PMT_TYP_CD,        'MBS',MBS_DTL.MBS_WALA_NO,        'ARM',ARM_DTL.MBS_WALA_NO,        'REMIC',REMIC_DTL.REMIC_TYP_CD,        'MFMBS',MF_MBS_DTL.SECU_YLD_MANT_DELTA_TERM,        'CAB','N/A',        'PCERT','N/A',        'MRB','N/A',        'STRIP','N/A',        'SFWL','N/A',        'ARMWL','N/A',        'MFWL','N/A','NULL') as PROD_SPC_FLD from FA_MARK F1 , FA_MARK F2, MV_SEC_TYP MVS, MBS_DTL, MRB_DTL,  MF_MBS_DTL ,REMIC_AGNC_DTL ,REMIC_DTL, ARM_DTL where F1.SECU_CUSIP_ID = F2.SECU_CUSIP_ID () and F1.FA_MTM_ID = MBS_DTL.FA_MTM_ID () and F1.FA_MTM_ID = MRB_DTL.FA_MTM_ID () and F1.FA_MTM_ID = MF_MBS_DTL.FA_MTM_ID () and F1.FA_MTM_ID = REMIC_AGNC_DTL.FA_MTM_ID () and F1.FA_MTM_ID = REMIC_DTL.FA_MTM_ID () and F1.FA_MTM_ID = ARM_DTL.FA_MTM_ID () and F1.FA_TYP_DESC = F2.FA_TYP_DESC () and F1.TRD_STAT_CD = F2.TRD_STAT_CD () and F1.SECU_STAMPS_TYP_CD = MVS.SECU_STAMPS_TYP_CD () and F1.FA_MTM_EFF_DT >= '01-May-2007' and F1.FA_MTM_EFF_DT <= '31-May-2007' and F1.DATA_QLTY_CD >= 1 and F1.DATA_QLTY_CD <= 10 and F1.TRD_STAT_CD = 5 and F1.FA_TYP_DESC = 'MBS' and F2.FA_MTM_EFF_DT() = '30-Apr-2007' and F2.DATA_QLTY_CD ()>= 1        and F2.DATA_QLTY_CD (+)<= 10 ) where COMPARE_PRC > 0  order by ABS_PRC_DELTA desc )        ) where TOPN <= numTrades;BEGIN
    OPEN TopmoversCursor(numTrades ,AsOfDateFrom ,AsOfDateTo ,compareDate ,productType ,dataGrade ,DataGradeThreshold); LOOP  FETCH TopmoversCursor INTO IDvar,CURR_DATEvar,  PRODUCTvar, DESCRIPTIONvar, COUPONvar, SETLMNT_DATEvar,         CURR_PRICEvar, COMPARE_PRICEvar, PRICE_DELTAvar, PRICE_DELTA_PCTvar,         TRD_AMT_OR_UPBvar, UPB_PRICE_DELTAvar, COMPARE_DATEvar, DATA_GRADEvar,         TRADE_PRICEvar, TRADE_DATEvar, PROD_SPECIFIC_FLDvar, COMPARE_PRICE_FROMvar,   TOT_COUNTvar;  EXIT WHEN TopmoversCursor%NOTFOUND;  ResultTable.extend;  ResultTable(resultTable.Last):= top_movers_type(IDvar,CURR_DATEvar,  PRODUCTvar, DESCRIPTIONvar, COUPONvar, SETLMNT_DATEvar,         CURR_PRICEvar, COMPARE_PRICEvar, PRICE_DELTAvar, PRICE_DELTA_PCTvar,         TRD_AMT_OR_UPBvar, UPB_PRICE_DELTAvar, COMPARE_DATEvar, DATA_GRADEvar,         TRADE_PRICEvar, TRADE_DATEvar, PROD_SPECIFIC_FLDvar, COMPARE_PRICE_FROMvar,   TOT_COUNTvar); END LOOP;CLOSE TopmoversCursor;RETURN resultTable;END getReport;/
    Select Query
    select * from (getReport(1,sysdate,sysdate,sysdate,0,2,4))

  • Getting Error while calling Flex function from JavaScript

    Hi,
    I have an aspx page, which shows charts as per dropdown selection,
    I am using flex charts for flex.In aspx page, i am calling an mxml function using javascript.below is the code for javascript in aspx.
    Javascript  code in aspx page:
    <script type="text/javascript">     
    function callApp(formid) {
        try {
                var objectChart = document.getElementById("statisticsChart");
                alert(objectChart.id);               
                objectChart.myFlexFunction(formid,get('<%=HiddenDashboardWS.ClientID %>').value);
        catch (e) {
            alert(e.message);
    function getDropDownListvalue() {
        var IndexValue = $get('<%=FormDropDownList.ClientID %>').selectedIndex;
        var SelectedVal = $get('<%=FormDropDownList.ClientID %>').options[IndexValue].value;
        //  alert(SelectedVal);
        callApp(SelectedVal);
    </script>
    Html code where dropdown control is placed
    <asp:DropDownList CssClass="combo" ID="FormDropDownList" runat="server" AutoPostBack="false"></asp:DropDownList>
    <object id="statisticsChart" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
    height="220" width="680">
        <param name="src" value="../swf/DashboardStatisticChart.swf" />
        <param name="flashVars" value="" />
        <embed name="statisticsChart" src="../swf/DashboardStatisticChart.swf" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" height="220" width="680" flashvars=""></embed>
    </object>
    Mxml code:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"  backgroundColor="white" creationComplete="initApp();" >
    <mx:script>
      public function initApp():void {
    ExternalInterface.addCallback("myFlexFunction",myFunc);
      public function myFunc(s:String,wsurl:String):void {
         Formid.text = s;
         webService.wsdl = wsurl;
         Alert.show("webservice");
    //Getdata calls webservice and gets xml data    
    GetData();
    //showchart() will draw chart
                     ShowChart();
    </mx:script>
    </mx:Application>
    Above code works perfect in ie, but in firefox, it gives An error saying “chartObject.MyFlexFunction is not a function”.
    I am getting the object in javascript in all the browsers, but not the functions!
    Does anyone has worked with this?
    Any help will be highly appreciated.
    Regards,
    Nirav Patel

    Found the solution from here... http://74.125.153.132/search?q=cache:4BC9BY04B5EJ:livedocs.adobe.com/flash/8/main/00002201 .html+externalinterface.addcallback+not+working&cd=1&hl=en&ct=clnk&gl=in
    Hope it will help others...
    Regards,

  • Execute immediate issue while calling a procedure from plsql block

    Hi all,
    I have the following simple code ,my execute immediate is not working(I am pasting the error below as well)
    CREATE OR REPLACE PROCEDURE CALL_RAHUL_PROCEDURES
    AS
    strng varchar2(1000);
    BEGIN
    for i in (select proc_name,flag,id from rahul_procedures order by id)
    loop
    if (i.flag = 'Y')
    then
    strng := 'exec '||i.proc_name||'(''rahul'')';
    dbms_output.put_line(strng);
    execute immediate strng;
    end if;
    end loop;
    END CALL_RAHUL_PROCEDURES;
    Error:
    Connecting to the database INQDWD.
    ORA-00900: invalid SQL statement
    ORA-06512: at "ETLADMIN.CALL_RAHUL_PROCEDURES", line 17
    ORA-06512: at line 2
    exec RAHUL_HELLO_WORLD2('rahul');
    Process exited.
    Disconnecting from the database INQDWD.
    data in rahul_procedures table :
    Proc_name flag Id
    RAHUL_HELLO_WORLD     N     1
    RAHUL_HELLO_WORLD2     Y     2
    RAHUL_HELLO_WORLD     N     3
    RAHUL_HELLO_WORLD3     N     4
    please help.
    Regards
    Rahul

    Mac_Freak_Rahul wrote:
    Well I have to call 26 procedures one by one and the names of the procedures would be in a table'rahul_procedures' Which is 100% wrong.
    Data is stored in tables, program code is stored in procedures or view defintions.
    http://en.wikipedia.org/wiki/Data_%28computing%29
    >
    Data vs programs
    Typically, different files are used to store programs vs data. Executable files contain programs; all other files are data files.
    >
    So you have just violated the primary distinction between data and program code.
    I dont find anything strange in my question,Only because you do not appear to know what you are doing or the difference between data and program code.
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1943344500346351703
    >
    ugh, what an ugly "design". I can see your life will be full of performance issues, strange 'bugs', and other unpleasant side effects. I mean, it all looks "so cool", but it'll be a nightmare to maintain and enhance.
    but then you have the issue of binds, which will be intractable. You'd have to know the binds at compile time, but you have hidden all of your sql in a magic generic table - so you cannot possibly know your binds at compile time.
    I would suggest you discard all of this code (I am DEAD SERIOUS) and start over. This is a bad idea from the get go. Or at least do me a favor and do not use plsql (you make it look like a good database implementation, but it isn't)
    The objective here is to store SQL Statements in a Table(a sql repository) and just call the required SQL from the application using the sqlid using the sql_execute procedure. ...
    CHANGE YOUR OBJECTIVE.
    How about this for a good objective:
    the objective here is to store sql statement in a plsql routine (a sql repository, you call a procedure and we run sql) and just call the required sql form the applicatoin using the STORED PROCEDURE
    sorry, can I think of hacks to get you going? yes, application contexts come to mind - a fixed number of binds comes to mind. Am I going to work them out? No - it is the wrong way to approach a database application.

  • UnsatisfiedLinkError while calling C library from Java Programm

    Hi,
    I am trying call C function from Java code but I am getting error.
    Below is the code
    package jnitest;
    class HelloWorld {
        private native void print();
        public static void main(String[] args) {
            new HelloWorld().print();
        static {
            System.loadLibrary("HelloWorld");
    }I used following commands to compile and generate header files
    $ javac -d build src/jnitest/HelloWorld.java
    $ javah -d build -classpath build -jni jnitest.HelloWorldThen jnitest_HelloWorld.h was generated and I renamed it to HelloWorld.h.
    I implemented HelloWorld.h in HelloWorld.c.
    Below is the code for both the files
    HelloWorld.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class jnitest_HelloWorld */
    #ifndef _Included_jnitest_HelloWorld
    #define _Included_jnitest_HelloWorld
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     jnitest_HelloWorld
    * Method:    print
    * Signature: ()V
    JNIEXPORT void JNICALL Java_jnitest_HelloWorld_print
      (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endifHelloWorld.c
    #include <jni.h>
    #include <stdio.h>
    #include "HelloWorld.h"
    JNIEXPORT void JNICALL
    Java_HelloWorld_print(JNIEnv *env, jobject obj)
      printf("Hello World!\n");
      return;
    }I used following commands to generate so file
    gcc -m32 -fPIC -D_REENTRANT -I/opt/jdk1.6.0_19/include -I/opt/jdk1.6.0_19/include/linux -c HelloWorld.c
    gcc -m32 -shared HelloWorld.o -o libHelloWorld.soafter all the execution I get following directory struct in build directory
    $ ls -R
    HelloWorld.c  HelloWorld.h  jnitest  libHelloWorld.so
    ./jnitest:
    HelloWorld.classI am executing following command to run the program.
    build$ java -D. jnitest.HelloWorldbut I am getting exception
    Exception in thread "main" java.lang.UnsatisfiedLinkError: jnitest.HelloWorld.print()V
         at jnitest.HelloWorld.print(Native Method)
         at jnitest.HelloWorld.main(HelloWorld.java:16)I pointed LD_LIBRARY_PATH to build directory and executed
    java -classpath build jnitest.HelloWorldbut I am still getting the same error.
    Please help to fix the issue.
    Thanks,

    The JNI method name in the .h file is different to that in the .c file.

  • Call JavaScript function from Acrobat Plugin

    Hi All,
    I want to call JavaScript function from Acrobat Plugin? Where is to write JavaScript function in Acrobat SDK? Please reply..
    Thanks in advance..

    Hi Malkyt,
    Thanks.. where is to write JavaScript code in the application..
    function GetWelcome()
    alert("Welcome");
    this above code. how to use this javascript code to plugin application.
    static ACCB1 ASBool ACCB2 AVPageViewMouseClick (AVPageView pageView, AVDevCoord xhit, AVDevCoord yhit, AVFlagBits16 flags, AVTCount clickNo, void *data)
    char jsscript[200];
    AFExecuteThisScript (pddoc, jsscript, NULL);
    i want to display welcome message of JS file.. give me step to perform above task.. Please reply...

  • Issue while deleting a row from a table

    Dear friends,
    i am getting an issue while deleting a row from a table, pls check screen shots , the first screen shot is my table contents
    when i delete 2 row , the second row is deleting properly like below screen shot
    but i want like below screen shot , Col1 contents should be like pic 1 . could any one pls let me know how to solve this issue.
    Thanks
    Vijaya

    Hi vijaya,
    please try this code, it will help you.
    DATA : it_rows  TYPE wdr_context_element_set,
              wa_rows LIKE LINE OF it_rows.
       DATA lo_nd_table TYPE REF TO if_wd_context_node.
        DATA lt_table TYPE wd_this->elements_table.
       DATA lo_el_table TYPE REF TO if_wd_context_element.
       DATA ls_vbap TYPE wd_this->element_table.
    DATA: ld_index TYPE i.
    data value TYPE sy-index.
    * navigate from <CONTEXT> to <table> via lead selection
       lo_nd_table= wd_context->get_child_node( name = wd_this->wdctx_table ).
    * @TODO handle non existant child
    * IF lo_nd_table IS INITIAL.
    * ENDIF.
    * get element via lead selection
    * alternative access  via index
    * lo_el_table = lo_nd_table->get_element( index = 1 ).
    * @TODO handle not set lead selection
       IF lo_el_table IS INITIAL.
       ENDIF.
    * navigate from <CONTEXT> to <table> via lead selection
       lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
    * @TODO handle non existant child
    * IF lo_nd_table IS INITIAL.
    * ENDIF.
       lo_nd_table->get_static_attributes_table( IMPORTING table = lt_table ).
    * @TODO handle non existant child
    * IF lo_nd_table IS INITIAL.
    * ENDIF.
    ** @TODO compute values
    ** e.g. call a model function
    * navigate from <CONTEXT> to <table> via lead selection
       lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
    * @TODO handle non existant child
    * IF lo_nd_table IS INITIAL.
    * ENDIF.
    ** @TODO compute values
    ** e.g. call a model function
    it_rows  =  lo_nd_table>get_selected_elements( ).
       CALL METHOD lo_nd_table->GET_LEAD_SELECTION_INDEX
       RECEIVING
         INDEX  = value .
      LOOP AT it_rows INTO wa_rows.
         CALL METHOD wa_rows->get_static_attributes
           IMPORTING
                  static_attributes = ls_table.
         READ TABLE lt_table INTO ls_table WITH KEY col1 = ls_table-col1.
          ld_index = value.
              ENDLOOP.
       CLEAR : ls_table-col2,
             ls_table-col2.
       MODIFY lt_table INDEX ld_index FROM ls_table.
      lo_nd_table->bind_table( new_items = lt_table set_initial_elements = abap_true ).

  • Issue with calling custom function in merge command -10g

    Hi,
    I have ran into issue while calling a custom function in merge command.
    It throws error 'Invalid identifier'. Oracle doesnt understand that it is a function and take the function name as column name.
    Since no such collumn name exists, it throws 'Invalid identifier'.
    Interestingly, merge command works fine when it has a oracle function (replace, decode).
    The oracle version is 10.2.0.3
    It is very urgent.
    Any pointers will be helpful.
    Regards,
    Ravi

    I don't have privileges to create dblink, but this is working for me.
    So, i don't think function can be a issue here.
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:01.02
    satyaki>
    satyaki>
    satyaki>create table hist_tab
      2     as
      3       select * from emp
      4       where sal between 2000 and 4000;
    Table created.
    Elapsed: 00:00:00.09
    satyaki>
    satyaki>select * from hist_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>update hist_tab
      2     set mgr = 7794;
    1 row updated.
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>commit;
    Commit complete.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>select * from hist_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7794 08-SEP-81       2178          0         30 SALESMAN
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>create table tran_tab
      2     as
      3       select * from emp
      4       where sal between 2000 and 7000;
    Table created.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>select * from tran_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
          7902 FORD       ANALYST         7566 03-DEC-81    5270.76                    20 ANALYST
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>ed
    Wrote file afiedt.buf
      1  create or replace function fun(c_in number)
      2     return number
      3     is
      4       c_out number(4);
      5     begin
      6       if c_in < 7900 then
      7          c_out := 0;
      8       else
      9         c_out := 1;
    10       end if;
    11       return c_out;
    12*    end;
    13  /
    Function created.
    Elapsed: 00:00:01.00
    satyaki>
    satyaki>merge into hist_tab o
      2  using (
      3     select empno,
      4            ename,
      5            job,
      6            mgr,
      7            hiredate,
      8            sal,
      9            comm,
    10            deptno,
    11            job1,
    12            dob
    13     from (
    14              select k.*,
    15                     rank() over(order by fun(k.empno)) rn
    16              from tran_tab k
    17          )
    18     where rn = 1
    19     ) n
    20  on ( o.empno = n.empno)
    21  when matched then
    22    update set o.ename = n.ename,
    23               o.job = n.job,
    24               o.mgr = n.mgr,
    25               o.hiredate = n.hiredate,
    26               o.sal = n.sal,
    27               o.comm = n.comm,
    28               o.deptno = n.deptno,
    29               o.job1 = n.job1,
    30               o.dob = n.dob
    31  when not matched then
    32    insert(
    33            o.empno,
    34            o.ename,
    35            o.job,
    36            o.mgr,
    37            o.hiredate,
    38            o.sal,
    39            o.comm,
    40            o.deptno,
    41            o.job1,
    42            o.dob
    43          )
    44    values(
    45            n.empno,
    46            n.ename,
    47            n.job,
    48            n.mgr,
    49            n.hiredate,
    50            n.sal,
    51            n.comm,
    52            n.deptno,
    53            n.job1,
    54            n.dob
    55          );
    1 row merged.
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>select * from hist_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
    Elapsed: 00:00:00.00
    satyaki>You can check the final output with old output. It is working perfectly - i guess.
    Regards.
    Satyaki De.

  • Exception while calling a BDC from webdynpro

    Hi All,
    I am getting an exception 'Exception condition "CNTL_ERROR" raised' while calling a BDC from the WD application, though i am calling the transaction in background mode. The statment which was throwing the exception was a create object statement in the function module DOC_DISPLAY_INITIALIZE. Can u please tell me, what is the reason for this?
    Thanks in Advance,
    Laxmikanth

    >
    amit saini wrote:
    > hi ,
    > The message "CNTL_ERROR" appear when you are using some of  the SAP enjoy transaction code like ME21N / ME22N / ME23N.
    >
    > This are bugs cause by the earlier version of the SAPGUI. It  usually occurs when you are running a BDC session
    > for a transaction that has 'fancy' screen elements like table controls ortabstrips. These work fine in the foreground, but not so well in the background.
    >
    >
    > To solve it, goto OSS and apply the SAPGUI's latest front end patch to your PC.
    >
    > rgds,
    > amit
    There is a mixture of accurate information here.
    This is NOT a SAPGUI problem.  It can not be fixed with a newer version fo the SAPGUI.  It is caused by transactions that were created with Enjoy Controls.  Enjoy controls are not the table control or the tabstrip.  They are controls that used ActiveX components on the desktop as part of the SAPGUI - like the ALV Grid, the Tree, the ABAP Editor, etc. 
    You can not use call transaction/BDC against such transactions in the background or in WDA because there is no connection to the frontend to create instances of these controls.  These transactions with the enjoy controls should have appropriate BAPIs or Enterprise Services that you should call instead in order to make data updates or creations.
    For instance see SAP Note 304122 that discusses this issue for transaction MIGO.

  • "A technical error during invocation : Could not invoke service reference" Error message while calling a service from BPM

    Hi Experts,
    We are facing a issue while calling a Automated activity from BPM process, the process gets suspended and the BPM logs says "Process XYZ suspended, A technical error during invocation: Could not invoke service reference name fdhueoegghejietyhsjk6886 Component name ABC " We have already checked the mapped service reference and provider system. Gone through the below link, but no help.
    http://http://wiki.scn.sap.com/wiki/display/TechTSG/Sending+a+message+from+SAP+NetWeaver+BPM+process+to+PI+fails+via+automated+activity?original_fqdn=wiki.sdn.sap.com
    Any pointers or suggestions to fix up this issue will be highly appreciated. Thanks in advance.
    Regards,
    Mohit Jaju

    The details/ID in NWDS Service Reference must exactly match the SOA configuration. Sometimes it's possible you have changed the reference or the group itself and something changed to become mismatched.
    It's possible they don't match - but the SG itself will show green in NWA since the service exists and responds on the target system. Does the ID listed in the error match what is shown in the NWDS project?
    regards, Nick

Maybe you are looking for

  • How I rooted my Arc S and removed apps I don't need

    WARNING: Here be dragons.  I don't work for SE but was surprised that my Arc S came with some apps that you cannot remove without rooting your device.  Seeing as internal memory space is already a bit limited I decided to root so I could run the wond

  • How can i see "recently added movies" on my apple tv?

    On my apple TV 1 st generation, i had the option to view the "recently added movies" on the apple TV menu. Now that i have the apple TV second generation, I DO NOT see this option but i can still see the option "genre, unwatched, by movie". Is there

  • How to authenticate CXF-Webservice against external LDAP in WebLogic?

    Hi there, I'm trying to integrate our Camel-application into WebLogic 12c. All the incoming endpoints are CXF-based webservices. These are secured by "UsernameToken Timestamp" with the WSS4JInInterceptor configured like this: <bean id="wss4jInInterce

  • EA6500 DHCP assignments: Less capable than E4200?

    I'm upgrading from an E4200 to an EA6500, and I'm having some dfificulty with DHCP assignments. On the E4200, I was able to designate a first address range for DHCP assignments (e.g., start at 192.168.0.100 and reserve 50 addresses for devices), and

  • N73 English Predictive Text

    Hey guys, I seem to be having problems getting english predictive text to work. Chinese seems to work fine but when I switch to english all I get is nonsense suggestions. I don't even get a drop down of suggested words it just automatically puts in t