Store # in a variable in routine

HI experts,
I am calcualting the difference of two dates  during transformation in a routine and i want that value "#" should be displayed in the report even if one of the dates is blank ie. no data for that date.
Right now the variable is giving the value 0 and not # in the report if one of the dates is blank.
Kindly recommend a solution to this problem.

Hi singh,
you can achieve this using Query properties.
in Query designer, goto query properties,
in the dialog box, goto dispaly properties, there u will find Display Zeros as, select it and give # in the textbox.
Assign points if helpful.

Similar Messages

  • How to store serval char variables into a string variable?

    I have serval char variables, but i don't know how to put them together (without using arrays). I am thinking to store these char variables into a string variable but i don't know how to do it. For example,
    char letter1 = 'a', letter2 = 'b', letter3 = 'c';
    String letters;
    then how can i do to make letters = "abc" from using letter1,2,3?
    I am just a beginner of Java, if anyone can help me, i will appreciate that very much!!!

    String letters=""+leter1+letter2+letter3;is fine and dandy. What it actually compiles to is
    String letters = new StringBuffer().append(letter1).append(letter2).append(letter3).toString();Which ofcourse is much more code to write, but still good to know.
    So do see the API for java.lang.StringBuffer.
    Heikki

  • Variable in routine

    Hi,
    Some one  please.
    what is type of ABAP variable using in transfer or update routines.
    Thanks,
    Pria

    Hi,
    Variable is, it is just you are declaring for further processing usage.
    Eg:
    Data: dat like sy-datum
    Here dat is a variable, so in this way you can declare variables in routines, there is no separate  ABAP variables.
    Thanks
    Reddy

  • Read China content in JSP and store in Java variable

    Hi All ,
    I have created China language content(BinaryType) using weblogic admin console.
    And I am trying to get the content and to store in a Java Variable .
    Pls suggest me how to read other language content and to store in java variable for manipulation.
    Srinivas
    I am using following lines of code to get content
    <utility:forEachInArray array="<%=newsID%>" id="node" type="com.bea.content.Node">
    INodeManager nodeManager =     ContentManagerFactory.getNodeManager();
         java.io.InputStream is =     nodeManager.getStream(new ContentContext(), node.getId(),
    "News-Content");
    when I am using inputstream "is" to read the china content , its displaying garbage values.

    Hi Rajeev,
    My Content consist of following properties
    News-Author      String
    News-Content      Binary
    News-Id           String
    "News-Content" is Binary Type .I am creating data for this property using Content Editor.
    My data consists of 3 lines of text+image
    data will be:
    author is srinivas
    created on 11th
    content is newscontent
    << inserted image >>
    where << inserted image >> ,is jpeg file.
    I want to read this data in the JSP and store in java variable , so that i can modify 1st two lines and updated data to be displayed in browser..
    I am able to read data , if its a simple text . But it has one image also.
    How to solve this issue.
    Srinivas

  • Webi - store report in Variable filename.

    Hi,
    I have BO Webi report say XYZ which is schedule and run on weekdays. once it is refresed I  wanted to give name as XYZ_YYYYMMDD.XLs ( where YYYYMMDD is system date).
    in CMC there is option to name the report with some extension ( CMS-> Folder->Schedule->Destination and specify filename radio button). but the one I am looking is not available.
    is there any way to change the report name with some variable value and store in Excel ?
    Your early response would be appreciated.
    Regards,
    Avi

    You can select 'Date and Time' when check specify file name. Select 'Title' put an hyphen and select 'Date and Time' and also check 'add file extension'.

  • Infopackage Selections Tab-OLAP Variable/ABAP Routine

    Hi Experts
    In my Infopackage Selections Tab i had Cal Mon/Year field....
    As per my requirment i have to write a selection condion that when we execute info package (it is a monthly data load)  it will extract data only for the months greater than or equal to current month
    Please update me on how can i achieve this either by using OLAP Variable or ABAP Routine in infopackage...will be great if can provide the required ABAP Code
    Thanks in Advance

    here's an example that fills the fiscal year from last month (bold is customer code... the rest is standard):
      data: l_idx like sy-tabix.
      read table l_t_range with key
           fieldname = 'PARAM_P_GJAHR'.
      l_idx = sy-tabix.
      data:
      v_caldy type /BI0/OICALDAY,
      v_calmn type /BI0/OICALMONTH,
      v_calyr type /BI0/OICALYEAR.
      v_caldy = sy-datum.
    determine first day*
      v_caldy+6(2) = '01'.
    determine last month*
      subtract 1 from v_caldy.
      v_calyr = v_caldy(4).
      l_t_range-sign   = 'I'.
      l_t_range-option = 'EQ'.
      l_t_range-low    = v_calyr.
      modify l_t_range index l_idx.
      p_subrc = 0.

  • How do I store and retrieve variables end user enters in Dynamic Pages ?

    I have 4 dynamic pages, a user enters in variables on first page. At the next 3 dynamic pages I send the user to I have to display the items they entered on the first page in text items.
    How do I pass these variables ????
    thanks!

    ok, so on my page 1 I have the parameter "name", if I use <ORACLE> tags on this first dynamic page they are executed upon entering the form. The user has to enter the data and if the <ORACLE> tags have already executed where do I store the value ?
    So where do I issue the wwsto_api_session.load_session (in the second dynamic page or the first one) ?
    I can see that I'll use the wwsto_api_session.get_attribute_as_varchar2 ('name') in the second dynamic page with the htp.p - is that right ?
    You wouln't have an example you could share with us all do you ? Sure seems like this is confusing to a lot of people. Are there any useful examples of this in the PDK that show how to do this with the HTML included ?
    thanks again

  • Store Session scoped variable in RequestScoped FormHandler?

    Hi All,
    I need to store a value into session scoped variable in formHandler. Is it possible? For Example, i need to no.of times handleApplyShippingGroups is being called by a User (Session scoped) and write a condition based on that value whose effect is to that User only? But, ShippingGroupFormHandler's scope is "Request"? How to get through this?
    Thanks,
    VishnuVardhan

    Hi,
    You can use the below logic.
    In ShippingGroupFormHandler.properties
    $class = your.custom.Shippinggroup.fomhandler
    profile=/path/to/your/profile/component
    In YourShippingGroupFormHandler.java
    Inside handleApplyShippingGroups(),
    //increment the value
    getProfile.setApplySgCallCount(getApplySgCallCount()++);
    Before that, add the property - applySgCallCount -  to your profile with getter and setters.
    Hope this helps.
    Please keep posting the issues / updates.
    Thanks,
    Gopinath Ramasamy

  • How to store the webdynpro variable in broser's cookie

    Hi,
    I have the requirement like that I need to store the customer number in the browser's session such that this customer number is available to other aplications in the portal. other aplications are not only the the webdynpro aplications but also other aplications like crystal reports. I came to know that this can be done by storing the customer in the browser's cookies.
    Please reply if any one know how to do this thing.
    Thanks in advance.

    If i understand you correctly you want to store the values of the local variable whenever you read from it? If you want to do this then simply run a wire from the local variable (in read mode) to the edge of the while loop, right-click on the terminal and select 'enable indexing', and this will create an array of these values at this point.
    I hope this helps you..
    Kim

  • AppleScript to list mail accounts and store in a variable

    Greetings,
    I'm new to AppleScript and am reading a book on it that I dusted off but I thought I'd post my question here before I reinvent a wheel.
    Goal:
    -- Create an AppleScript which gives me a list of all the accounts in Mail.app and then gives me the choice to disable, enable, or toggle those accounts.
    Issue:
    -- I know how to make AppleScript show me a list of the accounts in Mail, but I want that list to become a variable so I can then apply the disable, enable, or toggle options to that variable.
    Side note:
    -- A script exists that does what I'm looking for Enable | Disable Accounts.  Saddly this freeware script is set to read only so I can't open it to check the code.  I'll be using my final script in a business environment so I need to see what the code is doing before I deploy it, lest it be doing naughty things like forwarding private information elsewhere etc.
    Thoughts / guidance appreciated.

    This script should do the trick for starters, though it lacks the kind of finesse you could get with an XCode project and a dedicated interface.
    tell application "Mail"
              set {accountNameList, accountEnabledList} to {name, enabled} of every account
              set displayList to {}
              repeat with i from 1 to count of accountNameList
                        set end of displayList to item i of accountNameList & " (" & item i of accountEnabledList & ")"
              end repeat
              set toggles to choose from list displayList
              repeat with thisAccount in toggles
                        set accountName to first word of thisAccount
                        set enabled of account accountName to not enabled of account accountName
              end repeat
    end tell

  • How can i store * in a variable

    Hi friends,
    data: v_test type char14.
    i want to add the value of  '*' and payr-rwbtr.
    Ex: payr-rwbtr contain 4568.24.
    rwbtr field length-13.
    my reqrmnt is *4568.24.
    in smartforms how can i add the * with payr rwbtr
    Thanks in advance.

    Hi,
    DATA:TEMP TYPE C VALUE '*',
               V_VALUE TYPE STRING.
    CONCATENATE TEMP PAYR-RWBTR INTO V_VALUE.
    Use v_value to display that data wherever necessary in smartforms.
    If you need to display this inside table then create PROGRAM LINES , write the concatenate code over there and display wherever u need to.
    Declare those two variables in GLOBAL DATA tab.
    Regards,
    Vanitha P

  • How to store internal table value in single variable

    hi gurus,
    i have 3 value in int table , so want to store the value of int table into single variable of type string.
    how it is possible

    hmmm, your requirement is kinda weird and you could have given us a bit more info, but well lets start.
    Why is your requirement weird?
    Well an internal table kinda is a variable itself, or rather a set of variables which together make up for a line type of your table.
    So you have a value you already have in a variable and now want to store it in anotherone? Seems weird.
    What type is your internal table?
    Do you have those three values in one record or in  three records which only hold one value each?
    Which of your values do you want to store in another variable?
    Anyway, make a F1 on the "READ TABLE" statement, this should definiteley help you.
    The "LOOP AT WHERE" statement could as well help if there should occur probrlem using READ TABLE.
    /edit DAMn i was posting this while you gave us more info.
    So still the question stays if you got your three values in one record or in three records.
    DATA: lv_variabl_containing_all      type char100.
    loop at itab into wa.
      concatenate lv_variabl_containing_all wa-value into lv_variabl_containing_all seperated by space.
    endloop.
    after the loop you now got all your values in lv_variabl_containing_all.
    That is for the case you got three records.
    other case would be
    Read table itab into wa index 1.
    concatenate wa-value1 wa-value2 wa-value3 into lv_variabl_containing_all.
    Edited by: Florian Kemmer on Apr 16, 2010 12:59 PM

  • How to store a query containing more than 15000 characters in a variable of nvarchar(max)

    I have the following string and I want to store it in variable using SQL Server 2008 R2 . I can't store this string using variable of nvarchar(max) .
    ' SELECT    A.[EmployeeCode] ,A.[EmployeeId] ,A.[Name],A.[DepartmentCode],A.[DesignationCode]   
    , A.[CompanyCode]  ,A.[Department] ,A.[Designation] ,A.[Entity]
    , A.[GovtAdministrativeAreaCode]   ,A.[WorkingUnitCode],A.[WorkingUnitName]
    , isnull(L.WorkingDays ,0) as  TotalWorkingDays ,isnull(K.DelayHr,0) as DelayHr
    , isnull(J.OTHr,0) as OTHr ,isnull(B.[4Hr],0) as [4Hr]
    , isnull(C.[10Hr],0) as [10Hr] ,isnull(D.[12Hr],0) as [12Hr]
    , isnull(E.NoOfPresent,0) as NoOfPresent   , isnull(F.NoOfAbsent,0 )as NoOfAbsent
    , isnull(G.NoOfLeave ,0) as NoOfLeave , isnull(H.Morning ,0) as Morning
    , isnull(I.Night,0) as Night , isnull(L.[NoOfW/HDay] ,0) as [NoOfW/HDay]
    , isnull(K.NoOfDelay,0) as NoOfDelay , isnull(L.TotalDayAttends,0) as TotalDayAttends
    , isnull(M.[LessThan4Hr] ,0) as [LessThan4Hr]
    , isnull (N.NoOfNoOutTime,0) as NoOfNoOutTime
    INTO '
    +@tableName+'
    FROM
    ( SELECT DISTINCT [EmployeeCode] ,[EmployeeId] ,[Name],[DepartmentCode],[DesignationCode]
      ,[CompanyCode]  ,[Department] ,[Designation] ,[Entity]
      ,[GovtAdministrativeAreaCode]   ,[WorkingUnitCode],[WorkingUnitName]
      FROM [vwHR_DailyAttendanceSummary]
      WHERE AttendanceDate between  dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''')
    ) A
    LEFT JOIN
    (   SELECT [EmployeeCode]     ,WorkingUnitCode      ,Count([AttendanceDate] ) as [4Hr]
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode]  
      FROM [vwHR_DailyAttendanceSummary]
      WHERE AttendanceDate between   dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''')
      and (DATEDIFF(MINUTE,InTime,OutTime))/60 >=4 and (DATEDIFF(MINUTE,InTime,OutTime))/60 <10
      group by EmployeeCode ,WorkingUnitCode   ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode]  
    ) B ON (B.EmployeeCode=A.EmployeeCode and B.WorkingUnitCode=A.WorkingUnitCode
    and B.DepartmentCode=A.DepartmentCode and B.DesignationCode=A.DesignationCode and B.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)
    LEFT JOIN
    (       SELECT [EmployeeCode]      ,WorkingUnitCode       ,Count([AttendanceDate] ) as [10Hr]
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode]     
    FROM [vwHR_DailyAttendanceSummary]
    WHERE AttendanceDate between    dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''') 
    and (DATEDIFF(MINUTE,InTime,OutTime))/60 >=10 and (DATEDIFF(MINUTE,InTime,OutTime))/60 <12
    group by EmployeeCode,WorkingUnitCode  ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode]   
    )C ON (C.EmployeeCode=A.EmployeeCode and C.WorkingUnitCode=A.WorkingUnitCode
    and C.DepartmentCode=A.DepartmentCode and C.DesignationCode=A.DesignationCode and C.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)
    LEFT JOIN
    (   SELECT [EmployeeCode]     ,WorkingUnitCode   ,Count([AttendanceDate] ) as [12Hr]
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode]     
      FROM [vwHR_DailyAttendanceSummary]
      WHERE AttendanceDate between  dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''')
      and (DATEDIFF(MINUTE,InTime,OutTime))/60 >=12
      group by EmployeeCode,WorkingUnitCode    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
    ) D on (D.EmployeeCode=A.EmployeeCode and D.WorkingUnitCode=A.WorkingUnitCode
    and D.DepartmentCode=A.DepartmentCode and D.DesignationCode=A.DesignationCode and D.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)
    LEFT JOIN
    (   SELECT [EmployeeCode]  ,WorkingUnitCode   ,COUNT(Status) NoOfPresent
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
      FROM [vwHR_DailyAttendanceSummary]
      WHERE Status = ''P'' and AttendanceDate between   dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''') 
      group by EmployeeCode,WorkingUnitCode,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
      ) E on (E.EmployeeCode =A.EmployeeCode and E.WorkingUnitCode=A.WorkingUnitCode
    and E.DepartmentCode=A.DepartmentCode and E.DesignationCode=A.DesignationCode and E.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)
    LEFT JOIN
      (   SELECT [EmployeeCode],WorkingUnitCode  ,COUNT(Status) NoOfAbsent
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
      FROM [vwHR_DailyAttendanceSummary]
      WHERE Status = ''A'' and AttendanceDate between  dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''')
      group by EmployeeCode,WorkingUnitCode  ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
    ) F on (F.EmployeeCode=A.EmployeeCode and F.WorkingUnitCode = A.WorkingUnitCode
    and F.DepartmentCode=A.DepartmentCode and F.DesignationCode=A.DesignationCode and F.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)
    LEFT JOIN
           ( SELECT  la.CompanyCode , la.EmployeeCode ,lad.LeaveDate ,A.WorkingUnitCode,A.DepartmentCode,A.DesignationCode,W.AdminAreaCode
    FROM [vwLMS_EmployeeLeaveInformation] la
    inner JOIN LMS_LeaveApplicationDetail  lad on (lad.LeaveApplicationCode=la.LeaveApplicationCode and lad.ActionType <> ''DELETE'')
    inner join HR_DailyAttendanceSummary A on (A.EmployeeCode=la.EmployeeCode and A.AttendanceDate=lad.LeaveDate and A.ActionType <> ''DELETE'')
    inner join General_WorkingUnit W on (w.WorkingUnitCode=A.WorkingUnitCode and W.ActionType <> ''DELETE'')
    WHERE  la.ApplicationStatus=1 and  la.JobStatus in (1,0)
    and lad.LeaveDate between   dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''')  
    ) G  on ( G.EmployeeCode=A.EmployeeCode and G.WorkingUnitCode=A.WorkingUnitCode
    and G.DepartmentCode= A.DepartmentCode and G.DesignationCode= A.DesignationCode and G.AdminAreaCode=A.GovtAdministrativeAreaCode)
    LEFT JOIN
    (   SELECT [EmployeeCode] ,WorkingUnitCode ,Count([AttendanceDate] ) as [Morning] 
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode]        
      FROM [vwHR_DailyAttendanceSummary]
      WHERE AttendanceDate between  dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''')
      and (DATEDIFF(MINUTE,InTime,OutTime))/60 >=8 and DATEPART(HH,InTime)=6 and DATEPART(HH,OutTime)>=14
      group by EmployeeCode,WorkingUnitCode    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
    ) H On (H.EmployeeCode=A.EmployeeCode and H.WorkingUnitCode=A.WorkingUnitCode
    and H.DepartmentCode=A.DepartmentCode and H.DesignationCode=A.DesignationCode and H.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)
    LEFT Join
    (   SELECT [EmployeeCode]   ,WorkingUnitCode       ,Count([AttendanceDate] ) as [Night]
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode]          
      FROM [vwHR_DailyAttendanceSummary]
      WHERE AttendanceDate between    dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''')
      and (DATEDIFF(MINUTE,OutTime,InTime))/60 >=8
      and DATEPART(HH,InTime)>=19
      and DATEPART(HH,OutTime)>=5
      group by EmployeeCode ,WorkingUnitCode ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
    ) I on (I.EmployeeCode=A.EmployeeCode and I.WorkingUnitCode=A.WorkingUnitCode
    and I.DepartmentCode=A.DepartmentCode and I.DesignationCode=A.DesignationCode and I.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)
    LEFT JOIN
    ( SELECT distinCt [EmployeeCode]
    ,sum(TotalOverTime ) as OTHr
    ,WorkingUnitCode
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
    FROM vwHR_DayBasisOvertime  
    WHERE AttendanceDate between   dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''')
    group by EmployeeCode ,WorkingUnitCode ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
    ) J ON (J.EmployeeCode=A.EmployeeCode and J.WorkingUnitCode=A.WorkingUnitCode
    and J.DepartmentCode=A.DepartmentCode and J.DesignationCode=A.DesignationCode and J.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)  
    LEFT JOIN  
    (   SELECT distinCt A.[EmployeeCode]  
    ,DelayHr=CASE
    WHEN sum(DATEDIFF(mi,A.AttendanceDate + A.ShifIn, A.InTime)) >0 THEN SUM( DATEDIFF(mi,A.AttendanceDate +A.ShifIn, A.InTime))
    WHEN sum(DATEDIFF(mi,A.AttendanceDate +A.ShifIn, A.InTime))<0 THEN 0
    END
    ,Count(A.AttendanceDate) as NoOfDelay
    , WorkingUnitCode
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
      FROM [vwHR_DailyAttendanceSummary] A
      WHERE A.Status=''D'' AND AttendanceDate between   dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''') 
      group by A.EmployeeCode ,WorkingUnitCode,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
    ) K On (K.EmployeeCode=A.EmployeeCode and K.WorkingUnitCode=A.WorkingUnitCode
    and K.DepartmentCode=A.DepartmentCode and K.DesignationCode=A.DesignationCode and K.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)
    INNER JOIN
    ( select  EmployeeCode ,WorkingUnitCode 
    /*, [A/L Time],[No Of A/L Day],[Total Working Day Time] */
    , [No Of working Day] as WorkingDays
    , ([No Of W Day]+[No Of H Day]) as [NoOfW/HDay]
    ,[Total At] as TotalDayAttends
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
    from '
    +@OutPutTableName_WorkingDaysHours+'
    ) L ON (L.EmployeeCode=A.EmployeeCode and l.WorkingUnitCode=A.WorkingUnitCode
    and L.DepartmentCode=A.DepartmentCode and L.DesignationCode=A.DesignationCode and L.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)
    LEFT JOIN
    (   SELECT [EmployeeCode]  ,WorkingUnitCode ,Count([AttendanceDate] ) as [LessThan4Hr] 
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode]   
      FROM [vwHR_DailyAttendanceSummary]
      WHERE AttendanceDate between   dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''')
      and (DATEDIFF(MINUTE,InTime,OutTime))/60 >0 and (DATEDIFF(MINUTE,InTime,OutTime))/60 <4
      group by EmployeeCode,CompanyCode ,WorkingUnitCode    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
    ) M ON (M.EmployeeCode=A.EmployeeCode and M.WorkingUnitCode=A.WorkingUnitCode
    and M.DepartmentCode=A.DepartmentCode and M.DesignationCode=A.DesignationCode and M.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode )
    left join
    ( SELECT EmployeeCode  ,WorkingUnitCode , COUNT(AttendanceDate) as NoOfNoOutTime
    ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode]  
    FROM vwHR_DailyAttendanceSummary
    WHERE  AttendanceDate between dbo.fxn_cDate('''
    +@DateFrom+''')
    and dbo.fxn_cDate('''+@DateTo+''') 
    and OutTime is null
    group by EmployeeCode ,WorkingUnitCode ,[DepartmentCode] ,[DesignationCode]    ,[GovtAdministrativeAreaCode] 
    ) N ON (N.EmployeeCode=A.EmployeeCode and N.WorkingUnitCode=A.WorkingUnitCode
    and N.DepartmentCode=A.DepartmentCode and N.DesignationCode=A.DesignationCode and N.GovtAdministrativeAreaCode=A.GovtAdministrativeAreaCode)

    If you are concatenating multiple strings together to make a nvarchar(max), and the result is too long to store in the largest possible regular regular nvarchar (that is nvarchar(4000), you must be sure the concatenation is done as nvarchar(max).  If
    you don't, each of the concatenations is done according to the type of each operand.  And, if the two things being concatenated are both (for example) nvarchar(20), then the result is nvarchar(40) because 20+20 is 40.  But if the two things being
    concatenated are both nvarchar(3000), the result does not become nvarchar(max), it is nvarchar(4000) - because 3000 + 3000 is 6000, but that's two big, so you get 4000.  For a simple example
    Declare @Result nvarchar(max), @Input1 nvarchar(3000), @Input2 nvarchar(3000);
    Set @Input1 = Replicate('a', 3000);
    Set @Input2 = Replicate('b', 3000);
    Set @Result = @Input1 + @Input2;
    Select 'Test1', Len(@Result), Len(@Input1), Len(@Input2);
    Set @Result = Cast(@Input1 As nvarchar(max)) + @Input2;
    Select 'Test2', Len(@Result), Len(@Input1), Len(@Input2);
    In Test1, the two 3000 character nvarchars are concatenated together, but the result is truncated to nvarchar(4000).  That is then put in an nvarchar(max), but the result is already truncated to 4000 characters, so in Test1 the length of @Result is
    4000.  In Test2, the first operand is converted to nvarchar(max), so the concatenation result is nvarchar(max) and you get the length you expect in @Result (that is, 6000).
    So the solution to your problem is to force the first item in your concatenation to be of type nvarchar(max).  Then the result of the concatenation of the first and second will be nvarchar(max), then SQL concatenates the third term and gets nvarchar(max),
    etc.  So the final result contains the whole string you want.  So you want to do
    CAST(' SELECT A.[EmployeeCode] ,A.[EmployeeId] ,A.[Name],A.[DepartmentCode],A.[DesignationCode]
    , A.[CompanyCode] ,A.[Department] ,A.[Designation] ,A.[Entity]
    , A.[GovtAdministrativeAreaCode] ,A.[WorkingUnitCode],A.[WorkingUnitName]
    , isnull(L.WorkingDays ,0) as TotalWorkingDays ,isnull(K.DelayHr,0) as DelayHr
    , isnull(J.OTHr,0) as OTHr ,isnull(B.[4Hr],0) as [4Hr]
    , isnull(C.[10Hr],0) as [10Hr] ,isnull(D.[12Hr],0) as [12Hr]
    , isnull(E.NoOfPresent,0) as NoOfPresent , isnull(F.NoOfAbsent,0 )as NoOfAbsent
    , isnull(G.NoOfLeave ,0) as NoOfLeave , isnull(H.Morning ,0) as Morning
    , isnull(I.Night,0) as Night , isnull(L.[NoOfW/HDay] ,0) as [NoOfW/HDay]
    , isnull(K.NoOfDelay,0) as NoOfDelay , isnull(L.TotalDayAttends,0) as TotalDayAttends
    , isnull(M.[LessThan4Hr] ,0) as [LessThan4Hr]
    , isnull (N.NoOfNoOutTime,0) as NoOfNoOutTime
    INTO ' AS nvarchar(max))
    +@tableName+'
    --- Etc for the rest of your expression
    Tom

  • Where to store "global variable" for a web application

    There are some "global" variables in my portal web application. e.g. email server
    name, admin email address etc. Will web.xml context-param a good place to store these
    kind of information?
    If so, how do I retrieve it back from a java class? It is easy in a jsp file: appalication.getAttribute(),
    but how about a pipeline component or input processor which are all java file.
    Please help!
    Thank you very much
    Ellen

    I still believe that the information like connectivity parameters to remote
    servers in the distributed environments would be best stored in the JNDI
    tree. I agree, that it is not a "general storage area", but I am not talking
    about storing application run-time data either.
    In the clustered environments it would provide additional benefits of
    centralizing this kind information across the cluster.
    Regards,
    Mike
    "Subrahmanyam Allamaraju" <[email protected]> wrote in message
    news:[email protected]..
    >
    JNDI is not a general-purpose storage area, although you could bind data
    in a JNDI tree. A better (and simpler) way is to store them as context
    parameters. You could read the initial values for these variables from a
    servlet init parameters.
    Subbu
    Michael Goldverg wrote:
    Ellen,
    I would advise to put you global variable in JNDI tree.
    You can use jndi.properties file to store name-value pairs, which will
    get
    loaded into jndi tree at the server startup. Just put this file in your
    application class path.
    The other method would be to code a startup class to store the global
    variable in the jndi tree.
    Regards,
    Mike
    "ellen" <[email protected]> wrote in message
    news:[email protected]..
    There are some "global" variables in my portal web application. e.g.
    email
    >>
    server
    name, admin email address etc. Will web.xml context-param a good place
    to
    >>
    store these
    kind of information?
    If so, how do I retrieve it back from a java class? It is easy in a jspfile: appalication.getAttribute(),
    but how about a pipeline component or input processor which are all javafile.
    Please help!
    Thank you very much
    Ellen

  • How to store only decimal values in one variable.

    I would like to split decimal values from the amount field.
    Ex.
    If it is  value   x =  12345.678
                        y = 12345
                        z  = 678
    like this I have to store in another variable.

    Hi,
    follow the below code.
    data:
         l_value type string,
         l_value1 type string,
         l_val(5) type p decimals 3 value '12.345',
         l_len type i,
         l_len1 type i.
         l_value = l_val.
         condense l_value.
         l_len = strlen( l_value ).
         if l_value cs '.'.
            l_len = l_len - sy-fdpos - 1.
            l_len1 = sy-fdpos + 1.
            l_value1 = l_value+l_len1(l_len).
            l_value = l_value+0(sy-fdpos).
         endif.
         write:/ l_value, l_value1.
    reward if useful.
    Thanks,
    Sreeram.

Maybe you are looking for

  • Can I have 2 or 3 apple accounts linked to the one itunes account?

    Our home now has multiple apple products (imacs, ipads , iphones etc) we have previously shared the one itunes account and each has basically loaded whatever apps, movies or music we want from the one account to each of our own devices. Now with the

  • Can any provide me problem issues on ABAP dictionary for practice?

    Or any one can tell me the links in which problem issues on ABAP dictionary is there? Moderator message : Don't ask for links & solution to vague requirements. Thread locked. Edited by: Vinod Kumar on Jun 14, 2011 9:36 AM

  • Can we call a method from a adapter class?

    Hi I have added KeyAdapter class to a textfield now i want to call a method in the outer class from inside the adapter class. I tried but its showing some error, public class A A() TF1.addKeyListener(new KeyAdapter() public void keyReleased(KeyEvent

  • Freezing when calling

    Hey my skype is freezing everytime I call and sometimes as it loads, I have had this issue prior to release of 7.0 and have tried older versions listed aswell as the beta that seemed to have help people with my problem.   Also using Reg cleaners and

  • Proxy Service

    I use a proxy service that filters my email and Internet. How do I make sure my router (Verizon ActionTek MI424WR) is taking advantage of this service?