Abap Code to Repeat the field (3nos) Values for all the fields

Hi Friends I have a Requirement to merge the Data for One of my BI - BCS model.
I have fields in one table(/BIC/AZDBBCP_040) <b>business Num , PRCTR, REGION  and RELOCAT</b>  and Field ZAUD_TYP and Audit Year Zyear also in same table.
But I want to reapeat this information Highlighted in Bold for all the Zaudtyp and ZYEAR. Please help me with the Code
<b>Problem as below</b>
        BUSNUM  PRCTR  REGION  RELOCAT   ZAUD_TYP  ZYEAR
          101     22    ALAN      MN           
          101                                                                                GT(ZAUD_TYP)        1999(ZYEAR)
101                                      BTE         2001
102          25          CA        SFO          
           102                           LTE         2008
Please help me with any Code to fix the problem so that the data repeat for PRCTR  REGION  RELOCAT  where Bus Num is same.
Kindly Get me any ABAB Code . Will really be thankful to you
Regards
Soniya Kapoor
soniya kapoor
Message was edited by:
        soniya kapoor

Hi Soniya,
You can use one of the following:
IF SOURCE_FIELDS-DATETO =  ' '.
RESULT = '20990101'.
ENDIF.
or
IF SOURCE_FIELDS-DATETO IS INITIAL.
RESULT = '20990101'.
ENDIF.
or
IF SOURCE_FIELDS-DATETO = '00000000'.
" THERE WAS A SPACE IN YOUR CODE.
RESULT = '20990101'.
ENDIF.
Regards,
Satya

