Using a Function to Set Context

I have a report which contains 5 concatenated SQL queries.
The first query calls a function and sets a context ie. SELECT set_ctx('ORG_ID',500) from DUAL
The following SQL sets use views which have predicates based on the context.
1) Within a single report are the SQL statements executed using separate connections to the database? I am not seeing my Context so I'm assuming XMLP splits and calls each within its own Prepared Statement and seperate connection out of the Pool.
2) If they are, is the only way to set a context safely by use of a <dataTrigger> within a Data Template? and would it need setting For Each piece of SQL that fires within the Template? Or can it be defined just once at the start?
Thanks in advance for your answers.
Matt

Stuart,
did you try using...
document.form.<dropdown name>.options[document.form.<dropdown name>.selectedIndex].value ?
This should ideally fetch you the value of the selected value of the dropdown - only thing is that the dropdown in an autorefresh dropdown by default - this you would have to figure out as to how it can be overridden. Maybe an Onchange event can be written locally on the template overriding the onchange event from SAP...
Arun

Similar Messages

  • Using Partner Functions to set up Person Responsible?

    Hello All,
    Can someone please advise what the best practice is for creating individual personnel entires for engineers within Plant Maintenance.
    In the past we have used work centres to identify individuals. This is causing issues with capacity planning and so I want to use an alternative method.
    I can see that Personnel No's can be created, however, this appears to require the use of the SAP HR module where the master data for these records are held, unfortunately we do not use SAP HR and so cannot use this here.
    Can I use Partner Functions to resolve this issue and if so how do I set it up?
    Essentially I want to create Work Centres for specific skill sets i.e Electician, Mechanic etc and then assign individuals to the appropriate groups. That way we can plan and record time against individual engineers.
    As always any help is appreaciated.
    Regards
    Chris
    Edited by: CGADMIN23 on Mar 30, 2011 2:18 PM

    Pete / Narasimhan
    Thankyou for your replys.
    I have not come across Mini HR Master previously so don't know how this works. We do not have the HR module installed and therefore I didn't think this would be a option.
    We have always set up individuals as Work Centres but having read through the 'Plant Maintenance with SAP' book I am lead to believe this is not best practice?
    Ultimately we would like to be able identify individuals so that we can assign jobs and plan capacity.  We also want to be able to assign individuals to specific work centres which would identify there particular skill set.
    Do we need to purchase an additional module to use HR Mini Master? How does this work?
    Regards
    Chris

  • Using a function from static context..

    Well I have a command line app; and it has a public static void main. Now, I made a function that writes to a file, and tried calling it from the main section, and it got mad saying I can't call it from static context. Anyway to allow it to be called from both static and non static contexts?

    otherwise create object of the class, from that object you can call a method

  • Incorrect result set with using isnull() function  in IQ 16

    Hi team,
    We have IQ 16 on HP UX.
    When we use isnull() function in where clause we get incorrect result set if we do not use column name in the result set.
    In first select we get result with one row but in second one we get an empty result set.
    select ID, dat_start, dat_end, dat_stop
    from table_test
    where ID=1105935925
    and isnull(dat_stop,dat_start) <> dat_end
    select ID
    from table_test
    where ID=1105935925
    and isnull(dat_stop,dat_start) <> dat_end
    It depends on number of row or volume of data in table, It is possible to use option Revert_To_V15_Optimizer to get the correct result.
    Do you have any different idea how to solve it?
    Thanks Milos.

    We have tested two versions:
    Sybase IQ/16.0.0.653/131122/P/sp03/ITANIUM/HP-UXi 11.31/64bit/2013-11-22 01:49:18
    SAP IQ/16.0.0.807/140507/P/sp08/ITANIUM/HP-UXi 11.31/64bit/2014-05-07 21:11:45
    Both versions have given same mistake.
    We have not opened any support case for this issue because it is data depended issue. It is not easy to simulate it as an example.
    Do you think we should open a support case for it?
    Miloš

  • GUI_UPLOAD, is there any authority need to be set to use this function ?

    hi all,
    GUI_UPLOAD, using this function, some of the users can't execute it,  is there any authority need to be set  for this function ?
    thanks.

    Hi,
    This fn module has an authorization Object S_GUI.
    With this object, you can, for example, assign authorization to save lists in local files (download lists).
    The object has a single field 'Activity'.
    Possible values:
    60: Upload; This authorizes you to load data into the system using ws_upload or gui_upload. You cannot select the data to be uploaded.
    Regards,
    Gayathri

  • ESB - Is there a way to set context properties when using esb custom pipeline

    Hi there,
    I have a situation where I am using a oneway wcf sql custom receive adapter to polling db and a two-way solicit response wcf sql send adapter to update the db and receive a result back.
    Now I had got this working by setting the BTS.Operation and BTS.MessageType properties using a custom receive pipeline on the receive port. FOR SOME REASON THESE TWO WERE NOT SET BY THE RECEIVE PORT !!!
    Now I have decided to wrap all that in en ESB itinerary by converting the send port into a dynamic one.  I get the following error:
    Exception of type 'Microsoft.BizTalk.Message.Interop.BTSException' was thrown. 
    Since I am using the ESB pipeleine - ItineraryReceiveXML I am not able to set the BTS.Operation and BTS.MessageType explicitly in a pipeline neither can I derive a pipeline form the ESB pipeline as it's a sealed class.
    So my questions are:
    1. Any idea what the above error could be  ?
    2. Also is there a way I get set context properties using an ESB itinerary as that is the only difference from before, can I do that in a map ?
    Thanks
    Phanindra

    BTS.MessageType is typically set by one of the Disassemblers.
    BTS.Operation has nothing to do with the Receive Port/Location and is set by the Engine only when coming from an Orchestration Port.
    But, you can set any Property in any Stage with a custom Pipeline Component as you've found.
    "Exception of type 'Microsoft.BizTalk.Message.Interop.BTSException' was thrown."
    There's usually a lot more to the stack trace.  You'll have to include the whole thing.
    Finally, what benefit do you expect from adding the ESB layer?  This is pretty trivial with an Orchestration.

  • When I use the function of "finding keyword", the word would be shown in green. Can I set the colour by myself?

    When I use the function of "finding keyword"(ctrl+f), the keyword would be shown in green. I want to change the highlighted colour to be blue. Is there any function to change the colour?

    See '''''cor-el's''''' answer in this thread: https://support.mozilla.com/en-US/questions/900541
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *'''''Shockwave Flash''''' (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • File scenario error in Used defined function

    Hi Everyone,
    I was doing file to file scenario, i want to get the same source file name in target also.
    I created the structure as FileName, Company, Address. I did direct mapping for Company and Address
    but for field FileName, i created a userdefined function as i want the same file name.
    I mentioned the following code in  Used defined function
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    When i test the mapping in IR, with sample data, i am getting this error.
    RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:Target_File_MT/FileName. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Source_File_to_Target_File_MM_ method DynamicFile$[, com.sap.aii.mappingtool.tf3.rt.Context@1763e46]
    Could anyone please help me with the issue.
    I have done only IR part, I didnot configured ID.
    Regards,
    Varun.

    HI,
    Check Adapter Specific Message attributes.This blog will  help you
    The specified item was not found.
    You can also go for variable substitution :-
    When you specify the target directory and file name schema, you have option of setting variables and defining them in a table. The variables are replaced by elements from the XML structure at runtime.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8e/464442c1a1c253e10000000a1550b0/content.htm
    links on the dynamic variable substitution
    The specified item was not found.
    The specified item was not found.
    Dynamic File Name Part 1
    Dynamic File Name using XI 3.0 SP12 Part - I
      Dynamic File Name Part 2
    Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
    Thanks

  • User defined function to set a default value of a column

    Hi All
    Can we use user defined function to set a default value of a column ??
    for example:
    create or replace  function test1  return number is
    begin
    return 10;
    end;
    create table testt
    (id  as test1,
      name varchar2(20));
    error:
    ORA-02000: missing ( keywordThanks
    Ashwani

    174313 wrote:
    MichaelS for showing example to use function in table ddl , otherwise i was thinking we cannot use function in table ddl as per error I received.That was an example of a virtual column.
    ORA-04044: procedure, function, package, or type is not allowed hereUsing PL/SQL code like that raises 2 basic problems. If that PL/SQL code for the calculating the column default breaks, what happens to the SQL insert statements against that table. These will need to fail as the table definition depends on the PL/SQL code. This is problematic as this dependency simply increases the complexity of the SQL object.
    The 2nd issue is performance. PL/SQL code needs to be executed by the PL/SQL engine. This means a context switch from the SQL engine to the PL/SQL engine in order to determine the default value for that column. Context switching is a performance overhead.
    So even if it was possible to use a PL/SQL function as parameter for the SQL default clause, I would not be that keen to use it.

  • Get selected function in a context menu with cl_gui_alv_grid

    Hi,
    I'm trying to implement a context menu on a alv grid. I defined and implemented a method for the event CONTEXT_MENU_REQUEST to add function codes to context menu.  It works ok.
    The problem is retrieving the function selected in context menu. I tried to define in the class definition a method for event CONTEXT_MENU_SELECTED (that seems to be the event to use) but  i can't implement it because is defined as protected event in CL_GUI_ALV_GRID.
    How i can implement a method to catch this event and determine te function code defined in the context menu??
    Thanks.
    Edited by: Alfredo Pradas on Jan 4, 2008 5:35 PM
    Edited by: Alfredo Pradas on Jan 4, 2008 5:36 PM
    Edited by: Alfredo Pradas on Jan 4, 2008 5:37 PM

    The tool bar isn't the best mechanism to use for selecting Rows etc but should ideally be used for discrete functions like SAVE, UPDATE, DOWNLOAD TO EXCEL etc.
    For data manipulation look at ON DATA CHANGED, ON DATA CHANGED FINISHED and DOUBLE CLICK.
    Probably the easiest way is to use the double click event
    methods on_dubbelklik
        for event double_click of cl_gui_alv_grid
        importing
          !e_row
          !e_column
          !es_row_no .
    methods dubbelklik
        importing
          !e_row type lvc_s_row
          !e_column type lvc_s_col
          !es_row_no type lvc_s_roid .
    method constructor.
    create object grid_container1
            exporting
               container_name = 'CCONTAINER1'.
        create object  grid1
           exporting
              i_parent = grid_container1.
        set handler z_object->on_user_command for grid1.
        set handler z_object->on_toolbar for grid1.
        set handler z_object->handle_data_changed for grid1.
        set handler z_object->handle_data_changed_finished for grid1.
        set handler z_object->on_dubbelklik for grid1.
        call method grid1->register_edit_event
            exporting
               i_event_id = cl_gui_alv_grid=>mc_evt_enter.
      endmethod.
    method dubbelklik.
    perform dubbelklik in program (caller)  if found
         using
          e_row
          e_column
          es_row_no.
    endmethod.
    Now in the application program
    when a double click event is done the method calls routine dubbelklik in the calling program 
    The row / column nr and field name will be passed to your subroutine.
    (In my calling class for the grid I make the calling program one of the parameters);
    form dubbelklik using
            e_row   type lvc_s_row
            e_column type lvc_s_col
            es_row_no type lvc_s_roid.
      read table <dyn_table> index e_row into wa_elements.
    etc.
    where <dyn_table> is my grid data table.
    Any comparable method should work.
    Cheers
    jimbo

  • FR Studio 11.1.1.3 : You're not authorized to use this function...

    Hi,
    we have FR Studio (client, v. 11.1.1.3.0238 and Report Server v. 11.1.1.3.0.0301) distributed on Citrix terminal server (windows 2003 32-bit) and on latest 2 prod servers we have this error "You're not authorized to use this function. Contact your administrator." appearing.
    On QA server FR Studio works fine, we had an issue there when we forgot to set ports
    8295-8299 to "listening mode" = they were not defined on FR server's FR_servp.properties config files.
    This is also fixed on Prod FR servers and we have double checked firewalls are open.
    After adding them to QA FR servers we had no issues with FR Studio on QA, but on PROD the issue still exists.
    We have also checked that this shouldn' have anything to do with authentication.
    Odd thing is that we get at least partially same sort of error messages on both working and non-working FRClient.log files.
    On FRClient.log there are for example following records:
    08-04 09:26:11 ERROR ConfigResourceBundle     Could not find fr_configcache.properties file
    08-04 09:26:11 ERROR SerializableResourceBundle     Could not get registry instance
    08-04 09:26:11 ERROR SerializableResourceBundle     java.io.FileNotFoundException: C:\Apps\Hyperion\common\config\9.5.0.0\reg.properties (The system cannot find the file specified)
    com.hyperion.hit.registry.exceptions.RegistryException: java.io.FileNotFoundException: C:\Apps\Hyperion\common\config\9.5.0.0\reg.properties (The system cannot find the file specified)
         at com.hyperion.hit.registry.RegistryUtils.createNewConnection(RegistryUtils.java:158)
         at com.hyperion.hit.registry.RegistryConnection.getInstance(RegistryConnection.java:155)
         at com.hyperion.hit.registry.Registry.getInstance(Registry.java:309).....
    Caused by: java.io.FileNotFoundException: C:\Apps\Hyperion\common\config\9.5.0.0\reg.properties (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at com.hyperion.hit.registry.RegistryUtils.createNewConnection(RegistryUtils.java:151)
         ... 15 more
    08-04 09:26:11 ERROR HRResourceBundleFactory     Could not locate registry
    08-04 09:26:11 ERROR HRResourceBundleFactory     5500
    com.hyperion.reporting.util.HyperionReportException: Server not yet configured. Please configure the server.
         at com.hyperion.reporting.config.ConfigResourceBundle.<init>(Unknown Source)
         at com.hyperion.reporting.config.ConfigResourceBundle.getInstance(Unknown Source)
         at com.hyperion.reporting.config.HRResourceBundleFactory.getConfigBundle(Unknown Source)...
    That propably gives already an idea what FR Studio is logging.
    Does anyone have idea about this .properties file for frconfig cache?
    Should that be defined somehow during system configuration as we don't find that from any of our environments?
    Just for additional info:
    We have used following packages and installed HFM Admin Client, FR Studio and EPMA File Generator GUI.
    •     02. installer - V17382-01.zip
    •     03. foundation 1 of 4 - V17397-01.zip
    •     03. foundation 2 of 4 - V17369-01.zip
    •     04. architect - V17398-01.zip
    •     08. financial reporting - V17378-01.zip
    •     11. financial management - V17365-01.zip
    Patches:
    + hfm_11113_50-p9976978_111130_WINNT.zip
    + financial reporting_11113_20-p9657652_11113_WINNT.zip
    During the installation we selected:
    Foundation \
    Performance Management Architect\Performance Management Architect File Generator
    Financial Management\
    Financial Management Client
    Financial ManagementADM Driver
    Financial Reporting\
    Financial Reporting Studio Client
    I noticed that apparently no configuration was run neither in QA or in PROD, not sure though if FR Studio even requires that? HFM Admin Client does work on all environments Citrix servers.
    But in Dev and LAB where FR Studio is working fine - FRClient logs absolutely no recods at all and there we did run configuration to tell which SQL db is on background.
    Not sure though whether that config run has any significance for FR Studio.
    Sorry for extremely long story, but just in case if anybody has faced similar issues and whether there could be something with Windows server settings I should go and check?
    Btw... even adding this fr_configcache.properties manually (to try to highlight FR server name and port) it seems FR Client can't find the file.
    Br, MJK

    Denis,
    Thank you for the prompt reply.
    >
    Denis Konovalov wrote:
    > if those reports were saved with security - you're not goingt o be able to open them with Xi3.1 Deski.
    Forgive me for my mundane question but what does saving with security mean?
    Thanks

  • How to use G_SET_GET_ID_FROM_NAME to get set id

    hello gurus,
    i am having a set defined as CL-BOOK-DOC-TYPE which contians accounting document type
    i want to read the set values in my program using the function module G_SET_GET_ID_FROM_NAME  but when i try to pass this set value i am not getting any set values am i missing any key fields
    regards
    afzal

    self solved

  • How to use this FUNCTION VIEW_MAINTENANCE

    hi
    i create a table zxxxx and set Data Browser/Table View Maint:
                                                  Display/Maintenance Allowed.
    so i want to use the function of "VIEW_MAINTENANCE" to update and create new
    inforation the TABLE.
    but i don't know VIEW_MAINTENANCE which of parameter meaning.
    and how to control it.
    who can give demo show.
        CALL FUNCTION 'VIEW_MAINTENANCE'
          EXPORTING
            VIEW_ACTION               = 'S' "DISPLAY
            VIEW_NAME                 = W_VIEWNAME "W_TABNAME
          TABLES
            X_HEADER                  = L_VIMDESC
            X_NAMTAB                  = L_VIMNAMTAB
            DBA_SELLIST               = L_VIMSELLIST
            EXCL_CUA_FUNCT            = L_VIMEXCLFUN.
    what meaning and availability value : EXCL_CUA_FUNCT-FUCNTION ,
    how to use         X_HEADER  
            X_NAMTAB           
            DBA_SELLIST       these parameter.
    thank you very much.

    Please check doucmentation maintained for FM - VIEW_MAINTENANCE.
    CUA functions to be deactivated dynamically
    At runtime, the table EXCL_CUA_FUNCT must contain all those functions which are not to be callable in data processing , i.e. which are to be dynamically deactivated in the CUA interface at runtime. This is useful, e.g. for the following functions whose handling in cluster maintenance is ambiguous:
    - 'ANZG' --> switch from 'Change' to 'Display' mode,
    makes no sense in a maintenance cluster
    - 'AEND' --> switch from 'Display' to 'Change' mode
    makes no sense in a display cluster
    - 'xxxx' --> other functions at the callers discretion.
    The table must have the structure VIMEXCLFUN, as follows:
    FUNCTION(4) TYPE C, ---> contains the function codes to be deactivated dynamically
    MESSAGE(3) TYPE C. ---> online help auxiliary field (not yet supported)
    Return ->
    CUA functions to be deactivated dynamically
    Database Access Selection Conditions The table DBA_SELLIST contains the database access selection conditions. The following fields must be filled:
    Field name Contents       
    NEGATION NOT, if the condition is to be negated       
    SPACE otherwise       
    VIEWFIELD name of the field to which the condition is to apply       
    OPERATOR logical operator of the condition (e.g. 'EQ', 'NE',...)       
    VALUE comparison value of the condition in external format       
    AND_OR AND, if the next line of the condition is to be linked       
    to the current line by logical AND       
    OR , if the next line of the condition is to be linked       
    to the current line by logical OR       
    SPACE, if no further line follows       
    DDIC S, if the view field in DD is flagged as a subset field       
    (PM = 'S')       
    SPACE otherwise       
    TABIX Index of the view field in the view nametab     
    Notes:
    1. Valid operators are: (see also ABAP doc.)
    EQ - equals
    NE - not equal to
    GT - greater than
    GE - greater than or equal to
    LT - less than
    LE - less than or equal to
    CA - only for strings: contains at least one character of the comparison string
    CN - only for strings: negation of CA
    CO - only for strings: contains only characters from the comparison string
    NA - only for strings: negation of CO
    CP - only for strings: contains the pattern in the comparison string
    NP - only for strings: negation of CP
    CS - only for strings: contains the string in the comparison string
    NS - only for strings: negation of CS
    LK - like the LIKE operator in a SELECT ... WHERE clause
    2. The function module does not (yet) check whether the selection conditions passed here are compatible with any conditions in the Data Dictionary view definition. The caller must ensure that this is the case.
    Return ->
    Database Access Selection Conditions

  • When using TODATE function MDX query is not correctly generated

    Essbase 9.3.1.2 and OBIEE 10.1.3.4.1.
    When using TODATE function MDX query is not correctly generated.
    This leads to unexpected values not only on cumulative columns in report (generated with TODATE), but also other columns (calculated with AGO function or directly read from cube) have incorrect values.
    The problem occurs when you filter on a column that is not in the select list. If you filter on just one level of dimension, results are fine. You can filter on multiple dimensions as long as you filter on just one level of each dimension.
    If you filter on two or more levels of one dimension, than results are not correct. In some cases results for TODATE column are all zeros, in some cases it is a random value returned by Essbase (same random value for all rows of that column), and in some cases BI Server returns an error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. Essbase Error: Network error [10054]: Cannot Send Data (HY000).
    Here is generated MDX code:
    With
    set [Grupe proizvoda2] as '{[Grupe proizvoda].[N4]}'
    set [Grupe proizvoda4] as 'Generate([Grupe proizvoda2], Descendants([Grupe proizvoda].currentmember, [Grupe proizvoda].Generations(4), leaves))'
    set [Segmentacija2] as '{[Segmentacija].[RETAIL]}'
    set [Segmentacija4] as 'Filter(Generate({[Segmentacija2]}, Descendants([Segmentacija].currentmember, [Segmentacija].Generations(4),SELF), ALL), ([Segmentacija].CurrentMember IS [Segmentacija].[AFFLUENT]))'
    set [Vrijeme3] as '{[Vrijeme].[MJESEC_4_2009]}'
    member [Segmentacija].[SegmentacijaCustomGroup]as 'Sum([Segmentacija4])', SOLVE_ORDER = AGGREGATION_SOLVEORDER
    member [Accounts].[MS1] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],2,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS2] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],1,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS3] as 'AGGREGATE({PeriodsToDate([Vrijeme].[Gen2,Vrijeme],[Vrijeme].currentmember)}, [Accounts].[Trosak kapitala])'
    select
    { [Accounts].[Trosak kapitala],
    [Accounts].[MS1],
    [Accounts].[MS2],
    [Accounts].[MS3]
    } on columns,
    NON EMPTY {crossjoin ({[Grupe proizvoda4]},{[Vrijeme3]})} properties ANCESTOR_NAMES, GEN_NUMBER on rows
    from [NISE.NISE]
    where ([Segmentacija].[SegmentacijaCustomGroup])
    If you remove part with TODATE function, the results are fine. If you leave TODATE function, OBIEE returns an error mentioned above. If you manually modify variable SOLVE_ORDER and set value to, for example, 100 instead of AGGREGATION_SOLVEORDER, results are OK.
    In all cases when this variable was modified in generated MDX, and query manually executed on Essabse, results were OK. This variable seems to be the possible problem.

    Hi,
    Version is
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Sorry, in my last post i forgot to mention that i already created a function based index but still it is not using because, there is a UNIQUE constraint on that column.
    Thanks

  • Using sum function and round function in single text form field

    Hi all,
    I have a column Name - A . In the rtf template i have summed up the column A and showing it. But the output is coming as 99.9999997. I want to round it to 100.
    I tried using <?round(sum(A),2)?> but dint workout.
    I also tried using variables. It is also not working.. I used <?xdoxslt:set_variable($_XDOCTX,’ABS',sum(A)?> and then i used get variable to get it.... But it throwing error while using sum in the set variable step.
    Can anyone please help me..
    Thanks
    Sunil

    Hi Sunil,
    Calculate the sum into a Variable. and apply round function on the variable to get the desired value.
    Calculating sum:
    <?xdoxslt:set_variable($_XDOCTX,'v',xdoxslt:get_variable($_XDOCTX,'v')+DOLLARS)?> (its running sum formula,should be placed inside the table to get sum of all rows of particular column)
    here Variable 'v' holds the sum value
    apply round function:
    <?round(xdoxslt:get_variable($_XDOCTX,'v'))?>
    Thanks and Regards,
    Aravind

Maybe you are looking for