Error in Adding Fields.

I am trying to add 2 additional fields to my report below.  I highlighted in yellow the code that I added.  I keep getting the "failed to retrieve data from the database error."  I know it is hard to tell what is wrong from the error I just described, but does anyone see anything wrong with my highlighted lines?  Is there something I did wrong or need to do?  Any help is greatly appreciated.
with accts as (
select a.rmsfilenum, misddesc,a.attrnycode,rmsacctnum,c.rmszipcode,
cast(char(action_code) as char(16) ccsid 37)  as action_code,
cast(char(result_code) as char(16) ccsid 37)  as result_code,
a.rmstrandte,
case when action_code = '4' then 'Home Phone' else 'Other Phone' end as Phonetype,
rmstrantim,rmsdateasg,
rmsbrglvl5,
rmsbrglvl6
from
rptingdata.roactreacc a
left join reporting.rmaster b
on a.rmsfilenum =  b.rmsfilenum
left join reporting.rcomker c
on a.rmsfilenum = c.rmsfilenum
left join reporting.rsasrecv d
on a.attrnycode = d.rmsrecvrcd
left join reporting.rofcrcd e
on a.attrnycode = e. attrnycode
where c.recordtype = 'D'
and e.rmsbrglvl6 = ‘5006’
and 
           ( action_code = '4'
and rmstrandte between Replace(Char((Cast(Timestamp({?Enddate}||'000000') As Date)) - 6 days, ISO),'-','')  and {?Enddate}
  or
           ( action_code in ('3','5','25','26','27')
and rmstrandte between  Replace(Char((Cast(Timestamp({?Enddate}||'000000') As Date)) - 29 days, ISO),'-','')  and {?Enddate}
totissue as (
select rmsfilenum,phonetype, count(*) as totcount
from accts
group by rmsfilenum,phonetype
having count(*) > 2
totcount as (
select a.*, totcount , Replace(Char((Cast(Timestamp({?Enddate}||'000000') As Date)) - 6 days, ISO),'-','') as strtdt
from accts a
join totissue b
on a.rmsfilenum = b.rmsfilenum
and a.phonetype = b.phonetype),
uniqatty as (
select rmsfilenum,attrnycode from totcount group by rmsfilenum,attrnycode),
attyplcdt as (
select a.rmsfilenum, b.rmstrandte as plcdt, c.rmstrandte as recalldt
from uniqatty a
left join reporting.rhistfl b
on a.rmsfilenum = b.rmsfilenum
and b.rmsfldimpl = 'ATTRNYCODE' and b.hstnewvalu = a.attrnycode
left join reporting.rhistfl c
on a.rmsfilenum = c.rmsfilenum
and c.rmsfldimpl = 'ATTRNYCODE' and c.hstoldvalu = a.attrnycode
select a.*, plcdt,recalldt
from totcount a
join attyplcdt b
on a.rmsfilenum = b.rmsfilenum 

Have you tried putting the "e." in front of the field names?
Also, I would copy all of this SQL and paste it into a database query tool such as Toad or SQL Server Management Studio (which tool you use depends on what type of database and the tools you have available).  Get the query working in there and then paste it back into the Command editor in Crystal.
-Dell

Similar Messages

  • Error while Adding field on Screen Variant

    Hi SAP Gurus,
    I want to add one field Trading partner in Fast entry screen.
    I am getting below error message while adding one field Trading Partner in Screen Variant ES007(O7E6)
    FIELD instruction for field BSEG-VBUND missing on template screen
    Message no. F4171
    Please let me know where do I have to maintain Trading partner field in template screen.
    A quick response on this is highly appreciate.
    Regards,
    SATVIR SINGH
    Edited by: Satvir S Digwa on Oct 6, 2010 12:41 PM

    Hi
    Go through the below link:
    Re: Trading partner in Field Status Group
    Rgds
    Vani

  • Error! Adding fields to the field catalog

    Dear Sap Support,
    I just added to the field catalog the field "Short Text" which stands for product description. The thing is that this field was needed in the tab "Discount" of the Marketing Planner.
    This field was then added to the table CUS_002 (usage PR), and table CUS_003 (usage FG)
    After that change, when I go to the marketing planner and try to insert a new condition, the program throws an error just right after a choose the product to be discounted. The error says: "FIELD_CHECK/DEFAULT_VALUE_SUGGESTION for BAdI /SAPCND/ROLLNAME for filter COMT_PRSHTEXTX is missing"
    Where can I find that Badi? and how does it have to be implemented?
    Best regards,
    Mariana

    Hi Mariana
    How did you slove the problem
    Thanks
    Ron

  • Getting error while adding field to data viewer web part

    I have custom EditItemForm for a custom list having over 100 columns. That EditItemForm contains a DataFormWebPart in edit mode having over 100
    <SharePoint:FormField controls.
    If I browse for the above page in internet explorer, I got got the generic error:
    "Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such
    as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
    Correlation ID:XXXXXXX"
    I went to Log, and got the exact error details as follows,
    "Error while executing web part: System.StackOverflowException: Operation caused a stack overflow.     at
    Microsoft.Xslt.NativeMethod.CheckForSufficientStack()     at <xsl:template name="dvt_1.rowedit">(XmlQueryRuntime , XPathNavigator , Double , String )     at <xsl:template name="dvt_1.body">(XmlQueryRuntime
    , IList`1 , Double , Double )     at <xsl:template name="dvt_1">(XmlQueryRuntime , XPathNavigator )     at Root(XmlQueryRuntime )     at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument,
    XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter)     at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter
    results)     at System.Xml.Xsl.XslCompiledTransform.Tr..."
    Then I thought of removing some columns from the dataFormWebpart. I removed several
    <SharePoint:FormField controls from the dataFormWebpart. Then page started working fine.
    Please let us know if there is any workaround to fix this issue.
    Note: The same page was working fine in MOSS 2007 before migrating to SharePoint
    2010.
    Sharepoint Consultant from NY, USA

    In SP1 and earlier, you could sometimes fix this by breaking the "dvt_1.rowedit" template into smaller templates and calling them sequentially. Sadly, this no longer works in many cases.
    Microsoft's "fix" for this problem appears in the August 2011 CU (Possibly earlier in the June CU - haven't checked that one). They have implemented a one-second timer that artificially throws a stack overflow exception if a transform takes longer than 1
    second.
    Reflector shows us what's going on. As the stack trace shows, it's in Microsoft.Xslt.NativeMethod.CheckForSufficientStack().
    A dateTime variable has been set to Now + 1 second when a Microsoft.Xslt.NativeMethod.SetStackBarrier() method was called, then we have this gem:
    public static unsafe void CheckForSufficientStack()
    void* stackBarrier = StackBarrier;
    if (dateTime < DateTime.Now)
    throw new StackOverflowException();
    if (&stackBarrier < stackBarrier)
    throw new StackOverflowException();
    As you can see, there has been no real stack overflow, and there isn't even any provision for allowing a SharePoint admin to adjust the now-plus-one-second hack.
    The MSFT support person we spoke with said this code was added in the August CU to "prevent long transforms from bringing down the server." So... Let's see what the SP1 version of the same method looks like:
    public static unsafe void CheckForSufficientStack()
    void* stackBarrier = StackBarrier;
    if (((++callCount & 0xffff) == 0) && (dateTime.AddSeconds(5.0) < DateTime.Now))
    throw new StackOverflowException();
    if (&stackBarrier < stackBarrier)
    throw new StackOverflowException();
    Well, at least it allowed 5 seconds instead of 1....

  • Error during adding fields by EEWB

    Dear Experts;
    We are implementing SAP CRM 6.0, we need additional fields in Business Partner.  We are tried to add them by using EEWB. However we got an error and are not able to generate new fields.
    The error message is :
    "Object R3TR TABU CRMC_BLUEPRNTC, which is not checked by the Transport Organizer, and object R3TR TABU CRMC_ACCESS, which is checked, cannot be edited in the same request."
    Firstly we supposed that it is caused by locking of object in request. We released all requests, deleted all projects created via EEWB and create new fresh EEWB project with new workbench and customizing request. However we are still facing the same problem.
    when we use package $TMP we don't face this problem (as it doesn't use request) but when we use our own package we got this error.
    What might be the reason? How can we solve this? Any idea will be appreciated.
    Thanks in advance
    Mehmet

    Hi Mehmet,
    never seen this error occur.
    I suppose you have created a new transport request as well? During my encounters with the EEWB I found it useful to hava a clean request for both customizing and workbench with two undefined tasks in them. One is for development, the other for repair. Maybe you can try this, if you have not done already?
    Did you have a look at the mentioned tables? Probably there is something wrong with them?
    cheers Carsten

  • Error while adding a custom field with Input help via AET

    Hi All,
    I need to add two custom field under Service orders at Item level in component BT140I_SRVP.
    One field is required to have the input search help f4 and autopopulates the second field
    I am able to add one field(not requiring help) successfully through AET .
    I have created one Zsearch_help in se11 and its successfully running  and Autopopulating seocnd field while I am testing it
    While adding second field through AET,I need to enter following details as -
    field label,search relevant ,serach help etc.
    When I type the name of my 'Zsearch_help' against field search help it gives me following error
    'Search help is not compatible'.
    Secondly,not getting getter and setter methods for the attrributes in BTAdminI.
    Last,please tell me if i create zhelp and activate it,would it automatically appear in the list on AETwhile assiging it to input field?
    Please help me out.Kindly be detailed as I am new to SAP CRM.
    Thanks,
    Shivani

    The question is answered in CRM 7.0 forum:
    Getting error while adding a custom field (with input help) through AET

  • Error message in WebGUI after adding fields with EEWB - Class doesn't exist

    Hello!
    After adding fields to the component BT111H_OPPT within EEWB and BSP_WD_CMPWB I recieved an error message while trying to open an Opportunity in the WebGUI, stating:
    Cannot display view MainWindow
    An exception has occured
    Exception Class CX_SY_DYN_ILLEGAL_CLASS - Method call of IF_BSP_WD_DYN_RT_REP_SUPPORT~GET_URL_PARAMETERS failed; the class ZL_BT111H_O_BSPWDCOMPONEN_IMPL does not exist
    Method: CL_BSP_WD_COMPONENT_FACTORY=>GET_REPOSITORY_XML
    Source text Row:25
    An exception occured during the activation of target view CUBTOpptOverview.MainWindow for the navigation
    An exception has occured
    Exceptions Class CX_BSP_WD_RUNTIME_ERROR - View CUBTOpptOverview.MainWindow could not be bound
    Method: CL_BSP_WD_VIEW_CONTROLLER=>BIND_VIEW
    Source text Row:162
    Has any one an idea, if this could be a bug or what went wrong? I am especially irritated, that it seems, that class was not created. After all I never changed any tables or anything in the background manually. I just used the standard tool EEWB, nothing else.
    Many thanks for any kind of help!
    By the way, I tried to go back all the steps I took previously to, kind of "un-do" my error, but I was not able to delete all created extensions, due to a another error - but that's a different story, or isn't it?
    Cheers,
    Marek

    Hello Experts,
    I know my question was a tricky one and no-one was able to help me from this forum. That's why I would like to share with you the solution I just recieved from SAP:
    Although all classes that were created whilst extending the component BT111H_OPPT were deleted, there still existed a seperate extension definition in ViewCluster BSPWDVC_CMP_EXT still persisted.
    I wasn't aware of the fact, that I had to delete that too.
    Note: in order to delete ViewCluster, use tx SM34
    The problem ist now solved!
    Cheers!
    Marek

  • Adding field to repository structure leads to syntax error in webservice

    Hello there,
    I have added a field to a structure that is used as a parameter type in a customer function module which is part of a function group which is the endpoint of an enterprise service.
    I would have expected the webservice where this structure is used to have been updated automatically. But no: When I check the service definition, I get an error message that the type is missing the new field. And sure enough, in the types tab of the service definition (in se80) the new field has not been added to the type (listed under "original types"! - which is kind of misleading, as obviously it is not identical to the repository type any longer).
    I'm at a loss here - how can I update the service definition and publish a corrected wsdl file, which includes the added field in the type description? I have looked many places in se80 and soamanager and sproxy, but to no avail. Must I delete and re-create the entire enterprise service?
    This is in SAP Netweaver 7.01 and no XI.
    -- Sebastian
    Edited by: Sebastian Millies on Jul 8, 2010 11:36 AM
    unmarked as a question, because answered in  [this thread|The specified item was not found.;. Sorry I saw this too late. Anyway, when using the "check" button, a dialog pops up asking whether the service should be updated. (This seemed not to happen when I was using the "check" context menu entry, by the way, but I cannot now exactly reproduce the condition).

    Hi,
    MAke sure there are no entries for application 03 in LBWQ, if you are using Queue delta update mode.
    Make sure there are no entries for application 03 in Sm13, if you are using V3 unserialzied update mode.
    You can do this by running collective run for applicaiton 03 in LBWE.
    And also make sure there are no entries in RSA7 for DS 2LIS_03_BF.
    Regards,
    Anil Kumar Sharma .P

  • Error while adding landed cost G/L account 5207010003      needs DR assignment for dimension 1;  fill in DR-related fields

    Error while adding landed cost G/L account 5207010003      needs DR assignment for dimension 1;  fill in DR-related fields

    Hi Rajesh
    Go to System Initilization =>  General Settings => Cost Accounting => Check the Dimension1 has Block Posting.
    Relase the Block and add the Document it will add.
    With Regards
    Balaji

  • Error in adding custom fields to mm01/mm02/mm03 trx

    Hello People,
    To add my custom fields in the basic view tab of MM01 transaction, i have performed the following steps:-
    1. Inserted the append structure in MARA table with the required fields.
    2. Copied function group 'MGD1' to 'ZMGD1' and then set the layout of screen '0001' as per my requirement.
    3. Then i made changes in spro as
         SPRO->Logistics-General->Material Master->Configuring the material master->define structure of data screens for each screen sequence and inserted my program name( of function group 'ZMGD1') and screen number(0001) in 21(Std ind.(short) tab pages)->7(Basic Data 1)->8(sequence).
    Now, if i click on SPRO option (view data screen), then i can see my fields added in basic data view...
    but when i execute 'MM01/MM02/MM03' trx  there my added fields do not appear....
    Does anyone know where i am missing out??
    Please suggest...
    Thanks in advance..
    Rgds,
    Abhi

    Here are some notes I have from when I recently added a new screen/subscreen to Material Master transactions.  Hopefully this information will help you.
    This guide should be used in conjunction with OSS note 44410 and IMG notes Logistics->Logistics Material Master->Material->Configure Customized Material Master.
    Online Maintenance.
    1. Add fields to append structure ZAEMARA.
    Use data dictionary maintenance u2013 SE11
    2. Generate table MARA.
    3. Add fields to view MARU and generate.
    Use data dictionary maintenance u2013 SE11.
    4. Create new sub-screen or add new fields to screen SAPLYMM1 9001.
    Use Screen Painter u2013 SE51.
    Change flow logic to add fields to field: statement and to add any validation required. Generate screen.
    If this is the first time additional data has been added to material master it will be necessary to create a new function group and associated programs. See Configure Customised Material Master paragraph Requirements.
    5. If new sub-screen, add to Customer main screen.
    Transaction OMT3.
    Double click on u2018Std industry sequenceu2019.
    Choose customer screen and Details.
    Change the first occurrence of 0001 (blank screen) to new screen number.
    Save.
    Back arrow.
    Click on Transport button and choose required transport.
    6. To include in 'Copy with Reference' processing - MM01, add new MARA fields to table T130F. (in each client)
    Use Transaction SM31. (make a copy of another ZZ field by typing over existing name).
    Add to transport manually:- R3TR TABU T130F + individual keys
    7. Test Material create, change, display.

  • Error while adding a connector for SSL..help!!!

    i'm getting this error when i added a connector for SSL and restarted tomcat
    my connector tag is
    <Connector keystorePass="kalima" scheme="https" port="8443" sslProtocol="TLS" redirectPort="-1" enableLookups="true" keystoreFile="Mykeystore" protocol="TLS" keystore="C:\Documents and Settings\santhoshyma\Mykeystore" clientauth="false" algorithm="SunX509" keypass="changeit" secure="true" keytype="JKS">
          <Factory className="org.apache.coyote.tomcat5.CoyoteServerSocketFactory" keystorePass="kalima" keystoreFile="C:\SSLTest\Mykeystore"/>
        </Connector>
    LifecycleException:  Protocol handler instantiation failed: java.lang.NullPointe
    rException
            at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.
    java:1368)
            at org.apache.catalina.core.StandardService.initialize(StandardService.j
    ava:609)
            at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
    a:2384)
            at org.apache.catalina.startup.Catalina.load(Catalina.java:507)
            at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424)

    The question is answered in CRM 7.0 forum:
    Getting error while adding a custom field (with input help) through AET

  • Adding field GAMNG ( Target Quantity )in the Data Source 2LIS_04_P_ARBPL

    We are adding field GAMNG ( Target Quantity ) in the Data Source 2LIS_04_P_ARBPL ( Work Center View from PP/PP-PI )
    The field GAMNG is available in the communication structure maintainace.
    The problem is- We are not able to drag & drap field GAMNG from the Communication structure LBWE. Getting the error - End phase  002 ***********************************************************
    Message no. D0322 ..
    We deleted Setup table , Meins field already exist in comm str.
    1. How we able to drag the field from the communication structure as getting the above error. We searched SDN & try to follow that method but not working.
    2. We can add the field in SE11 - Structure -Manually, then we have to write ABAP code.
    Kindly suggest correct answer.
    Edited by: sk kamaruzzaman on Dec 20, 2011 2:08 PM

    Hi,
    There could be a number of reasons why you are getting the error:
    1. Fields are not assigned to datatypes.
        - Check structure in SE11 and assign to datatypes.
    2. There are inactive appends in the extract structure.
        - Double-click one of the includes. You will get a new screen with the INCLUDE structure. Click the button append-structure. Check if the append is inactive.
    3. The appended structure is in a different development class from the one of the structure it is being appended to.
    Please review and apply the following notes carefully :
      766603  Activation problems with extract structures
      623411  LBWE: Gener. terminates with D0 322 (end phase 002)
      757923  LBWE: Generation terminates with D0 322 (end phase
      600708  D0 322: End phase 002
    It is not possible to enhance the datasource 2lis_04_MATNR with the field GAMNG (so its possible that its the same for 2LIS_04_P_ARBPL) because GAMNG has the reference field AMEIN, which has a STATE F (forbidden) in table TMCEXCFS .
    Check to see if this is the same on your system.
    Rgds,
    Colum

  • Error while Adding user to  'SunAccessManager' Resource

    Hi,
    I configured SAM Resource adapter in SIM 6.0. When I create a user and assign SAM Resource getting the following Error,
    com.waveset.util.WavesetException: An error occurred adding user 'uid=SIMUser2,ou=People,o=Employee,dc=nl,dc=dap,dc=com' to resource 'SunAccessManager'. com.waveset.util.WavesetException: An error occurred creating user. java.lang.IllegalArgumentException: Invalid parameters
    Pls help me to resolve this issue
    Thanks,
    Deva

    Hi Satish,
    The problem is that you added the table and the objetc that you used to add the table is not freed properly. You need to free the object and then the reference count to that table will be 0 - which will enable you to add the fields
    e.g
    Dim pUTables As SAPbobsCOM.UserTablesMD
    'Do your stuff
    Set pUTables = Nothing
    Dim pUFields As SAPbobsCOM.UserFieldsMD
    'Do your stuff
    Set pUFields = Nothing

  • Usertable error after adding a udf

    I have a UI add-on that assigns values ​​to a UDT by usertable object of the DI API, the problem is generated after adding a UDF from SAP menu and try to assign a value from the DI. The error is Invalida Field Name
    My question is, is necessary to wait a while until SAP records the new field to be accessible by usertable?
    Any suggestions?
    oUserTable.UserFields.Fields.Item("U_" + colName).Value = respuesta;

    Hi Ricardo,
    As far as I know, you can use this field as soon as it is added to the usertable. But please make sure that this has been added successfully in your table and also make sure that ("U_" + colName ) is the same as it appears in SQL Server. Make sure that you are providing the right field name.
    Hope it helps.
    Thanks & Regards
    Ankit Chauhan

  • Error on Adding AR Invoice

    Hi Experts,
    We have error on adding AR invoice (AR), Delivery (AR), Goods Receipt PO (AP), AP Invoice (AP). Please help on this error..
    below is the error message:
    [microsoft] [SQL Native Client] [SQL Server] Conversion failed when converting the nvarchar value '65002 0' to data type int. (CINF)
    Thanks,
    John

    Hi Jon,
    What Rahul meant was, if you have certain user defined fields or tables in SAP B1, these user defined fields can have some data or queries. This data or data returned by queries may have some strange characters in them. So he asked you to disable all your FMS fields and then test to ensure the error.
    I found one more link, they have similar problems as yours due to Store Procedures they had and migrated from 2007A to 8.8. Could this be your situation? Please read through this link - [Microsoft][SQL Native Client][SQL Server]Conversion failed when converting and note the SAP B1 notes.

Maybe you are looking for

  • Can not connect to itunes store ever since I did the update.

    I have tried everything from flushing my DNS, Reloading my itunes, checking my anti-virus software which is Symantec, Making sure my firewall enables itunes. One thing is that when i go into add or remove programs it asks if i want to repair itunes a

  • My mail application is canceling my shut down request. Can anyone help?

    When I try to shutdown or restart my Macbook I receive a message saying that the mail application has canceled my request. This is despite me having already quit the mail application. After I receive this message the mail application starts up again.

  • Java's Runtime.exec() method

    When you shell out to java's Runtime.exec() method, are the process name and arguments the same for the child process that is spawned. We see duplicated processes about the time when our logs tell us this command was run. However, we cannot seem to r

  • PC to Mac conversion problem on (older) ipod

    My ipod was set up with a pc (about 1 1/2 years ago). Now that I'm running the latest OS on my ibook G-4, I want to erase it and reformat in mac. I also just bought a new nano. I plugged it into my ibook and everything works great. When I use the sam

  • [Solved] Vlc seg faults after latest upgrade

    When updating vlc I now get this message  from pacman /tmp/alpm_LHUeqA/.INSTALL: line 1: 1809 Segmentation fault (core dumped) usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugins Running vlc outputs VLC media player 2.0.6 Twoflower (revision 2.0.6-0-gb