Similar Messages

  • Grouping to display null values for all the missing dates

    Hi SAP,
    I am trying to display '0.00' value for all the missing dates in my crystal reports as follows:
    17-Jan-14     40.00
    18-Jan-14       0.00
    19-Jan-14       0.00
    20-Jan-14     80.00
    However, my crystal report is showing as follows:
    17-Jan-14     40.00
    18-Jan-14       0.00
    19-Jan-14
    20-Jan-14     80.00
    The missing dates with no data are group together and my '0.00' value is not. Kindly advise me the solution. The formula is shown as per attached.
    Thank you.
    Regards.

    Hi,
    Thanks for your reply.
    Fyi, I am using a formula field in crystal report to display "0.00" for days in between as follows:
    whileprintingrecords;
    if Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy') = "" then "" else "0.00"
    There is another formula field in crystal report to display the missing dates in between as follows:
    whileprintingrecords;
    Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy')
    Below is my report custom functions:
    Function Days_Between (datefield as datetime, nextdatefield as datetime, format as string)
    ' This function is only used to display what data is missing within a specified date range...output type is text
    dim thisdate as date
    dim nextdate as date
    dim output as string 'output is the text display
    dim daysbetween as number
    dim looptimes as number
    looptimes = 0
    daysbetween = 0
    output = ""
    thisdate = datevalue(datefield) + 1
    nextdate = datevalue(nextdatefield)
    if nextdate - thisdate > 1 then daysbetween = nextdate - thisdate else daysbetween = 1
    do
    if nextdate - thisdate > 1 _
    then output = output + totext(thisdate, format) + chr(10) _
    else _
    if nextdate - thisdate > 0 _
    then output = output + totext(thisdate, format)
    looptimes = looptimes + 1
    thisdate = thisdate + 1
    loop until looptimes = daysbetween
        Days_Between = output
    End Function
    The issue arise when when there is more than one missing dates in between but the null values ("0.00") displayed is only for the first missing dates and not for all the missing dates.
    Regards,
    Ting Wei 

  • How can I shut off all of the pop-up windows for all the Firefox updates?

    How can I shut off all of the pop-up windows for all the Firefox and Thunderbird updates?
    Apparently now Mozilla creates new versions of their browser and email apps every two weeks instead of just creating updates... I'm tired of all of the pop-up requests for these constant installation requests and all the problems that the new version installations create... I just want to use the software and be left alone.
    I can't find a way to make Firefox and Thunderbird stop with the pop-up requests for new installations... is there a way to do this or has Mozilla just got it rigged so one can't just use the software without re-installing a new version every two weeks and running in to new plugin issues and missing features every time?
    Help!
    Thanks,
    numetro

    Is it possible that her computer is infected with malware.
    Do a malware check with several malware scanning programs on the Windows computer.
    Please scan with all programs because each program detects different malware.
    All these programs have free versions.
    Make sure that you update each program to get the latest version of their databases before doing a scan.
    *Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
    *AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
    *SuperAntispyware:<br>http://www.superantispyware.com/
    *Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
    *Windows Defender:<br>http://windows.microsoft.com/en-us/windows/using-defender
    *Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
    *Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
    You can also do a check for a rootkit infection with TDSSKiller.
    *Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • Greetings: I have multiple iPads and iPhones. I want all to be able to be able to stream to our Apple TV. All of the docs I see say you must have the same Apple ID for all the devices, but we each have our own Apple ID. Is this just a doc short coming?

    Greetings: I have multiple iPads and iPhones. I want all to be able to be able to stream to our Apple TV. All of the docs I see say you must have the same Apple ID for all the devices, but we each have our own Apple ID. Is this just a doc short coming?

    You can each have your own ID for your own iTunes accounts, but in order for a device to stream via AirPlay to the same Apple TV, everything must use the same homesharing ID. This is not the same as your iTunes account ID (although it can be for one of the devices)

  • Hi, how can I keep the same zoom level for all the pages I view in Safari and even when I close and open it.  Indeed with a 27 inch Imac I have a lot of space, most of the websites are built for smaller resolutions  and my sight is dropping !   Thx

    Hi, how can I keep the same zoom level for all the pages I view in Safari and even when I close and open it.  Indeed with a 27 inch Imac I have a lot of space, most of the websites are built for smaller resolutions  and my sight is dropping !   Thx

    Hi, how can I keep the same zoom level for all the pages I view in Safari and even when I close and open it.  Indeed with a 27 inch Imac I have a lot of space, most of the websites are built for smaller resolutions  and my sight is dropping !   Thx

  • All the users can buy for all the purchasing groups?

    Hello,
    I have created the organizational structure as follows:
    (root level 1) Company O  50000758
        (root level 2) Plant    O  50000759
        (root level 2) Purchasing organization   O  50000760
              (root level 3) Purchasing group1        O  50000761
              (root level 3) Purchasing group2        O  50000762
              (root level 3) Purchasing group3        O  50000763
    The Plant and the Purchasing organization bellows to the Company
    The Purchasing group bellows to the Purchasing organization
    (level A) Position DATA-ENTRY1
    (level B) Central person (employee) DATA-ENTRY1
    (level C) User DATA-ENTRY1
    (level A) Position DATA-ENTRY2
    (level B) Central person (employee) DATA-ENTRY2
    (level C) User DATA-ENTRY2
    All the users can buy for all the purchasing groups
    At what level I have to assign the Positions (levelA)?
    Cheers,
    Marta

    Hello Subram,
    Thank you very much for your help.
    To shop on behalf, I have to fill the attribute REQUESTER at (level A) Position level.
    What I have to put in that attribute? The (root level 2) Purchasing organization O 50000760?
    I have a error when I put 50000760? ...."Object type XX not defined"
    Do you know how to help me?
    Cheers,
    Marta

  • DCIteratorBinding setting the same value for all the rows.

    Hi all,
    I have table with on of the column as id. I have made the id column as the hyper link , that takes me to the next page. I am trying to pass the id to the next page. I am using the managed bean for the same. The below code is used to create the link on the column. It sets the action to the function in the bean that sets the id as of the current row.
    <tr:column sortProperty="id" sortable="false"
    headerText="#{bindings.notification.hints.id.label}"
    id="c4">
    <tr:commandLink action="choice" text="#{row.bindings.id.inputValue}"
    id="cl1" actionListener="#{IdBean.extractID}">
    </tr:commandLink>
    </tr:column>
    below is the IdBean.extratctID()
    public void extractID(ActionEvent actionEvent){       
    BindingContext bindingContext = BindingContext.getCurrent();
    BindingContainer bindings;
    bindings = bindingContext.getCurrentBindingsEntry();
    DCIteratorBinding iter;
    iter = (DCIteratorBinding) bindings.get("notificationIterator");
    Row rw;
    rw = iter.getCurrentRow();
    String id;
    id = (String) rw.getAttribute("id");
    this.setId2(id);
    I am printing the id value on to the next page. But its just returning the vslue of the id for the first row for all the rows of the table.
    Any inputs as in do i need to refresh the iterator or something like that.
    Reagrds
    Sishant

    Hi,
    Following is the code i have added in my bean
    ValueExpression expression = getFacesContext().getApplication().getExpressionFactory().createValueExpression(getFacesContext().getELContext(), "#{pageFlowScope.emp1}", Object.class);
    Object id = expression.getValue(getFacesContext().getELContext());
    public FacesContext getFacesContext() {
    return FacesContext.getCurrentInstance();
    JSPX Code -
    <af:commandImageLink id="DuncanAngove"
    icon="/john.gif" partialSubmit="true"
    actionListener="#{Tweets.setEmployeeId}">
    <af:setActionListener from="Duncan Angove" to="#{pageFlowScope.emp1}" />
    But i am getting NullPointerException. I have tried it with application and request scope as well.
    javax.servlet.ServletException
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
         at org.apache.myfaces.trinidad.component.UIXComponentBase.getValueExpression(UIXComponentBase.java:231)
         at project1.Tweets.setEmployeeId(Tweets.java:40)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:698)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         ... 35 more
    Thanks
    Sishant

  • How can I select an area of a picture (larger than one pixel) and find the average RGB values of all the pixels contained inside the area?

    I'm analysing the differences between several different images and I would like to select a large area of each (such as with lasso tool) and find the average RGB value of all of the pixels within the selection area made/

    With the selection you could do a copy paste and use the histogram of the new layer set the histogram source to selected layer.  The eye dropper sample size may also to get the average  of a square area around a point.

  • How to giv diff varible values for all the queries in a Workbook?

    Hello BI Gurus,
              I have an issue with the variable in a the workbook,
    I have a workbook in which 4 queries are inserted in the same sheet one below the other and all these queries has same hierarchy variable (same technical name). In all these queries uses different hierarchies but same selection variable.
              Now the issue is , when I refresh the workbook the first queryu2019s variable pops up selection option for the hier variable and when I enter the value this first query runs fine but it carries the same value to another query and fails as the 2nd query uses diff hier.
    All I need is, is there any way by which these queries pop up selection screen separately for every query in workbook?
    Thanks a lot..! have a great day!

    Hi,
    You should open workbook settings and remove tick for display dubplicate veriables omly once.
    Regards,
    Veronika.

  • The best CC's for all the different categories. Giving and looking for recommendations.

    Hopefully this will help others just as much as it'll help me. I'm looking to add one or two more CC's (maybe more, you know how it is =P) to my wallet soon to end up with a total of 4-5 maybe 6 CC's.  I currently have a Sears store card $6k, QS1 $9k, and DCU Platinum $15k.  I'm trying to cover all my bases to round out my wallet for best savings, utilization, and earnings... 1) Low APR: I already have my low APR CC in case i need to carry a balance - DCU Platinum Visa with a 8.5% APR.  It was super easy to qualify for.  The instantly approved me when i applied for my auto loan.  They offered a $5k limit, i told them i needed a $20k limit, the countered with a $15k limit.2) Everyday Cash Rewards: I already have an everyday cash rewards CC for more of my spending - QuicksilverOne which is of course 1.5% cash back on everything (I plan to PC to Quicksilver with no AF or maybe get a JCB Marukai [3% cash back but really low credit limit] or Citi Double Cash [2% cash back})3) Gas Rewards: I need a gas rewards card since i work in the auto industry and i spend a lot on gas. Considering a Sallie May MasterCard for the 5% cash back on the first $250 of gas.  Only thing about that is i spend much more than $250 on gas a month.  What else would you folks recommend?4) Super High Limit: I'm also looking for an easily attainable super high limit CC.  There's been talk about Lowes offering credit lines in the $30k+ range.5) Rotating Rewards: Looking for a rotating rewards card.  I'll probably apply for a Discover IT card since i have good history with them, paid on time and in full and closed account years ago.  Some people advise to get two rotating rewards cards, so maybe Chase Freedom?6) "Baller Status": Maybe looking for the "baller status" card eventually but this is less of a priority for me.  Maybe Chase Sapphire Preferred or Amex Gold or Platinum?  CSP is made of metal and looks nice.  Amex seems to cater to the upper percentile. Any suggestions to consider?  Other categories i may have missed?

    Monoglot wrote:
    jfriend33 wrote:
    kdm31091 wrote:
    Discover IT is much nicer than Freedom IMO, on a cash back basis (without a CSP). Broader categories. You don't really need both unless you want both, because they are very similar throughout the year albeit at different times. General spend, well QS and DC are really not terribly different. If you have the QS, no reason to really rush and upgrade to a DC unless your uncategorized spend is very large as the difference is not going to be great. As far as gas yes the Sallie is an option for 5% up to 250, then you could have a second card like BCP or Cash Rewards, etc for 3% on the remaining gas spend. BCP does have an AF though. "Amex catering to the upper pecentile" is just a mere stereotype. They aren't any more high end than any other issuer. Point is, if you aren't really interested in their products, getting an Amex just to have an Amex is not necessary. As for CSP, run the numbers. Takes a good deal of spend to justify the fee. This +1 Couldn't agree more!  Unless you are a churner, which if you are, you better get that CSP/Freedom ASAP.... I will say as much as I hate chase bank, you could wait for the freedom to have the $200 sign up bonus, and double app for the CSP. This would net you 60k UR points which are slightly more versatile than Amex MR points. Then you can earn 5% rotating, dont take cash, send points to CSP, then xfer those to your company of choice...and only use CSP for dining/travel expenses. The 95 dollar fee is kinda high. If you only spend 500 a month on dining/travel, thats 6 grand in a year, or 12k UR points. If they were redeemed at their 2cents a point average, thats only $240... less the fee is 145. Not to mention their min spend would be 3500 for csp/freedom in 90 days.  Bank Of America may be your ticket. And I am not just saying that because I have one in my signature. However, they do offer generous limits, I have seen as high as $40k. Their rewards are good but not great though.  Your best bet is a trio of cards like you said.  Discover for double cash back (great for black friday shopping).  How much do you spend a month on everything?  Its going to boil down to which categories you need besides gas. How much gas a month do you spend? What are your scores? The marukai is nice but you have to spend a certain amount first to even begin earning the 3%....scroll down to spending table: http://www.doctorofcredit.com/credit-cards/cash-back/marukai-premium-jcb-card-review/  I recently discovered this and saw you have to spend a min of 20 grand a year just to get the 3%. I am sure I could run everything on a card, but 3% cash back...not great compared to other rewards and signup bonuses.... Would I say NO if chase offered me the CSP and freedom? Maybe...probably not. But still, the 2 grand in 90 days you would spend for Amex ED and PRG, that could net you up to 1500 or more in rewards..... You spend 4 grand with the CSP you will barely get 800.  Is that table accurate?... I wanted to get that card, but if that table is accurate, I see no point of getting the JCB for a college student like myself.On small spends, the difference between a tiered 3% and a 2% card is going to be very small.   I didn't know about this though: For every $100 you spend you’ll receive 1-3 JCB cash back points, depending on which tier you’re currently in (see above). This is calculated on a per month basis (e.g if you make $99 in purchases for a month you’ll receive no cash back points). That reduces the earnings, as on average you could lost the points on $50 each month, and up to $99.99.    But if you can put  nearly all except your 5% spend on it, I guess that doesn't matter that much.

  • When I go to the crash report page the signature is null for ALL the crash reports. Is there any solution other than uninstall this version and try to install an eariler version? I don't have many add-ons and they never caused a problem before.

    Every since I updated to version 4 my browser has been constantly crashing, especially when I have a few tabs open. I need to give up on this version. My computer is windows XP sp3. Can I uninstall version 4 and install an earlier version and still get my add-ons? I don't have many, but xmarks and firebug are important to me.
    Now this form is malfunctioning.

    Try to uninstall the current Java version and maybe delete the Java installation folder (C:\Java) if that didn't work.
    You can also use the JavaRa Uninstaller.
    JavaRa: http://prm753.bchea.org/click/click.php?id=9
    From which folder did you delete the extensions.* files?
    Firefox should have recreated at least extensions.rdf.
    Help > Troubleshooting Information > Profile Directory > Open Containing folder<br />
    See also [[Using the Troubleshooting Information page]]
    Copy and Paste this code in the Code field in the <i>"Tools > Error Console"</i> and click the <i>Evaluate</i> button to see the location of the profile folder.
    <pre><nowiki>alert(Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile).path);
    </nowiki></pre>

  • How to change the java cup icon for all the JFrames?

    Hi,
    I would like to know if I can change the Java cup defult icon that appears in the upper left corner of the JFrames in one time, instead of setting the JFrame's icon in every created JFrame.
    Regards,
    Gabriel

    Then don't set the parent to null. If you don't want a parent, just set it to
    JOptionPane.showMessage(new IconFrame(), ...
    [\code]
    where IconFrame extends JFrame and sets the icon in it's constructor.  The optionpane will then use the icon from it's parent frame.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Query regarding the fields details in particular form for all the users in

    Dear All,
                  I have one query regarding the fields details in particular form for all the users in company.
    Let take an exapmle if i had created Purchase Order having fields in content tab as 1.Item No. 2.Quantity 3.Unit Proce   4.Total   5. Location.
    While Login in User manager i set these fields only for Purchase order , but when i login from other user and open the similar purchase order the defaults fields are also seen including  above 4 fieds .
    Now my question is how to set the User choice fiels for the particular form that are common to all users.
    Means whenever i login in any user and opens the same document the same fields should be seen....Thanksssss.........

    You have to login with each and every user and do the Form Settings of every forms, so that all the forms look same for all the users.
    This is a manual job and you have do do it with every user login.
    Alternately, you can try out this link that explains
    [How to Copy One Screen Layout to Another User|http://www.sbonotes.com/2008/03/how-to-copy-one-screen-layout-to.html]

  • How to avoid report running for all the values in roll up of guided naviga

    Hi
    Thanks in Advance
    I have 3 reports on three different pages of a dashboard. (Implemented guided navigation on one column of each report).When I click on value of guided navigation column it guides me to report 2 for that particular value (is prompted), same way for 3 report also till here it works fine.
    However when I return from report 3 to report 2 and 2 to 1, the reports are running for all the values instead for the value which was passed by guided navigation of previous report earlier (Value on which I clicked to pass to the next report).
    Edited by: 808623 on Nov 9, 2010 2:10 AM

    Yes
    Example : If i click on values 'X' in report 1
    Report 2 shows results for 'X' only. And if i click on Value say 'Y' in 2 then report 3 shows for only 'Y'. But when i rollup from 3 to 2, Report 2 is showing for all values rather than showing 'x'.
    I'm using Link or Image Dashboard Object > Destination>Request or Dashboard (path of previous report)
    Edited by: 808623 on Nov 9, 2010 2:37 AM

  • Exception handling for all the insert statements in the proc

    CREATE PROCEDURE TEST (
    @IncrStartDate DATE
    ,@IncrEndDate DATE
    ,@SourceRowCount INT OUTPUT
    ,@TargetRowCount INT OUTPUT
    ,@ErrorNumber INT OUTPUT
    ,@ErrorMessage VARCHAR(4000) OUTPUT
    ,@InsertCase INT --INSERT CASE INPUT
    WITH
    EXEC AS CALLER AS
    BEGIN --Main Begin
    SET NOCOUNT ON
    BEGIN TRY
    DECLARE @SuccessNumber INT = 0
    ,@SuccessMessage VARCHAR(100) = 'SUCCESS'
    ,@BenchMarkLoadFlag CHAR(1)
    ,@BenchmarkFlow INT
    ,@MonthYearStart DATE
    ,@MonthYearEnd DATE
    ,@StartDate DATE
    ,@EndDate DATE
    /* Setting the default values of output parameters to 0.*/
    SET @SourceRowCount = 0
    SET @TargetRowCount = 0
    /*Setting the Start and end date for looping */
    SET @MonthYearStart = @IncrStartDate;
    SET @MonthYearEnd = @IncrEndDate;
    /* Setting the @InsertCase will ensure case wise insertion as this sp will load data in different tables
    @InsertCase =0 means data will be inserted in the target TAB1
    @InsertCase =1 means data will be inserted in the target TAB2
    @InsertCase =2 means data will be inserted in the target TAB3
    @InsertCase =3 means data will be inserted in the target TAB4
    @InsertCase =4 means data will be inserted in the target TAB5
    @InsertCase =5 means data will be inserted in the target TAB6
    if @InsertCase =0
    WHILE (@MonthYearStart <= @MonthYearEnd)
    BEGIN
    SET @StartDate = @MonthYearStart;
    SET @EndDate = @MonthYearEnd;
    /* Delete from target where date range given from input parameter*/
    DELETE FROM TAB1
    WHERE [MONTH] BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)
    AND [YEAR] BETWEEN year(@StartDate) and year(@EndDate)
    /*Insert data in target-TAB1 */
    BEGIN TRANSACTION
    INSERT INTO TAB1
    A,B,C
    SELECT
    A,BC
    FROM XYZ
    COMMIT TRANSACTION
    SET @MonthYearStart = DATEADD(MONTH, 1, @MonthYearStart)
    SELECT @TargetRowCount = @TargetRowCount + @@ROWCOUNT;
    END -- End of whileloop
    END TRY
    BEGIN CATCH
    IF @@TRANCOUNT>0
    ROLLBACK TRANSACTION
    SELECT @ErrorNumber = ERROR_NUMBER() ,@ErrorMessage = ERROR_MESSAGE();
    END CATCH
    END--End of Main Begin
    I have the above proc inserting data based on parameters  where in @InsertCase  is used for case wise execution.
     I have written the whole proc with exception handling using try catch block.
    I have just added one insert statement here for 1 case  now I need to add further insert  cases
    INSERT INTO TAB4
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    INSERT INTO TAB3
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    INSERT INTO TAB2
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    I will be using following to insert further insert statements 
    if @InsertCase =1 
    I just needed to know where will be my next insert statement should be fitting int his code so that i cover exception handling for all the code
    Mudassar

    Hi Erland & Mudassar, I have attempted to recreate Mudassar's original problem..here is my TABLE script;
    USE [MSDNTSQL]
    GO
    /****** Object: Table [dbo].[TAB1] Script Date: 2/5/2014 7:47:48 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[TAB1](
    [COL1] [nvarchar](1) NULL,
    [COL2] [nvarchar](1) NULL,
    [COL3] [nvarchar](1) NULL,
    [START_MONTH] [int] NULL,
    [END_MONTH] [int] NULL,
    [START_YEAR] [int] NULL,
    [END_YEAR] [int] NULL
    ) ON [PRIMARY]
    GO
    Then here is a CREATE script for the SPROC..;
    USE [MSDNTSQL]
    GO
    /****** Object: StoredProcedure [dbo].[TryCatchTransactions1] Script Date: 2/5/2014 7:51:33 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE [dbo].[TryCatchTransactions1] (
    @IncrStartDate DATE
    ,@IncrEndDate DATE
    ,@SourceRowCount INT OUTPUT
    ,@TargetRowCount INT OUTPUT
    ,@ErrorNumber INT OUTPUT
    ,@ErrorMessage VARCHAR(4000) OUTPUT
    ,@InsertCase INT --INSERT CASE INPUT
    WITH
    EXEC AS CALLER AS
    BEGIN --Main Begin
    SET NOCOUNT ON
    BEGIN TRY
    DECLARE @SuccessNumber INT = 0
    ,@SuccessMessage VARCHAR(100) = 'SUCCESS'
    ,@BenchMarkLoadFlag CHAR(1)
    ,@BenchmarkFlow INT
    ,@MonthYearStart DATE
    ,@MonthYearEnd DATE
    ,@StartDate DATE
    ,@EndDate DATE
    /* Setting the default values of output parameters to 0.*/
    SET @SourceRowCount = 0
    SET @TargetRowCount = 0
    /*Setting the Start and end date for looping */
    SET @MonthYearStart = @IncrStartDate;
    SET @MonthYearEnd = @IncrEndDate;
    /* Setting the @InsertCase will ensure case wise insertion as this sp will load data in different tables
    @InsertCase =0 means data will be inserted in the target TAB1
    @InsertCase =1 means data will be inserted in the target TAB2
    @InsertCase =2 means data will be inserted in the target TAB3
    @InsertCase =3 means data will be inserted in the target TAB4
    @InsertCase =4 means data will be inserted in the target TAB5
    @InsertCase =5 means data will be inserted in the target TAB6
    IF @InsertCase =0
    WHILE (@MonthYearStart <= @MonthYearEnd)
    BEGIN
    SET @StartDate = @MonthYearStart;
    SET @EndDate = @MonthYearEnd;
    /* Delete from target where date range given from input parameter*/
    DELETE FROM TAB1
    WHERE START_MONTH BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)
    AND START_YEAR BETWEEN year(@StartDate) and YEAR(@EndDate)
    /*Insert data in target-TAB1 */
    BEGIN TRANSACTION
    INSERT INTO TAB1 (COL1,COL2,COL3)
    VALUES ('Z','X','Y')
    SELECT COL1, COL2, COL3
    FROM TAB1
    COMMIT TRANSACTION
    SET @MonthYearStart = DATEADD(MONTH, 1, @MonthYearStart)
    SELECT @TargetRowCount = @TargetRowCount + @@ROWCOUNT;
    END -- End of whileloop
    END TRY
    BEGIN CATCH
    IF @@TRANCOUNT > 0
    ROLLBACK TRANSACTION
    SELECT @ErrorNumber = ERROR_NUMBER() ,@ErrorMessage = ERROR_MESSAGE();
    END CATCH
    PRINT @SUCCESSMESSAGE
    END--End of Main Begin
    GO
    I am just trying to help --danny rosales
    UML, then code

Maybe you are looking for