"no data found" run-time error masking SQL/report mismatch

Hi all,
At last, figured out a vexing problem and wondering if anyone else either:
a) has also hit the problem, and hopefully
b) has figured out a clever way around it.
Namely, in our AppEx apps, we rely on SQL query generation from PL/SQL packaged functions. This "best practice" promotes reuse, automated testing, etc. Great idea - works great.
However, we've repeatedly come across a situation where we go to run a page with a report on it only to get a "report error: ORA-01403: no data found" message where the report should be. Not much to go on. After trial and error, it turns out that simply going to the Region Definition page (where the PL/SQL function call is defined) and clicking the "Apply Changes" button cleared the problem up.
Mystifying because the actual SQL query generated by the PL/SQL is valid (we've got a nightly testing job that pulls the PL/SQL function calls out of the AppEx metadata tables, executes them to get back the SQL and then validates the SQL).
Turns out this problem looks to be a result of columns changing in the actual SQL itself, and hence not matching up to the Region Attributes (column names, one assumes) that AppEx knows about. Simply clicking Apply Changes causes AppEx to validate the returned query and then it adjusts the column attributes (one assumes) so that things match up.
So - the $64,000 question(s):
1) Are there any cool AppEx APIs to be able to try and detect this situation? Given an app of middling complexity (50-100 pages, each with various queries/reports), this is not an attractive issue to deal with manually.
2) Any cool AppEx APIs to fix, or auto-sync these situations? (Essentially programmatically calling the "Apply Changes" button if you will).
At a minimum, it would be great if AppEx could be updated to put out some kind of more informative error message when this occurs - maybe something along the lines of "Region Attributes Do Not Match Data Returned from Query", or something like that at least.
Thanks for any input/ideas,
Jim C.

Thanks to all for your prompt responses.
Vikas actually did me the favor of pretty much clarifying my info for me (tks Vikas). Yes, to all the above. It's PL/SQL code generating a SQL query, so 1 is (a); we want to use query-specific columns so it is (2a). And yes, the whole problem is that the something does change to cause the SELECT statement column list to change...nature of the beast, so "don't do that" doesn't really help here.
Scott - sorry, should have been more explicit. Basically, we have a PL/SQL function behind a report that returns a SQL statement for the report. If that PL/SQL code changes to add a new column to the report (without going to the corresponding Report Attributes page and clicking the "Apply Changes" button to get AppEx to revalidate the query), then you wind up with this "no data found" error msg, which doesn't exactly point you to the root of the problem.
It seems as though the "parse at compile-time" is really what's going on here. There must be some kind of "run-time" check going on as well, that is resulting in the "no data found" message. Seems as though it ought to be fairly straightforward to add some kind of check at run-time to handle that exception a little cleaner. Is there an official process to register a "Request for Process Enhancement" for AppEx to do this?
In the meantime, thank you Vikas for the pointer to the APEX_APPLICATION_PAGE_RPT_COLS view - that looks like it will do the trick nicely. Given that, we can now add logic to our nightly "app tester" job that can compare what columns AppEx expects to find in a given report (for a given page) with the actual SQL (coming back from the PL/SQL function call) to essentially "validate" the AppEx meta data and at least let us know when these things get out of sync.
BTW - if anyone would be interested in the actual contents of that "app tester" logic, I'd be happy to post it (someplace...here? Studio site?). It's basically just a PL/SQL block of code that currently runs in cron that just validates any SQL embedded in our app. (I suppose it is a little "hard-coded" since it does use our naming conventions for packages/functions to parse the PL/SQL calls from the Meta Data but it might still serve as a usefull starting point...) Since our AppEx app(s) sit on top of a database schema that is in fairly constant flux, we need the ability to know when somebody has changed something in the schema that needs to be accounted for in AppEx. The job primarily just parses the AppEx meta data to find PL/SQL function calls that return SQL, executes that PL/SQL to get the generated SQL, then just validates that SQL and reports back any invalid SQL calls. Perhaps we're in some unusual development environment (15-20 people working on a database schema with 700-800 tables/views) but it seems as though it would be fairly easy, for anybody using PL/SQL to generate SQL (which is a GREAT and powerful thing, by the way - thanks to whoever thought that up in AppEx land) to run into this issue.
Jim C.

Similar Messages

  • Run Time Errors in BEx Report Designer?....asking for Portal Setup??

    In BEx Report Designer, I keep getting short dumps and timeouts when trying to design flashy reports.
    I keep getting 2 errors when I time out:
    1. 'Query (view) definition cannot be retrieved from Portal.
    Please try again or check query and Portal Setup!
    Time limit exceeded.
    2. xxx Error when reading Query (via BICS)
    Please check query and Portal setup!
    Time limit exceeded.
    We are running ECC 6.0, BI2004s, and SEM 6.0.  All in Sandbox/Dev environment.
    We are NOT running EP. 
    I am aware that we have some memory issues, and we're adding 4Gb more on Thursday....can the solution be that simple, or are these errors telling me we need Portals installed?  I was under the impression that Portals were NOT required for 2004s, so long as you did not use WAD etc.
    Any thoughts??

    You would need to install portals(EP) for the report designer to work. When you design your flashy report in designer and try it launch it... it would try to connect to EP to publish it. It bombs when it doesnt find the portal.
    On a personal note: Report designer have a long way to go when you think the output would be something like crystal .. NO not yet ... But SAP just got started ... I think they would be there pretty soon. And they promise many enhancements as of SP 13.. so lets all wait.

  • Run Time error in ALV report

    Dear friends
    When I try to run the following code, I keep getting a message that says
    "The field "GT_FIELD" specified here has a different field type.".
    I have run this in many occassions and it has worked before. I would appreciate if some one can help me with this. Following is the code
    CODE FOLLOWS----
    REPORT ZSAPMZRFT_ZWMSCHED_REPORT MESSAGE-ID zrammessage LINE-SIZE 168
                                  LINE-COUNT 20(6) NO STANDARD PAGE HEADING.
    TABLES: zwmsched,
            zwmwave.
    Data : v_repid LIKE sy-repid,
    BEGIN OF s_zwmsched occurs 1,
            mandt LIKE zwmsched-mandt,
            werks LIKE zwmsched-werks,
            lgnum LIKE zwmsched-lgnum,
            ship_date LIKE zwmsched-ship_date,
            carrier LIKE zwmsched-carrier,
            vbeln LIKE zwmsched-vbeln,
            kunnr LIKE zwmsched-kunnr,
            custname LIKE zwmsched-custname,
            city LIKE zwmsched-city,
            state LIKE zwmsched-state,
            zip LIKE zwmsched-zip,
            qty LIKE zwmsched-qty,
            uom LIKE zwmsched-uom,
            wt LIKE zwmsched-wt,
            wt_uom LIKE zwmsched-wt_uom,
            volumn LIKE zwmsched-volumn,
            vol_uom LIKE zwmsched-vol_uom,
            inco LIKE zwmsched-inco,
            equipment LIKE zwmsched-equipment,
            door LIKE zwmsched-door,
            wavenum LIKE zwmsched-wavenum,
            load_seq LIKE zwmsched-load_seq,
            notes LIKE zwmsched-notes,
            pick_stat LIKE zwmsched-pick_stat,
            load_stat LIKE zwmsched-load_stat,
            bol_stat LIKE zwmsched-bol_stat,
            mbol LIKE zwmsched-mbol,
            seal LIKE zwmsched-seal,
            gm_status LIKE zwmsched-gm_status,
            createdate LIKE zwmsched-createdate,
            created_by LIKE zwmsched-created_by,
            changedate LIKE zwmsched-changedate,
            changed_by LIKE zwmsched-changed_by,
           END of s_zwmsched,
    Begin of temp_zwmsched occurs 1,
        so_lgnum LIKE zwmsched-lgnum,
        so_vbeln LIKE zwmsched-vbeln,
        pa_date  LIKE zwmsched-ship_date,
        pa_wvno  LIKE zwmsched-wavenum,
        pa_door  LIKE zwmsched-door,
        carrier  LIKE zwmsched-carrier,
        pickstat LIKE zwmsched-pick_stat,
        mbol     LIKE zwmsched-mbol,
        loadstat LIKE zwmsched-load_stat,
        bol_stat LIKE zwmsched-bol_stat,
        pgi_stat LIKE zwmsched-gm_status,
    end of temp_zwmsched.
    TYPE-POOLS : slis.
    DATA :
           gt_field TYPE slis_t_fieldcat_alv,
           wa_field TYPE slis_fieldcat_alv,
           gt_layout TYPE slis_layout_alv.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS: so_lgnum FOR zwmsched-lgnum,
                    so_vbeln FOR zwmsched-vbeln,
                    pa_date  FOR zwmsched-ship_date,
                    pa_wvno  FOR zwmsched-wavenum,
                    pa_door  FOR zwmsched-door,
                    carrier  FOR zwmsched-carrier,
                    pickstat FOR zwmsched-pick_stat,
                    mbol     FOR zwmsched-mbol.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN SKIP.
    PARAMETERS:     loadstat LIKE zwmsched-load_stat,
                    bol_stat LIKE zwmsched-bol_stat,
                    pgi_stat LIKE zwmsched-gm_status.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK block2.
    select * from zwmsched into corresponding fields of table temp_zwmsched
    where
    lgnum in so_lgnum AND
    vbeln in so_vbeln AND
    ship_date in pa_date AND
    wavenum in pa_wvno AND
    door in pa_door AND
    carrier in carrier AND
    pick_stat in pickstat AND
    mbol in mbol AND
    load_stat = loadstat AND
    bol_stat = bol_stat AND
    gm_status = pgi_stat.
    wa_field-col_pos = 1.
    wa_field-tabname = 'ZWMSCHED'.
    wa_field-fieldname = 'LGNUM'.
    wa_field-seltext_l = 'WARE HOUSE'.
    wa_field-outputlen = 11.
    APPEND wa_field TO gt_field.
    *wa_field-col_pos = 2.
    *wa_field-fieldname = 'VBELN'.
    *wa_field-seltext_l = 'DELIVERY'.
    *wa_field-outputlen = 10.
    *APPEND wa_field TO gt_field.
    *wa_field-col_pos = 3.
    *wa_field-fieldname = 'SHIP_DATE'.
    *wa_field-seltext_l = 'SHIP DATE'.
    *wa_field-outputlen = 11.
    *APPEND wa_field TO gt_field.
    *wa_field-col_pos = 4.
    *wa_field-fieldname = 'WAVENUM'.
    *wa_field-seltext_l = 'WAVENUM'.
    *wa_field-outputlen = 11.
    *APPEND wa_field TO gt_field.
    *wa_field-col_pos = 5.
    *wa_field-fieldname = 'DOOR'.
    *wa_field-seltext_l = 'DOOR'.
    *wa_field-outputlen = 5.
    *APPEND wa_field TO gt_field.
    *wa_field-col_pos = 6.
    *wa_field-fieldname = 'CARRIER'.
    *wa_field-seltext_l = 'CARRIER'.
    *wa_field-outputlen = 8.
    *APPEND wa_field TO gt_field.
    *wa_field-col_pos = 7.
    *wa_field-fieldname = 'PICK_STAT'.
    *wa_field-seltext_l = 'PICK STAT'.
    *wa_field-outputlen = 10.
    *APPEND wa_field TO gt_field.
    *wa_field-col_pos = 8.
    *wa_field-fieldname = 'MBOL'.
    *wa_field-seltext_l = 'MBOL'.
    *wa_field-outputlen = 5.
    *APPEND wa_field TO gt_field.
    *wa_field-col_pos = 9.
    *wa_field-fieldname = 'LOAD_STAT'.
    *wa_field-seltext_l = 'LOAD STAT'.
    *wa_field-outputlen = 10.
    *APPEND wa_field TO gt_field.
    *wa_field-col_pos = 10.
    *wa_field-fieldname = 'BOL_STAT'.
    *wa_field-seltext_l = 'BOL STAT'.
    *wa_field-outputlen = 11.
    *APPEND wa_field TO gt_field.
    *wa_field-col_pos = 11.
    *wa_field-fieldname = 'GM_STATUS'.
    *wa_field-seltext_l = 'PFI STAT'.
    *wa_field-outputlen = 9.
    *APPEND wa_field TO gt_field.
    gt_layout-zebra = 'X'.
    v_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = gt_field
      IT_FIELDCAT                       = gt_layout
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = temp_zwmsched
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    You problem is right here.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = v_repid
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_CALLBACK_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME =
    I_BACKGROUND_ID = ' '
    I_GRID_TITLE =
    I_GRID_SETTINGS =
    <b>IS_LAYOUT = gt_field
    IT_FIELDCAT = gt_layout</b>
    IT_EXCLUDING =
    Should be....
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = v_repid
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_CALLBACK_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME =
    I_BACKGROUND_ID = ' '
    I_GRID_TITLE =
    I_GRID_SETTINGS =
    <b>IS_LAYOUT = gt_layout
        IT_FIELDCAT = gt_field</b>
    IT_EXCLUDING =
    Regarsd,
    Rich Heilman

  • XML Publisher Loading data error "Run-Time Error '76' Path Not Found"

    Hi,
    I am trying to preview the PDF output in the XML Publisher Desktop Application.
    I am able to LOAD the data successfully.
    But whenever we try to preview the output, we are getting an error saying "Run-Time Error '76' Path Not Found".
    I am running in Vista OS and MS Office 2007.
    What to be done after this? Do I place the .xml and .xsd in Temp folder?
    Kindly pls help me out in this. It would be really a very great.
    Thanks & Regards,
    Santhoshkumar.M
    Edited by: 882342 on Aug 31, 2011 3:24 AM

    You must give your user full control to C:\program files\Oracle i.e. the folder where your BI Publisher or XML Publisher Desktop is installed, see http://boardreader.com/thread/xml_publisher_error_Run_Time_Error_76_Pa_lsptXmonb.html

  • Error "Run-Time Error '76' PAth Not Found" in XML Publisher Desktop

    Hi All,
    we are trying to preview the PDF output in the XML Publisher Desktop Application.
    We are able to LOAD the data successfully.
    But whenever we try to preview the output, we are getting an error saying "Run-Time Error '76' Path Not Found".
    We are using the XMLP Desktop application on the Client Machine.(Citrix)
    Can anybody help us in this regard?
    Thanks,
    Sachin.

    Hi.
    You are posting in the wrong forum.
    Please post to the BI Publisher Forum:
    BI Publisher

  • Template Builder not found followed by Run-time error '429'

    Hello,
    I am having problems with BI Publisher.
    I am running the application on a Windows 2003 server via a Citrix connection using Word 2007 (SP2) (multilingual French/English). On this forum, I have seen numerous threads about this type of error but none seems to be working for us.
    Symptoms:
    I installed BI Publisher with admin rights (account A) and it works fine using this account
    I copy the TBCrosstab.dot, TemplateBuilder.dot, WordAnalyzer.dot in another User Profile "%USERPROFILE%\Application Data\Microsoft\Word\STARTUP" (Account B)
    All macros are enabled in account B
    The Add-ins menu shows but when I click on Connection I get the Template Builder not found error followed by Run-time error '429'
    I uninstall BI Publisher from Account A and install it using account B
    It now works fine with account B but I get the error messages in account A...
    Does BI Publisher work using multiple accounts on a single machine?
    Thanks

    Did you find a solution to this problem?

  • Run Time Error  while Transferring data to Application server

    Hello Abaper's,
    I have generated a XML data using the FM : "  SAP_CONVERT_TO_XML_FORMAT ".
    While transferring the data to a File on Application Server using the statement
    DATA : wa_xmltab TYPE truxs_xml_line,
                 it_xmltab TYPE truxs_xml_table.
    OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc EQ 0.
      LOOP AT it_xmltab INTO wa_xmltab.
        TRANSFER wa_xmltab TO FNAME.    <<<<<<<<<<<<<<  Getting Error here
      ENDLOOP.
    ELSE.
      MESSAGE e004(zmsg5) WITH 'File FNAME not opened'.
    ENDIF.
    CLOSE DATASET FNAME.
    The Run Time Error i am Facing is  
    Short text
        The current statement is only defined for character-type data objects.
    Error analysis
        For the statement
           "TRANSFER f TO ..."
        only character-type data objects are supported at the argument position
        "f".
        In this case. the operand "f" has the non-character-type "TRUXS_XML_LINE". The
        current program is a Unicode program. In the Unicode context, the type
        'X' or structures containing not only character-type components are
        regarded as non-character-type.
    Regards
    jv

    Hello  Volker Binder ,
    Thank you . it's now transferring the data to Application sercver. I forgot to try using Binay mode,
    Thers is one more problem. There are 10 Records in that internal table that is being converted to XML format,
    but the XML data is showing only first 4 records.... the XML data format for the remaining data is not seen.
    Actual  No. of Records  in Internal table :
    matnr            matkl          meins
    0-BUY1               012         PC
    0-BUY2               012         PC
    1                                EA
    2                    012         L
    3                    01          EA
    12                               EA
    23                   001         ST
    24                   015`        EA
    28                   010         EA
    29                   015`        AU
    XML Format for the above 10 fields is :
    <?xml version="1.0"?><TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">0-BUY1</MATNR><MATKL Datatype="C" Length="18">012</MATKL><MEINS Datatype="C" Length="6">PC
    </MEINS>
    </TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">0-BUY2</MATNR><MATKL Datatype="C" Length="18">012</MATKL><MEINS Datatype="C" Length="6">
    PC </MEINS>
    </TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">000000000000000001</MATNR><MEINS Datatype="C" Length="6">EA</MEINS>
    </TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">000000000000000002</MATNR
    This 4th record data in XML is also incomplete..
    The above XML format is generated only for 4 records  out of 10 Records.
    Please let me know , how can i increase the Size / Memory of the Application server file to accomodate for the reamining Records
    Regards
    Jv

  • REP-1437: Run time error in the PL/SQL development environment (DE).

    I have a report that has always worked. Now I get the following error
    REP-0003: Warning: Unable to open global preference file.
    Starting report STCONF6 [Mon Nov 10 21:38:59 2008] ...
    REP-1437: Run time error in the PL/SQL development environment (DE).
    PDE-PSD001 Could not resolve reference to <Unknown Program Unit> while loading <Unknown> <Unknown>.
    End report STCONF6 [Mon Nov 10 21:39:10 2008].
    What is it? I DON'T know.
    Regards SILVIA

    I recall my report from a form, I get the parameter form with my parameters, then click on the traffic light to run and the error appears here
    Silvia

  • Run-time error 53 File not found (makes BI Publisher quite unuseable!)

    Upgraded to BIP v 10.1.3.3.2
    Open a template with the template builder
    Load a source XML file
    Proceed to choose Insert-> Field....
    Microsoft message pops up:
    Microsoft Visual Basic
    Run-time error '53':
    File Not Found.
    This error, according to Microsoft and other technical sources SHOULD actually tell you what the file is that isn't found, however when run through the template builder, it never tells you any file name, just the above error message!
    I saw one other post on this forum about this problem, and it was related to the Java Home, so I went to TOOLS-> OPTIONS and my java home there is:
    C:\Program Files\Java\jre1.5.0_12
    So this should be high enough JRE version.
    ANy suggestions? What file or *.DLL can it not find? We have many people at a client (and me!) that have this issue.
    -Greg

    Pradeep,
    I am not trying to utilize the desktop template builder to log onto BIP enterprise.
    I am using it in an E-business suite environment, not a standalone BIP enterprise reporting environment. I simply use it right now to develop templates when I have valid XML to work with.
    Many other features are working, but any features that seem to be new such as repeating group, conditional region, conditional format, the insert field palet, among others.
    ANY feature that requires a .net service to be kicked off works only 10% of the time.

  • BIP Word Run Time Error: File or assemby name XDOUtilities not found

    Running BIP with Oracle Business Intelligence EE. When I try to log into BIP from MSFT Work via the BI Publisher Menu, I get the following error.
    File or assemby name XDOUtilities, or one of its dependencies, was not found.
    Run-time error '2147024894 (80070002)':
    File or assemby name XDOUtilities, or one of its dependencies, was not found.
    I'm running BIP 10.1.3.2.1 Build 87
    Thanks in advance for any assistance.

    The issue is caused by a bug in Microsoft Visual Studio.
    http://support.microsoft.com/kb/908002
    Unforatunately, we were not aware of this issue, and our build system did not have this patch installed. As it seems all our test environments worked correctly with BI Publisher Desktop. We are checking if we can release a patch or find another work around.
    The Microsoft site mentions the following work around:
    Note This problem does not occur when you log on by using a Microsoft Windows user account that has restricted permission.
    Sorry for the inconvenience.
    Klaus

  • Run-time error "PXA_NO_SHARED_MEMORY" occurred

    Hi All,
    My production system is running fine. And when i check SM21 I saw a lot of error message Run-time error "PXA_NO_SHARED_MEMORY" occurred and Run-time error "SYSTEM_NO_ROLL" occurred. However I can't see any error in ST22. I had read sap note 307976. And dont know when I restart the SAP services is it will be fine?
    trc file: "dev_w0", trc level: 1, release: "640"
    ACTIVE TRACE LEVEL           1
    ACTIVE TRACE COMPONENTS      all, M

    B Mon Feb 22 08:13:29 2010
    B  create_con (con_name=R/3)
    B  Loading DB library 'D:\usr\sap\PRD\SYS\exe\run\dbmssslib.dll' ...
    B  Library 'D:\usr\sap\PRD\SYS\exe\run\dbmssslib.dll' loaded
    B  Version of 'D:\usr\sap\PRD\SYS\exe\run\dbmssslib.dll' is "640.00", patchlevel (0.58)
    B  New connection 0 created
    M sysno      00
    M sid        PRD
    M systemid   560 (PC with Windows NT)
    M relno      6400
    M patchlevel 0
    M patchno    58
    M intno      20020600
    M make:      multithreaded, ASCII
    M pid        2440
    M
    M  ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 2440) [dpxxdisp.c   1160]
    I  MtxInit: -2 0 0
    M  DpSysAdmExtCreate: ABAP is active
    M  DpShMCreate: sizeof(wp_adm)          11592     (828)
    M  DpShMCreate: sizeof(tm_adm)          2219848     (11044)
    M  DpShMCreate: sizeof(wp_ca_adm)          18000     (60)
    M  DpShMCreate: sizeof(appc_ca_adm)     6000     (60)
    M  DpShMCreate: sizeof(comm_adm)          192000     (384)
    M  DpShMCreate: sizeof(vmc_adm)          0     (320)
    M  DpShMCreate: sizeof(wall_adm)          (22440/34344/56/100)
    M  DpShMCreate: SHM_DP_ADM_KEY          (addr: 047D0040, size: 2510384)
    M  DpShMCreate: allocated sys_adm at 047D0040
    M  DpShMCreate: allocated wp_adm at 047D17A8
    M  DpShMCreate: allocated tm_adm_list at 047D44F0
    M  DpShMCreate: allocated tm_adm at 047D4518
    M  DpShMCreate: allocated wp_ca_adm at 049F2460
    M  DpShMCreate: allocated appc_ca_adm at 049F6AB0
    M  DpShMCreate: allocated comm_adm_list at 049F8220
    M  DpShMCreate: allocated comm_adm at 049F8238
    M  DpShMCreate: allocated vmc_adm_list at 04A27038
    M  DpShMCreate: system runs without vmc_adm
    M  DpShMCreate: allocated ca_info at 04A27060
    M  DpShMCreate: allocated wall_adm at 04A27068
    X  EmInit: MmSetImplementation( 2 ).
    X  <ES> client 0 initializing ....
    X  Using implementation flat
    M  <EsNT> Memory Reset disabled as NT default
    X  ES initialized.

    M Mon Feb 22 08:13:30 2010
    M  calling db_connect ...
    C  Thank You for using the SLOLEDB-interface
    C  Using dynamic link library 'D:\usr\sap\PRD\SYS\exe\run\dbmssslib.dll'
    C  dbmssslib.dll patch info
    C    patchlevel   0
    C    patchno      58
    C    patchcomment MSSQL: Workaround for SQL2005 change in RpcNexecInsert (814383)
    C  np:(local) connection used on PKG-PRD
    C  CopyLocalParameters: dbuser is 'prd'

    C Mon Feb 22 08:13:31 2010
    C  Provider SQLNCLI could not be initialized. See note #734034 for more information.
    C  Using provider SQLOLEDB instead.
    C  OpenOledbConnection: MARS property was not set.
    C  Provider Release:08.50.1022
    C  Provider SQLNCLI could not be initialized. See note #734034 for more information.
    C  Using provider SQLOLEDB instead.
    C  OpenOledbConnection: MARS property was not set.

    C Mon Feb 22 08:13:42 2010
    C  Cache sizes: header 52 bytes, 20000 names (26720000 bytes), 1000 dynamic statements (5432000 bytes), total 32152052 bytes
    C  Using shared procedure name cache PKG-PRD_PRDPRD_PRD_MEM initialized by another process.
    C  Connected to db server : [PKG-PRD] server_used : [np:(local)], dbname: PRD, dbuser: prd
    C  pn_id:PKG-PRD_PRDPRD_PRD
    C  Not using MARS (on sql 8.0)
    B  Connection 0 opened (DBSL handle 0)
    B  Wp  Hdl ConName          ConId     ConState     TX  PRM RCT TIM MAX OPT Date     Time   DBHost         
    B  000 000 R/3              000000000 ACTIVE       NO  YES NO  000 255 255 20100222 081330 PKG-PRD        
    C  The IRow interface is supported by this OLEDB provider
    M  db_connect o.k.

    I Mon Feb 22 08:14:02 2010
    I  MtxInit: 0 0 0
    M  SHM_PRES_BUF               (addr: 09E50040, size: 4400128)
    M  SHM_ROLL_AREA          (addr: 12510040, size: 262144000)
    M  SHM_PAGING_AREA          (addr: 617B0040, size: 113246208)
    M  SHM_ROLL_ADM               (addr: 0A290040, size: 2616690)
    M  SHM_PAGING_ADM          (addr: 0A510040, size: 525344)
    M  ThCreateNoBuffer          allocated 320144 bytes for 1000 entries at 0A5A0040
    M  ThCreateNoBuffer          index size: 3000 elems
    M  ThCreateVBAdm          allocated 7424 bytes (50 server) at 0A5F0040
    X  EmInit: MmSetImplementation( 2 ).
    X  <ES> client 0 initializing ....
    X  Using implementation flat
    X  ES initialized.
    B  db_con_shm_ini:  WP_ID = 0, WP_CNT = 14
    B  dbtbxbuf: Buffer TABL  (addr: 103500C8, size: 30000128, end: 11FEC4C8)
    B  dbtbxbuf: Buffer TABLP (addr: 0E5200C8, size: 10240000, end: 0EEE40C8)
    B  dbexpbuf: Buffer EIBUF (addr: 0EF000D0, size: 4194304, end: 0F3000D0)
    B  dbexpbuf: Buffer ESM   (addr: 0F3100D0, size: 4194304, end: 0F7100D0)
    B  dbexpbuf: Buffer CUA   (addr: 0F7200D0, size: 3072000, end: 0FA0E0D0)
    B  dbexpbuf: Buffer OTR   (addr: 0FA100D0, size: 4194304, end: 0FE100D0)
    M  rdisp/reinitialize_code_page -> 0
    M  icm/accept_remote_trace_level -> 0
    M  rdisp/no_hooks_for_sqlbreak -> 0
    C  Provider SQLNCLI could not be initialized. See note #734034 for more information.
    C  Using provider SQLOLEDB instead.
    C  OpenOledbConnection: MARS property was not set.
    S  *** init spool environment
    S  initialize debug system
    T  Stack direction is downwards.
    T  debug control: prepare exclude for printer trace
    T  new memory block 120D8040
    S  spool kernel/ddic check: Ok
    S  using table TSP02FX for frontend printing
    S  1 spool work process(es) found
    S  frontend print via spool service enabled
    S  printer list size is 150
    S  printer type list size is 50
    S  queue size (profile)   = 300
    S  hostspool list size = 3000
    S  option list size is 30
    S      found processing queue enabled
    S  found spool memory service RSPO-RCLOCKS at 121F0098
    S  doing lock recovery
    S  setting server cache root
    S  found spool memory service RSPO-SERVERCACHE at 121F03E0
    S    using messages for server info
    S  size of spec char cache entry: 165020 bytes (timeout 100 sec)
    S  size of open spool request entry: 1152 bytes
    S  immediate print option for implicitely closed spool requests is disabled

    A  -PXA--
    A  PXA INITIALIZATION
    A  PXA: Fragment Size too small: 107 MB, reducing # of fragments
    A  System page size: 4kb, admin_size: 13396kb.
    A  Attached to PXA (address 21F30040, size 440000K)
    A  abap/pxa = shared protect gen_remote
    A  PXA INITIALIZATION FINISHED
    A  -PXA--

    C  The IRow interface is supported by this OLEDB provider
    B  dbtran INFO (init_connection '<DEFAULT>' [MSSQL:640.00]):
    B   max_blocking_factor =  50,  max_in_blocking_factor      = 255,
    B   min_blocking_factor =   5,  min_in_blocking_factor      =  10,
    B   prefer_union_all    =   1,  prefer_union_for_select_all =   0,
    B   prefer_fix_blocking =   0,  prefer_in_itab_opt          =   0,
    B   convert AVG         =   1,  alias table FUPD            =   0,
    B   escape_as_literal   =   0,  opt GE LE to BETWEEN        =   0,
    B   select *            =0x00,  character encoding          =SBCS / []:X,
    B   use_hints           = abap->1, dbif->0x1, upto->0, rule_in->0,
    B                         rule_fae->0, concat_fae->0, concat_fae_or->0

    A Mon Feb 22 08:14:03 2010
    A  ABAP ShmAdm attached (addr=53EC5000 leng=20955136 end=552C1000)
    A  >> Shm MMADM area (addr=5422D180 leng=134720 end=5424DFC0)
    A  >> Shm MMDAT area (addr=5424F000 leng=17244160 end=552C1000)
    A  RFC Destination> destination pkg-prd_PRD_00 host pkg-prd system PRD systnr 0 (pkg-prd_PRD_00)
    A  RFC Options> H=pkg-prd,S=00
    A  RFC FRFC> fallback activ but this is not a central instance.
    A   
    A  RFC rfc/signon_error_log = -1
    A  RFC rfc/dump_connection_info = 0
    A  RFC rfc/dump_client_info = 0
    A  RFC rfc/cp_convert/ignore_error = 1
    A  RFC rfc/cp_convert/conversion_char = 23
    A  RFC rfc/wan_compress/threshold = 251
    A  RFC rfc/recorder_pcs not set, use defaule value: 1
    A  RFC rfc/delta_trc_level not set, use default value: 0
    A  RFC rfc/no_uuid_check not set, use default value: 0
    A  RFC abap/SIGCHILD_default not set, use default value: 0
    A  RFC Method> initialize RemObjDriver for ABAP Objects
    A  Hotpackage version: 49
    M  ThrCreateShObjects          allocated 14604 bytes at 0FFD0040

    N Mon Feb 22 08:14:05 2010
    N  SsfSapSecin: putenv(SECUDIR=D:\usr\sap\PRD\DVEBMGS00\sec): ok

    N  =================================================
    N  === SSF INITIALIZATION:
    N  ===...SSF Security Toolkit name SAPSECULIB .
    N  ===...SSF trace level is 0 .
    N  ===...SSF library is D:\usr\sap\PRD\SYS\exe\run\sapsecu.dll .
    N  ===...SSF hash algorithm is SHA1 .
    N  ===...SSF symmetric encryption algorithm is DES-CBC .
    N  ===...sucessfully completed.
    N  =================================================
    N  MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
    N  MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
    W  =================================================
    W  === ipl_Init() called
    W    ITSP Running against db release 620!
    W    ITSP Disable Kernel Web GUI functionality
    W  === ipl_Init() returns 2, ITSPE_DISABLED: Service is disabled (sapparam)
    W  =================================================

    E Mon Feb 22 08:14:39 2010
    E  Replication is disabled

    C Mon Feb 22 08:15:00 2010
    C  sloledb.cpp [DoDbcc,line 2930]: Error/Message: (err 2571, sev 0), User 'prd' does not have permission to run DBCC CACHEPROFILE.
    C  Procname: [No proc]

    C Mon Feb 22 08:15:01 2010
    C  statement rerun with user dbo was successful, you can ignore the preceeding message

    C Mon Feb 22 08:16:27 2010
    C  Provider SQLNCLI could not be initialized. See note #734034 for more information.
    C  Using provider SQLOLEDB instead.
    C  OpenOledbConnection: MARS property was not set.

    S Mon Feb 22 08:19:23 2010
    S  found spool memory service RSPO-ACTIONS at 121F4C68

    A Mon Feb 22 08:19:55 2010
    A  TH VERBOSE LEVEL FULL
    M  ***LOG R68=> ThIRollBack, roll back () [thxxhead.c   12304]
    C  Rollback Work (0)

    A Mon Feb 22 08:19:59 2010
    A  Mon Feb 22 08:19:59 2010

    A  ABAP/4 Program /SDF/SAPLRI_SQLSERVER                   .
    A  Source /SDF/LRI_SQLSERVERU02                    Line 264.
    A  Error Code CALL_FUNCTION_CONFLICT_LENG.
    A  Module  $Id: //bas/640_REL/src/krn/runt/abfunc.c#14 $ SAP.
    A  Function FuncParams Line 2906.
    C  Rollback Work (0)

    C Mon Feb 22 08:20:00 2010
    C  sloledb.cpp [DoDbcc,line 2930]: Error/Message: (err 2571, sev 0), User 'prd' does not have permission to run DBCC loginfo.
    C  Procname: [No proc]

    C Mon Feb 22 08:20:01 2010
    C  statement rerun with user dbo was successful, you can ignore the preceeding message

    C Mon Feb 22 08:20:07 2010
    C  sloledb.cpp [ParamStmtExec,line 12251]: Error/Message: (err 50000, sev 0), Table not found.
    C  Procname: [##Y3PKG_PRDprd00000024400000003365081342]
    C  ParamStmtExec failed.  HR 80040e14 DBSL retcode 99. stmt: [sap_get_table_size_info 'syscomments', 'prd', 'PRD'
    C  /* R3:CL_SQL_RESULT_SET=============CP:234 T: */
    C  ]
    C  Conn_i:2 selection:1 singleton:0 flag_fupd:0 use_cursor:0 chksum: 222194
    C  dbdsmss: DBSL99 SQL50000
    C  Table not found.
    B  ***LOG BY2=> sql error 50000      performing FET        [dbds#3 @ 592] [dbds    0592 ]
    B  ***LOG BY0=> Table not found. [dbds#3 @ 592] [dbds    0592 ]
    B  ***LOG BY1=> sql error 50000      [dbacds#2 @ 1187] [dbacds  1187 ]

    B Mon Feb 22 08:26:10 2010
    B  dbmyclu : info : my major identification is 3232261128, minor one 0.
    B  dbmyclu : info : Time Reference is 1.12.2001 00:00:00h GMT.
    B  dbmyclu : info : my uuid is 31B87DDDE43B904B955F2E6B45F604BE.
    B  dbmyclu : info : current optimistic cluster level: 3
    B  dbmyclu : info : pessimistic reads set to 2.
    N  login/password_change_for_SSO : 1 -> 1

    B Mon Feb 22 08:32:54 2010
    B  table logging switched off for all clients

    M Mon Feb 22 08:45:50 2010
    M  PfHIndInitialize: memory=<60720150>, header=<60720150>, records=<60720180>

    S Mon Feb 22 08:55:52 2010
    S  handle memory type is RSTSPROMMM

    M Mon Feb 22 09:18:08 2010
    M  *** ERROR => NiProcMsg: rc=-104 (NIEROUT_SNC_FAILURE) from router [nibuf.c      423]
    M  *** ERROR => MsIAttachEx: NiBufConnect to /H/192.168.100.7/S/sapdp99/H/194.39.131.34/S/sapdp99/H/oss001/sapmsOSS failed (rc=NIEROUT_SNC_FAILURE) [msxxi.c      633]
    M  *** ERROR => LgIAttach: MsAttach (rc=NIEROUT_SNC_FAILURE) [lgxx.c       2984]
    M  *** ERROR => LgIGroup: LgIAttach(rc=-101) [lgxx.c       3504]
    A  TH VERBOSE LEVEL FULL

    M Mon Feb 22 09:18:28 2010
    M  *** ERROR => NiProcMsg: rc=-104 (NIEROUT_SNC_FAILURE) from router [nibuf.c      423]
    M  *** ERROR => MsIAttachEx: NiBufConnect to /H/192.168.100.7/S/sapdp99/H/194.39.131.34/S/sapdp99/H/oss001/sapmsOSS failed (rc=NIEROUT_SNC_FAILURE) [msxxi.c      633]
    M  *** ERROR => LgIAttach: MsAttach (rc=NIEROUT_SNC_FAILURE) [lgxx.c       2984]
    M  *** ERROR => LgIGroup: LgIAttach(rc=-101) [lgxx.c       3504]
    A  TH VERBOSE LEVEL FULL

    C Mon Feb 22 10:01:09 2010
    C  Rollback Work (0)

    A Mon Feb 22 10:18:24 2010
    A  TH VERBOSE LEVEL FULL
    M  ***LOG R68=> ThIRollBack, roll back () [thxxhead.c   12304]
    C  Rollback Work (0)

    A Mon Feb 22 10:18:26 2010
    A  Mon Feb 22 10:18:26 2010

    A  ABAP/4 Program /SDF/SAPLRI_SQLSERVER                   .
    A  Source /SDF/LRI_SQLSERVERU02                    Line 264.
    A  Error Code CALL_FUNCTION_CONFLICT_LENG.
    A  Module  $Id: //bas/640_REL/src/krn/runt/abfunc.c#14 $ SAP.
    A  Function FuncParams Line 2906.
    C  Rollback Work (0)
    C  sloledb.cpp [DoDbcc,line 2930]: Error/Message: (err 2571, sev 0), User 'prd' does not have permission to run DBCC loginfo.
    C  Procname: [No proc]
    C  statement rerun with user dbo was successful, you can ignore the preceeding message

    C Mon Feb 22 10:18:29 2010
    C  sloledb.cpp [ParamStmtExec,line 12251]: Error/Message: (err 50000, sev 0), Table not found.
    C  Procname: [##Y3PKG_PRDprd00000024400000012657081342]
    C  ParamStmtExec failed.  HR 80040e14 DBSL retcode 99. stmt: [sap_get_table_size_info 'syscomments', 'prd', 'PRD'
    C  /* R3:CL_SQL_RESULT_SET=============CP:234 T: */
    C  ]
    C  Conn_i:2 selection:1 singleton:0 flag_fupd:0 use_cursor:0 chksum: 222194
    C  dbdsmss: DBSL99 SQL50000
    C  Table not found.
    B  ***LOG BY2=> sql error 50000      performing FET        [dbds#3 @ 592] [dbds    0592 ]
    B  ***LOG BY0=> Table not found. [dbds#3 @ 592] [dbds    0592 ]
    B  ***LOG BY1=> sql error 50000      [dbacds#2 @ 1187] [dbacds  1187 ]
    Could anybody advice me on this
    Regards,
    Zul

    Hi,
    I hope 440000 will not the cause,
    this might occur due to many reasons,
    1. make sure you have all the components(Applications,OSlevel,DBlevel) are at same level in entire the landscape.
    2. you can observe the evenlogs at OSlevel to get the error information pointing to. Also check for the dumps/logs(work direcotry).
    3. if not, can open SAP message.
    regards
    Nagaraju

  • Run-time error SAPSQL_ARRAY_INSERT_DUPREC occurred

    When creating a new SyncBo (T51) instance after syncing eventually MI Clients shows the following message:
    [20070315 01:28:14:343] E [MI/Sync ] Received exception info code 10 and detailed message "Exception while callSync: The ABAP/4 Open SQL arrayinsert results in duplicate database records. records in the data base."
    In sm21 shows message:
    AB0 Run-time error "SAPSQL_ARRAY_INSERT_DUPREC" occurred
    AB1 > Short dump "070316 205056 sapnw ELDA " generated
    Looking for SAPSQL_ARRAY_INSERT_DUPREC error in SAP Note we found the note 817849 (Runtime error SAPSQL_ARRAY_INSERT_DUPREC occurs during sync).
    We have downloaded and applied this note in Backend as note requires and ALL prerequisites of this note. Also we have upgraded to SP19 and Kernel to 155 (part 1 and 2). But problem continues and the client that happened this problem does not work any more, all new SyncBO instances created goes to MEREP_MON as Waiting status.
    The dump on duplicate record is happening when the user is synchronizing and when a record is getting inserted to table merep_10100.
    The solution /workaround could be to do a client reset for those devicesand test again and see if it is happening, but error returns happening after this.
    When this happen SyncBo instance keeps on Waiting status (MEREP_MON). We couldn't understand why this happen suddenly and then no more new SyncBo could be created, all goes to Waiting status. Reprocess (ShiftF5) or start handler (Shift10) does not take any effect.
    Best Regards,
    Rogério

    Hi Ajith
    I am getting the same error and below is the error message from ST22. The only change is I am using for MTR application and the sync fails for the 2nd time when synched for patches for the MTR application. As it is generic sync, could you please advice to get rid of the problem.
    An exception occurred. This exception is dealt with in more detail below
    . The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
      neither
    caught nor passed along using a RAISING clause, in the procedure
      "LOG_INSERT_DB" "(FORM)"
    Since the caller of the procedure could not have expected this exception
      to occur, the running program was terminated.
    The reason for the exception is:
    If you use an ABAP/4 Open SQL array insert to insert a record in
    the database and that record already exists with the same key,
    this results in a termination.
    (With an ABAP/4 Open SQL single record insert in the same error
    situation, processing does not terminate, but SY-SUBRC is set to 4.)
    Thanks, Raj

  • Run-time error '3251':

    Hi All,
    I'm getting an error with my code below.
    I'm trying to find out if any records exist, if they do, edit the record. if not insert new record. but i'm getting the error message:
    Run-time error '3251':
    Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
    My Code Below:
    Sub StoreTarDscOrPrdIDNext()
    Dim conn As ADODB.Connection
    Dim prdDsc, prdID As ADODB.Recordset
    Dim strConn As String
    strConn = "Provider = Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & ThisWorkbook.Path & "\eps.mdb"
    Set conn = New ADODB.Connection
    conn.Open strConn
    Set prdDsc = conn.Execute("SELECT hs_cod FROM hs_log where prd_dsc = '" + LCase(txtDesc.value) + "'")
    Set prdID = conn.Execute("SELECT DISTINCT hs_cod FROM hs_log where prd_id = '" + LCase(cboProductID.value) + "'")
    'On Error GoTo ErrorHandler
    storTarDscPrd = Application.WorksheetFunction.VLookup("storTarDscPrd", Worksheets("config").Range("B:C"), 2)
    'If storTarDscPrd = "1" Then
    'store tariff and description
    If Not (prdDsc.BOF And prdDsc.EOF) Then 'There are no records if Beginning-Of-File and End-Of-File are both true.
    'if found Ask to Edit record
    EditTar = MsgBox(Prompt:="Edit record?", Buttons:=vbYesNo, Title:="ePrisoft")
    If EditTar = vbYes Then
    prdDsc("hs_cod") = Trim(cboTariffNo2.value)
    prdDsc.Update
    'Set prdDsc = conn.Execute("UPDATE hs_log SET hs_cod = '" + Trim(cboTariffNo2.value) + "' WHERE prd_dsc = '" + LCase(Trim(txtDesc.value)) + "'")
    End If
    MsgBox "Edit"
    Else
    'else insert new record
    prdDsc.AddNew
    prdDsc("prd_dsc") = LCase(Trim(txtDesc.value))
    prdDsc("hs_cod") = Trim(cboTariffNo2.value)
    prdDsc.Update
    'sql = "INSERT INTO hs_log (prd_dsc, hs_cod) VALUES '" + LCase(Trim(txtDesc.value)) + "','" + Trim(cboTariffNo2.value) + "'"
    'Set prdDsc = conn.Execute("INSERT INTO hs_log (prd_dsc, hs_cod) VALUES '" + LCase(Trim(txtDesc.value)) + "','" + Trim(cboTariffNo2.value) + "'")
    MsgBox "Insert"
    End If
    'ElseIf storTarDscPrd = "2" Then
    'store tariff and productid
    'Else
    'dont store tariff
    'End If
    'ErrorHandler:
    'Err.Clear
    'Resume Next
    prdDsc.Close
    Set prdDsc = Nothing
    prdID.Close
    Set prdID = Nothing
    conn.Close
    Set conn = Nothing
    End Sub
    Any help would be appreciated
    Thanks

    Instead of doing all that, Read about merge statement,
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm#SQLRF01606
    more examples.
    http://www.oracle-base.com/articles/10g/MergeEnhancements10g.php
    http://psoug.org/reference/merge.html

  • Run time error while closing the CRM Order using BAPI

    Hi Experts,
    Need your invaluable suggestions here.Apologies for the lengthy mail, intention is to give clear idea of the issue.
    I am facing an issue while closing the CRM orders. According to our business process, when an issue is solved we will keep the order in resolved status only. We will not directly close the order from the CRM tool, instead we have created a custom program for the same purpose.
    For the custom program we will give input as the order number and execute it, this will close the order.
    Here close the order means assigning it to Close status as well assign the reason code.
    We have created some reason codes for closed status.
    So when the program is run the Order moves from resolved status to closed status along with reason code.
    But of late we are facing some problems with this program, it is giving run time error for some CRM orders.
    Run time error message : The ABAP/4 Open SQL array insert results in duplicate database records.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught in procedure "CRM_SERVICE_OS_UPD_OST_DU" "(FUNCTION)", nor was it propagated by a RAISING clause.
    Please find my code which have used in the custom program
    Closing the resolved SOs in the system
        CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'
            EXPORTING
              objnr                     = iv_guid
              user_status          = lc_status_closed
           EXCEPTIONS
             object_not_found          = 1
             status_inconsistent       = 2
             status_not_allowed       = 3
             OTHERS                        = 4.
        IF sy-subrc <> 0.
          WRITE :  'Error at maintaining status'.
        ENDIF.
    Set reason code
    build lt_subject
        ls_subject-ref_guid = iv_guid.
        ls_subject-katalogart = 'A2'.
        ls_subject-codegruppe = 'ZR000003'.
        ls_subject-code       = 'ZR33'.                      " Reason code
        ls_subject-mode       = 'A'.
        APPEND ls_subject TO lt_subject.
    build lt_ossset
        ls_osset-ref_guid        = iv_guid.
        ls_osset-subject_profile = 'ZREASON03'.
        ls_osset-profile_type    = 'G'.
        ls_osset-subject         = lt_subject.
        APPEND ls_osset TO lt_osset.
    build lt_service_os
        ls_service_os-ref_guid  = iv_guid.
        ls_service_os-ref_kind  = 'A'.
        ls_service_os-osset     = lt_osset.
        APPEND ls_service_os TO lt_service_os.
    build lt_input_fields
        REFRESH: lt_input_fields, lt_field_names.
        CLEAR  : ls_input_fields, ls_field_names.
        ls_field_names-fieldname    = 'CODE'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'CODEGRUPPE'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'KATALOGART'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'SERVICE_PROFILE'.
        APPEND ls_field_names TO lt_field_names.
        ls_input_fields-ref_guid    = iv_guid.
        ls_input_fields-ref_kind    = 'A'.
        ls_input_fields-objectname  = 'SERVICE_OS'.
        ls_input_fields-field_names = lt_field_names.
        APPEND ls_input_fields TO lt_input_fields.
         CALL FUNCTION 'CRM_ORDER_MAINTAIN'
          EXPORTING
            it_service_os     = lt_service_os
          CHANGING
            ct_input_fields   = lt_input_fields
          EXCEPTIONS
            error_occurred    = 1
            document_locked   = 2
            no_change_allowed = 3
            no_authority      = 4
            OTHERS            = 5.
        IF sy-subrc <> 0.
          WRITE :  'Error at maintaining reason'.
        ENDIF.
        CALL FUNCTION 'CRM_ORDER_SAVE'
          EXPORTING
            it_objects_to_save   = lt_header_guid
            iv_update_task_local = lv_update_task_local
          IMPORTING
            et_saved_objects     = lt_saved_objects
          EXCEPTIONS
            document_not_saved   = 1
            OTHERS               = 2.
        IF sy-subrc <> 0.
          WRITE : 'Error at saving'.
        ELSE.
          WRITE : 'Successfully Closed'.
          COMMIT WORK AND WAIT.
        ENDIF.
    Run time error is coming at COMMIT WORK AND WAIT statement.
    Please let me know any corrections are required in the above program.
    When I analyzed the run time error I have found that it trying to insert the record in CRMD_SRV_OSSET for that CRM order, but already one record is present in the table for the same CRM order number.
    For most of the CRM orders there is no entry in this table so they are closing successfully but for a few orders for which there is an entry we are getting the above run time error.
    There is nothing wrong with the orders which have an entry already in the table CRMD_SRV_OSSET, I need to close these kind of orders with out run time error.
    Kindly provide your feedback.

    Hi Dinakar,
    You posted this in APO PPDS forum. This question should go to PP forum where someone could answer it.
    Please close this thread and open a new thread in PP forum so that you could get help quickly from the relevant experts.
    Regards - Pawan

  • RUN Time error while use filter table in query generator

    Hai..
                   I have 2 Functions under "Scalar valued functions" in SQL Server,i try to call this functions in Query generator its working fine,result also display correctly, but i click filter table system showing  Error Message " Run Time Error,Abnormal program termination" then SAP is get closed,i tested this scenario in 3 Database am getting same error , Is this BUG in SAP B1?There is no error number in error message

    This is my function
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    -- =============================================
    -- Author:          <Author,,Name>
    -- Create date: <Create Date, ,>
    -- Description:     <Description, ,>
    -- =============================================
    ALTER function [dbo].[Get_TransObjName](@Obj_type NUMERIC(20,5))
    returns varchar(500) as
    BEGIN
    DECLARE @Obj_type_Name varchar(100)
    select @Obj_type_Name =
    case @Obj_type
    when     -2     then     'Opening Balance'
    when     -3     then     'Closing Balance'
    when     1     then     'oChartOfAccounts'
    when     2     then     'oBusinessPartners'
    when     3     then     'oBanks'
    when     4     then     'oItems'
    when     5     then     'oVatGroups'
    when     6     then     'oPriceLists'
    when     7     then     'oSpecialPrices'
    when     8     then     'oItemProperties'
    when     12     then     'oUsers'
    when     13     then     'A/R Invoices'
    when     14     then     'A/R Credit Memo'
    when     15     then     'A/R DeliveryNotes'
    when     16     then     'A/R Returns'
    when     17     then     'oOrders'
    when     18     then     'A/P Invoice'
    when     19     then     'A/P Credit Memo'
    when     20     then     'Goods Receipt PO'
    when     21     then     'Goods Returns'
    when     22     then     'PurchaseOrders'
    when     23     then     'Quotations'
    when     24     then     'IncomingPayments'
    when     25     then     'Deposit'
    when     28     then     'oJournalVouchers'
    when     30     then     'JournalEntries'
    when     31     then     'oStockTakings'
    when     33     then     'oContacts'
    when     36     then     'oCreditCards'
    when     37     then     'oCurrencyCodes'
    when     40     then     'oPaymentTermsTypes'
    when     42     then     'oBankPages'
    when     43     then     'oManufacturers'
    when     46     then     'VendorPayments'
    when     48     then     'oLandedCostsCodes'
    when     49     then     'oShippingTypes'
    when     50     then     'oLengthMeasures'
    when     51     then     'oWeightMeasures'
    when     52     then     'oItemGroups'
    when     53     then     'oSalesPersons'
    when     56     then     'oCustomsGroups'
    when     57     then     'ChecksforPayment'
    when     58     then     'Stock List'
    when     59     then     'Goods Receipt'
    when     60     then     'Goods Issue'
    when     64     then     'oWarehouses'
    when     65     then     'oCommissionGroups'
    when     66     then     'oProductTrees'
    when     67     then     'Inventory Transfers'
    when     68     then     'oWorkOrders'
    when     69     then     'Landed Costs'
    when     70     then     'oCreditPaymentMethods'
    when     71     then     'oCreditCardPayments'
    when     73     then     'oAlternateCatNum'
    when     76     then     'Postdated Deposit'
    when     77     then     'oBudget'
    when     78     then     'oBudgetDistribution'
    when     81     then     'oMessages'
    when     91     then     'oBudgetScenarios'
    when     97     then     'oSalesOpportunities'
    when     93     then     'oUserDefaultGroups'
    when     101     then     'oSalesStages'
    when     103     then     'oActivityTypes'
    when     104     then     'oActivityLocations'
    when     112     then     'oDrafts'
    when     116     then     'oDeductionTaxHierarchies'
    when     117     then     'oDeductionTaxGroups'
    when     125     then     'oAdditionalExpenses'
    when     126     then     'oSalesTaxAuthorities'
    when     127     then     'oSalesTaxAuthoritiesTypes'
    when     128     then     'oSalesTaxCodes'
    when     134     then     'oQueryCategories'
    when     138     then     'oFactoringIndicators'
    when     140     then     'oPaymentsDrafts'
    when     142     then     'oAccountSegmentations'
    when     143     then     'oAccountSegmentationCategories'
    when     144     then     'oWarehouseLocations'
    when     145     then     'oForms1099'
    when     146     then     'oInventoryCycles'
    when     147     then     'oWizardPaymentMethods'
    when     150     then     'oBPPriorities'
    when     151     then     'oDunningLetters'
    when     152     then     'oUserFields'
    when     153     then     'oUserTables'
    when     156     then     'oPickLists'
    when     158     then     'oPaymentRunExport'
    when     160     then     'oUserQueries'
    when     162     then     'Inventory Valuation'
    when     163     then     'oCorrectionPurchaseInvoice'
    when     164     then     'oCorrectionPurchaseInvoiceReversal'
    when     165     then     'oCorrectionInvoice'
    when     166     then     'oCorrectionInvoiceReversal'
    when     170     then     'oContractTemplates'
    when     171     then     'oEmployeesInfo'
    when     176     then     'oCustomerEquipmentCards'
    when     178     then     'oWithholdingTaxCodes'
    when     182     then     'oBillOfExchangeTransactions'
    when     189     then     'oKnowledgeBaseSolutions'
    when     190     then     'oServiceContracts'
    when     191     then     'oServiceCalls'
    when     193     then     'oUserKeys'
    when     194     then     'oQueue'
    when     198     then     'oSalesForecast'
    when     200     then     'oTerritories'
    when     201     then     'oIndustries'
    when     202     then     'oProductionOrders'
    when     203     then    'A/R Down Payment'
    when     204     then    'A/P Down Payment'
    when     205     then     'oPackagesTypes'
    when     206     then     'oUserObjectsMD'
    when     211     then     'oTeams'
    when     212     then     'oRelationships'
    when     214     then     'oUserPermissionTree'
    when     217     then     'oActivityStatus'
    when     218     then     'oChooseFromList'
    when     219     then     'oFormattedSearches'
    when     221     then     'oAttachments2'
    when     223     then     'oUserLanguages'
    when     224     then     'oMultiLanguageTranslations'
    when     229     then     'oDynamicSystemStrings'
    when     231     then     'oHouseBankAccounts'
    when     247     then     'oBusinessPlaces'
    when     250     then     'oLocalEra'
    when     280     then     'oSalesTaxInvoice'
    when     281     then     'oPurchaseTaxInvoice'
    when     300     then     'BoRecordset'
    when     305     then     'BoBridge'
    when     260     then     'oNotaFiscalUsage'
    when     258     then     'oNotaFiscalCFOP'
    when     259     then     'oNotaFiscalCST'
    when     261     then     'oClosingDateProcedure'
    when     10     then     'oBusinessPartnerGroups'
    when     278     then     'oBPFiscalRegistryID'
    else cast(@Obj_type as char(20)) end
    return @Obj_type_Name
    END

Maybe you are looking for

  • Event trigger in sap pi 7.3.1

    Hi I looking standard approach on below requirement . 1.  Requirement :  All failed messages needs to post to JMS adapter using Event trigger , when message failed in SAP PI. 2.Audit log : In SAP 7.3.1  I need to post message audit log to JMS adapter

  • No dock, No spaces, no expose corners availability

    Hi My macbook pro was really slow this morning, I emptied some disk space then I made verify and repair permission and now I don't have dock, I can't setup spaces or I tried settings expose corners and It doesn't work either. I restart the laptop man

  • Almost ready to throw in the Apple Towel :(

    Hi guys im really hoping someone can help me here as after 5 days of googling and pointless visits to the Apple store im still unable to use my Imac (mid2011). A little background i bought it 2nd hand from Ebay and it came installed with Windows 7 bu

  • Hi, how to mark the thread as sticky thread?

    Hi, how to mark the thread as sticky thread? Thanks & Regards, Swathi

  • Jsf pages extension

    Hi! I have one question: JSF has defined any extension for the pages like struts has .jsp? .jsf or .faces, or something like that! I can put what I want? Like .asdfsfd? Thank you!!!