Pass constant values to ODI functions in interface mapping

I have a generic ODI user function
Populate_TRG_COLS($(in1), $(in1Val), $(in2), $(in2Val), $(in3))
Implementation (ORACLE):
CASE
WHEN $(in1)=$(inVal1) AND $(in2)=$(inVal2)
THEN $(in3)
END
I use this function when mapping my target columns at
say TRG_COL_1 maps to
Populate_TRG_COLS(SRC_COL_A, '1.0' ,SRC_COL_B, '310.0' , SRC_COL_C);
say TRG_COL_2 maps to
Populate_TRG_COLS(SRC_COL_A, '2.0' ,SRC_COL_B, '320.0' , SRC_COL_C);
and so on.
But its throwing error (invalid character/identifier).
I have tried all possible ways to express these constants say
using TO_CHAR(1.0) or "1.0" or TO_CHAR('1.0')
But none works, plz help.

No idea why and how it worked I just changed
Populate_TRG_COLS($(in1), $, $(in2), $, $(in3))
Implementation (ORACLE):
CASE
WHEN $(in1)=$ AND $(in2)=$
THEN $(in3)
END
This is working and taking correct passed values at correct places.
Can any one validate whether this is the solution.
I use this function when mapping my target columns at
say TRG_COL_1 maps to
Populate_TRG_COLS(SRC_COL_A, 1.0 ,SRC_COL_B, 310.0 , SRC_COL_C);
say TRG_COL_2 maps to
Populate_TRG_COLS(SRC_COL_A, 2.0 ,SRC_COL_B, 320.0 , SRC_COL_C);
Values passed are numeric.

Similar Messages

  • Calling user function from Interface mapping

    I am getting error "Bad query:ORA-00904: invalid identifier" while calling function in the mapping of an interface.
    Can some one provide the syntax of calling user function from interface mapping.
    Thanks,
    RP

    user452108 wrote:
    Can some one provide the syntax of calling user function from interface mapping.Oracle's Call Iinterface, the OCI, does not work differently when coding using a Dvorak keyboard, or writing code using a pretty pink font in the editor.. or coding the call from an interface mapping (whatever the hell that that is).
    You have 2 types of calls. SQL and PL/SQL.
    To call a function via SQL, it can be done using a the standard cursor interface. E.g.
    select MyFunkyFunction from dualIt will return the function value via a single row with a single column. The standard cursor fetch and close cursor calls are used.
    To call it via PL/SQL, an anonymous PL/SQL block is needed, and the caller needs to use a bind variable to receive the value from the function. The anon block will look as follows:
    begin
      :bindVar := MyFunkyFunction;
    end;Refer to your client's abstract layer for interfacing with the Oracle Call Interface, on how to deal with bind variables.

  • How use return value of JavaBeanShell ODI prodecure in Interface Mapping

    My source data is in Complex FIle and Target data is in Oracle.
    I have written ODI procedure using JavaBeanShell technology
    The "command on Source" is below (actual implementation is much more complex):
    /---------------For Example-----------------------
    <@
    import java.sql.*;
    public class JBTest
         public static String test() throws Exception
              conn=odiRef.getJDBCConnection("SRC");
              Statement stmt=conn.createStatement();
              String result="";
              ResultSet rs=stmt.executeQuery("select SNPSLOADDATE from ROOT_ELEMENT");
              while(rs.next()){
                   result = rs.getString(1);
              return result;
    @>
    Is it possible to use this "result"(return val of function test) in Interface mapping implementation.
    If yes how?
    Or any way to assign this return value to an ODI variable.

    Hi,
    I have done using PL/SQL or a simple select from dual statement under oracle tech in function/procedure which can used anywhere.
    I tried using return in java bean shell , didn't worked.
    Unfortunately there is little / no document about how to use java bean shell in ODI. Alternatively you can try jython.

  • Passing parameter values to powershell function from batch file

    Hello ,
       I haven't used powershell for a while and getting back to using it. I have a function and I want to figure out how to pass the parameter values to the function through batch file.
    function Check-FileExists($datafile)
    write-host "InputFileName : $datafile"
    $datafileExists = Test-Path $datafile
    if ($datafileExists)
    return 0
    else
    return -100
    <#
    $datafile = "C:\Dev\eMetric\PreIDWork\PreIDFiles\SampleInputFile_011.txt"
    $returncode = Check-FileExists -datafile $datafile
    Write-Host "ReturnCode : $returncode"
    $datafile = "C:\Dev\eMetric\PreIDWork\PreIDFiles\SampleInputFile_01.txt"
    $returncode = Check-FileExists -datafile $datafile
    Write-Host "ReturnCode : $returncode"
    #>
    The above code seems to be work when I call it. But when I try to call that script and try to pass the parameter values, I am doing something wrong but can't figure out what.
    powershell.exe -command " &{"C:\Dev\eMetric\PreIDWork\PowerShell\BulkLoad_Functions.ps1" $returncode = Check-FileExists -datafile "C:\Dev\eMetric\PreIDWork\PreIDFiles\SampleInputFile_01.txt"}"
    Write-Host "ReturnCode : $returncode"
    $file = "C:\Dev\eMetric\PreIDWork\PreIDFiles\SampleInputFile_01.txt"
    powershell.exe -file "C:\Dev\eMetric\PreIDWork\PowerShell\BulkLoad_Functions.ps1" $returncode = Check-FileExists -datafile $datafile
    Somehow the I can't get the datafile parameter value being passed to the function. Your help would be much appreciated.
    I90Runner

    I am not sure about calling a function in a script like how you want to. Also I see you are setting the values of the parameters, this is not needed unless you want default values if nothing is passed. The values for the parameters will be passed via the
    batch file. So for me the easiest way is as indicated.
    param
    [string]$DataFile
    function Check-FileExists($datafile)
    write-host "InputFileName : $datafile"
    $datafileExists = Test-Path $datafile
    if ($datafileExists)
    return 0
    else
    return -100
    Write-Host "Return Code: $(Check-FileExists $DataFile)"
    Then you create a batch file that has
    start powershell.exe
    -ExecutionPolicy
    RemoteSigned -Command
    "& {<PathToScript>\MyScript.ps1 -DataFile 'C:\Dev\eMetric\PreIDWork\PreIDFiles\SampleInputFile.txt'}"
    Double click the batch file, and it should open a powershell console, load your script and pass it the path specified, which then the script runs it and gives you your output
    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
    Don't Retire Technet

  • How to pass filter values to planning function in Integrated planning

    Dear Experts,
    I have a input ready query where the variables are filled with authorization objects by user. All variables are defined as multiple single values.
    I created a workbook with 3 filter dropdown box - calmonth, company code and version (displayed as text). In the filter drop down box the user selects the company code, version and calmonth for planning. I would like to pass the selected filter values to a planning funciton. How can we pass these selected single filter values to a planning funciton?
    Note: I am able to reference cells for variables that are not in filter (for eg: revaluation function with this document https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be).
    Thanks,
    Gnana

    Hi,
    Your requirement sounds similar to example given by SAP
    [http://help.sap.com/saphelp_nw70/helpdata/en/45/e641e4c61256dee10000000a114a6b/content.htm]
    If you do not want the from value be selected, and its already decided, then gofor restriction of values in filter than to the variable.
    regards,
    ravi.

  • How to pass pushbutton values to a function module

    Hi all,
    I am required  to move a subroutine in main program to a function module but I am unable to pass in the pushbutton . How do I do that?
    In main program:
    SELECTION-SCREEN BEGIN OF BLOCK blk1.
    PARAMETERS message(10) TYPE c.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 3(5) btn1 user-command cli1 modif id bt1.
    SELECTION-SCREEN PUSHBUTTON 8(5) btn2 user-command cli2 modif id bt2.
    SELECTION-SCREEN PUSHBUTTON 13(5) btn3 user-command cli3 modif id bt3.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK blk1.
    In main program there is many subroutines perform check_button using 'P' or check_button using 'C'.
    Form check_button using str type boolean.
    IF btn1 = str AND btn2 = str AND btn3 = space.
         btn3 = 'C'.
         disable3 = 'X'.
         count = count + 1.
       ENDIF.
       IF btn1 = str AND btn3 = str AND btn2 = space.
         btn2 = 'C'.
         disable2 = 'X'.
         count = count + 1.
       ENDIF.
       IF btn2 = str AND btn3 = str AND btn1 = space.
         btn1 = 'C'.
         disable1 = 'X'.
         count = count + 1.
       ENDIF.
    Endform.
    Problem: My function module cannot possible know btn1, btn2 and btn3 values. How do I do it?

    Hi,
    Please try below:
    SELECTION-SCREEN BEGIN OF BLOCK blk1.
    PARAMETERS message(10) TYPE c.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 3(5) btn1 USER-COMMAND cli1 MODIF ID bt1.
    SELECTION-SCREEN PUSHBUTTON 8(5) btn2 USER-COMMAND cli2 MODIF ID bt2.
    SELECTION-SCREEN PUSHBUTTON 13(5) btn3 USER-COMMAND cli3 MODIF ID bt3.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK blk1.
    DATA : value TYPE char1.
    AT SELECTION-SCREEN.
      BREAK-POINT.
      DATA : value TYPE char1.
    IF sy-ucomm = 'CLI1'.
      value = '1'.
      PERFORM test USING value.
    ELSEIF sy-ucomm = 'CLI3'.
      value = '3'.
      PERFORM test USING value.
    ENDIF.
    AT SELECTION-SCREEN OUTPUT.
      IF sy-ucomm = 'CLI1'.
        value = '1'.
      ENDIF.
      PERFORM test USING value.
    *&      Form  test
    *       text
    *      -->VALUE      text
    FORM test USING value .
      IF value = '1'.
        BREAK-POINT.
      ENDIF.
      IF value = '3'.
        BREAK-POINT.
      ENDIF.
    ENDFORM.                    "
    Regards,
    VS

  • Pass bound value to Javascript function

    I'm working in JDeveloper 10.1.2. I'm working on an application generating JSPs for the UI. I display an HTML table using a databound control from the data control pallette. The last column in the table is a button for each row. The user should be able to click a row's button and have a popup window display a page showing a table of detailed info on the the record in the html table row selected.
    Basically I want to pass the id/key for the row to a javascript function using the onclick event of the button. Here is my first attempt:
    <input type="button" onclick="popupDetail(<c:out value="${Row['AuditSeqid']}"/>)"/>
    The compiler barfed on the c:out tag. I don't know if it would even perform the subsitution correctly. The compiler seems to think the double quote starting the value attribute is ending the onclick event descriptor. Escaping with \" just brought up different errors.
    Can anyone recommend a way to pass a bound column's value from a rowset into a javascript function as a parameter?
    Thanks for any help you can give. I'm totally new to JDeveloper. This would be easy in simple JSPs, but with the Oracle data binding, I don't know what tags/objects are available from which I can grab the value.

    Found the solution:
    <td>
    <input type="button" name="detailsButton" value="Details" onClick="javascript:popupDetail('<c:out value="${Row['AuditSeqid']}" />');"/>
    </td>

  • How to pass string value to call function in BIIP FOX?

    Dear all,
       In BIIP fox , we can call function module.
       I got a simple test FM like:
    FUNCTION ZTESTBPSFM2.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_X) TYPE  STRING
    *"     REFERENCE(I_H) TYPE  BSP_STRING
    *"  EXPORTING
    *"     REFERENCE(I_Y) TYPE  F
    ENDFUNCTION.
    My FOX is like,
    DATA YM TYPE 0CALMONTH.
    DATA I_N TYPE F.
    DATA J TYPE STRING.
    J = 'KKKK'.
    FOREACH YM.
    CALL FUNCTION ZTESTBPSFM2
    EXPORTING
    I_X = J
    IMPORTING
    I_Y = I_N.
    {ZREV , YM} = I_N.
    ENDFOR.
    When I run the function , I got a error .
    "Types of parameter I_X (S) and variable J(C) are inconsistent "
    Does anyone know which string data type I should use in function module?
    Best Regards,
    Jeff

    Hi Jeff
    this is a bug. Please open a customer message so SAP support can correct the issue.
    Regards,
    Marc
    SAP NetWeaver RIG

  • Passing String values in the Function module

    Hi
    i am using a coustom made RFC, here i am usnig input parameter 'jobnature' of string type of length 720. the values is getting from the portal,
    i send a string of length of 720 charater from portal, but inside the RFC only 132 charaters are getting .why it happeded so, what is the solution .
    regards
    Renjith

    Hi renjith,
    1. don't give any length in the FM definition.
    2. just like this.
    STR     TYPE     STRING
    (Tick the checkbox for 'Pass Value')
    (Bcos its RFC Enabled)
    regards,
    amit m.

  • How to get improt values in CALL function 'smartfomr name'?

    i am calling smartform with fucntion module but i am getting 3 import parameter value null(i wnat regarding spool info, etc. from it) ,
    i have already defined that 3 import parameters as llike in function module assosiated type.
    where i am wrong , what should i have to do,
    regards,

    I thin k you are calling function module directly - use this ,
    Use FM SSF_FUNCTION_MODULE_NAME to find Smartform's FM.
    formname = 'ZSMRTFORM'.
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = formname
    importing
    fm_name = fm_name
    exceptions
    no_form = 1
    no_function_module = 2
    others = 3.
    if sy-subrc <> 0.
    exit.
    endif.
    then pass the value in
    CALL FUNCTION fm_name
    EXPORTING ....
    IMPORTING
    DOCUMENT_OUTPUT_INFO = l_doc_output_info
    JOB_OUTPUT_INFO = tab_otf_data
    JOB_OUTPUT_OPTIONS = l_job_output_options
    TABLE .....
    Regards,
    Amit
    Reward all helpful replies.

  • Parameter passing by value or by reference in function module

    hi everybody:
    Im a beginner for abap.
    Below description is described in online help.
    In function module, the CALL FUNCTION statement can pass import, export, and changing parameters either by value or by reference. Table parameters are always transferred by reference.
    I understand parameters passing by value means values carried by parameters are transferred, but I do not understand what is "by reference".
    Please kindly give me a explanation.
    Regards.
    Andy

    hi,
    Function modules are modular units with interfaces. The interface can contain the following elements:
    Import parameters are parameters passed to the function module. In general, these are assigned
    standard ABAP Dictionary types. Import parameters can also be characterized as optional.
    Export parameters are passed from the function module to the calling program. Export parameters
    are always optional and for that reason do not need to be accepted by the calling program.
    Changing parameters are passed to the function module and can be changed by it. The result is
    returned to the calling program after the function module has executed.
    Exceptions are used to intercept errors. If an error triggers an exception in a function module, the
    function module stops. You can assign exceptions to numbers in the calling program, which sets the
    system field SY-SUBRC to that value. This return code can then be handled by the program.
    By reference Passes a pointer to the original memory location.  Very efficient
    By value Allocates a new memory location for use within the subroutine. The memory is freed when the subroutine ends.  Prevents changes to passed variable
    By value and result Similar to pass by value, but the contents of the new memory is copied back into the original memory before returning.  Allows changes and allows a rollback
    When you pass a parameter by reference, new memory is not allocated for the value. Instead, a pointer to the original memory location is passed. All references to the parameter are references to the original memory location. Changes to the variable within the subroutine update the original memory location immediately.
    1  report ztx1804.
    2  data f1 value 'A'.
    3
    4  perform s1 using f1.
    5  write / f1.
    6
    7  form s1 using p1.
    8      p1 = 'X'.
    9      endform.
    The code in Listing produces the following output:
    X
    Hope this helps, Do reward.

  • Significance of pass value checkbox in function module

    Hi all,
    Here is a confusion.....While creating a custom function module,i have checked the update module or RFC call radio button going to its attributes.But in the importing parameter if i pass a structure,it is giving a syntax error.It is only allowing table parameter.But if i check the pass value checkbox,it is not givng any syntax error if i pass any structure in the importing parameter.Can anybody please explain me the significance of pass value checkbox?
    Thanks in advance.......

    Hi,
    Function modules are cross-program, reusable procedures that are organized into function groups, and whose functions are implemented between the statements FUNCTION and ENDFUNCTION. Function modules and their interfaces are created in the Function Builder.
    Function Module Interfaces
    The parameter interface of a function module is defined in the Function Builder. It includes the definition of interface parameters and the specification of exceptions that can be triggered by a function module. The Function Builder automatically generates comment lines below the FUNCTION statement in the source code of the function module, which represent the interface of the function module with the following syntax:
    Syntax
    ... [IMPORTING parameters]
    [EXPORTING parameters]
    [CHANGING parameters]
    [TABLES table_parameters]
    [{RAISING|EXCEPTIONS} exc1 exc2 ...]
    The syntax and semantics of IMPORTING, EXPORTING, CHANGING, RAISING, and EXCEPTIONS mainly correspond to the definition of method interfaces with [CLASS-]METHODS. The additional option of defining table parameters using TABLES is obsolete.
    Interface parameters
    The interface parameters are defined on the relevant tab pages in the Function Builder.
    IMPORTING parameters are input parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input parameter. The content of the actual parameter is passed to the input parameter when the call is made. The content of an input parameter for which 'pass by reference' is defined cannot be changed in the function module.
    EXPORTING parameters are output parameters. When the function module is called, a suitable actual parameter can be specified for every output parameter. The content of an output parameter that is defined for <b>'pass by value'</b> is transferred to the actual parameter if the function module is completed without errors. An output parameter that is defined for pass by reference is not initialized when the function module is called.
    CHANGING parameters are input and output parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input or output parameter. When the function module is called, the content of the actual parameter is passed to the input/output parameter, and when the function module is completed, the content of the input/output parameter is passed to the actual parameter.
    TABLES parameters are table parameters. Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
    Exceptions
    The exception of a function module are defined on the Exceptions tab page in the Function Builder. Here you can select exception classes to define whether class-based exceptions are declared or non-class-based exception are defined. Class-based exceptions are represented in the above syntax by RAISING, and non-class-based exceptions are represented by EXCEPTIONS.
    The addition RAISING is used to declare class-based exceptions that can be propagated from the function module to the caller. Exceptions in the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK must be explicitly declared, otherwise a propagation can lead to an interface violation. A violation of the interface leads to the treatable exception CX_SY_NO_HANDLER. Exceptions of the category CX_NO_CHECK are implicitly always declared. The declaration of exceptions of the category CX_STATIC_CHECK is statically checked in the syntax check. For exceptions of the category CX_DYNAMIC_CHECK, the check is not performed until runtime. In a function module in which class-based exceptions are declared with the RAISING addition, the statement CATCH SYSTEM-EXCEPTIONS cannot be used. Instead, the relevant treatable exceptions should be handled in a TRY control structure.
    The addition EXCEPTIONS is used to define a list of non-class-based exceptions that can be triggered in the function module using the statements RAISE or MESSAGE RAISING. Exceptions defined in this way - as with formal parameters - are bound to the function module and cannot be propagated. If an exception of this type is triggered in a function module, and no return value has been assigned to it with the homonymous addition EXCEPTIONS of the CALL FUNCTION statement when the call was made, this leads to a runtime error.
    Note
    For new developments after release 6.10, SAP recommends that you work with class-based exceptions that are independent of the function module.
    RFC is a technology which is used to access a functions (Modules) from
    the remote systems.
    If a function module is set as remote enabled which can be access from
    the remote system via RFC.Eg: U can access the Remote enabled function modules in ur VB,Webdynpro,Java,Visual composer program.
    A function module can be set as remote enabled by SE37->Go to ur FM->click the option Button "remote enabled".
    But Normal function modules can not accessd from the remote system.
    Good Example for RFC enabled function module is : BAPI(Business Application Programming Interface)
    Note: All BAPIs are Remote enabled but not all remote enabled function modules are BAPI.
    CALLING A FUNCTION MODULE:
    1)In U ABAP Editor --> Click "Patter" ---> Selection Option Button "Call Function"
    --> Write the Corresponding FM name --> Hit Enter
    2)The appropriate import ,export Parameters will be displayed in ur editor
    3)Pass the Values Here.
    Also check these links.
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    See the following links:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    Regards,
    Srilatha.

  • Creating a function and passing query value

    I have what I thought was a pretty easy to resolve situation:
    I want to concatenate two query fields, if the 2nd one isn't empty.
    I created a function:
    <cfargument name="q1" value='#query.q1#' />
    <cfargument name="q1a" value='#query.q1a#' />
    <CFSET variables.myPunct = ": ">
    <cfset variables.ResultVar="">
    <cfif Trim(arguments.q1) NEQ "">
    <cfset variables.ResultVar='#arguments.q1#'>
    </cfif>
    <cfif Trim(arguments.q1a) NEQ "">
    <cfif variables.ResultVar NEQ "">
    <cfset variables.ResultVar='#variables.ResultVar &
    variables.myPunct#'>
    </cfif>
    <cfset variables.ResultVar='#variables.ResultVar &
    arguments.q1a#'>
    </cfif>
    <cfreturn variables.ResultVar>
    This is basically just the example they provide in the online
    instruction, with the names changed.
    In the detail band of my report, I have an expression builder
    field containing: report.mytestfunction()
    When I run this, I get: Element Q1 is undefined in ARGUMENTS.
    I've tried this ninety different ways (literally). It seems
    very clear to me that the query.q1 (for that matter, any of the
    query results) are NOT getting passed to the function. I have tried
    making the expression: report.mytestfunction(query.q1). I have
    tried creating an input parameter.
    The documentation on this is ridiculously limited,
    considering that the ability to implement conditional logic depends
    entirely on the "function", as far as I can tell. I can in no way
    get the function to interface with the query results. If is set
    fixed values in the function, as opposed to trying to use the query
    variables, it outputs fine.
    Any ideas?

    That has got to be the only way I DIDN'T try, although I
    could swear I tried that, too. Maybe I didn't have the "required"?
    I don't know. I know it works now. For the record, FUNCTION:
    <cfargument name="q1" required="yes" />
    <cfargument name="q1a" required="yes" />
    <CFSET variables.myPunct = ": ">
    <cfset variables.ResultVar="">
    <cfif Trim(arguments.q1) NEQ "">
    <cfset variables.ResultVar='#arguments.q1#'>
    </cfif>
    <cfif Trim(arguments.q1a) NEQ "">
    <cfif variables.ResultVar NEQ "">
    <cfset variables.ResultVar='#variables.ResultVar &
    variables.myPunct#'>
    </cfif>
    <cfset variables.ResultVar='#variables.ResultVar &
    arguments.q1a#'>
    </cfif>
    <cfreturn variables.ResultVar>
    In the "Detail" band, called function:
    report.mytestfunction(query.q1, query.q1a)
    Thanks for the tip. I'm going to go take a long walk on a
    short pier now.
    max

  • Passing Multiple Values from a worksheet to PL/SQL function.

    Hi All,
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    I will try to explain the scenario:
    We have a crosstab report that showing all the customer details, deposit sum of a customer in each date in a date range selected. With the customer details we are showing the Rank of a customer based on the deposit in the latest date selected. Filtering is based on the rank, ie Top50 or Top60 etc.( As I said rank is calculating based on the deposit in the latest date).This is working fine.
    Now the new requirement is to : For example, in Top50 report, list all the customers, who were in the Top50 list, in any of the dates selected. We are able to display the daywise rank, but when giving a condition like daywiserank <= 50, the result becomes uncertain. Some blank lines, wrong amounts etc..
    As a work around we tried to find out the rank in a PL/SQL function. But the issue there is : we have some multiple value parameters used in the worksheet.
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    Or any other work arounds for the scenario explained?
    Reagrds,
    Jeneesh

    Hi Russ,
    Thanks for the response.
    Russ Proudman wrote:
    1. I thought there was an analytical function similar to rank - or maybe an option of rank - that if there are duplicate records to have them all considered the same rank. So if you had 3 records all the same as rank=2 then a condition saying where rank=2 would return the 3 records. You could check into this.
    We are already using DENSE_RANK. But the issue is the output contains incorrect null values nd repeated rows.
    We got it solved as I explained in the previous post. But will that AGGREGATION MODE setting ( Which discoverer says - not recommended) have any issue? I mean side effects?
    Russ Proudman wrote:
    2. Another thought is that you can create a PL/SQL routine - that's called from a SQL function registered in Discoverer - where a table is created that does the first part of your query. Then a worksheet is created to use the data from that table. So, in essence, the table would have your top50 ranked customers. Then you can write any kind of worksheet against that table. However, DBAs are loath to allow tables - that they didn't create! - many times in a PROD environment.
    Here also the same problem will occur: as the top 50 will depend upon the parameters. I cannot pass those parameters to PL/SQL Function.And storing the top50 ( itmay be top100 or to 150 also) for all combinations of the parameters is impossible
    Russ Proudman wrote:
    3. Finally, are you sure you're rank function is correct in that if you're getting blank lines, maybe the 'over' part is not considering all columns needed to determine the rank?
    Yes the query we are using is correct. The output QUERY of discoverer gives correct results in Sqlplus.
    Regards,
    Jeneesh

  • How to pass multiple values from workbook to planning function ?

    Hi,
    I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
    When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
        A.) input one value -> V1
        B.) input three values -> V1;V2;V3
    This function execute completely in web.
    However, I want to use the planning function in workbook(Excel).
    The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
    thank you.

    Hi,
    Please see the attached how to document (page no 16).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
    Hope this was helpful
    thanks

Maybe you are looking for

  • Macbook freezes randomly on Playback in Garageband

    After the last Garageband update, my Macbook freezes (Mouse cursor still movable, graphics frozen, keyboard not working, sound still playing) on playback. The project has a quicktime movie (soundtrack project) in it. I already tried different compres

  • Is it  possible to enhance transaction S_PL0_86000028?

    Hello Gurus, I need to add 'Cost Center' to the output of 'S_PL0_86000028'. It is a standard report created by Report Painter tool. Is it possible to enhance this report. If yes, how? . Or is it possible to copy this report and create a custom report

  • Can't access icloud on my iOS device.

    I got a message that my icloud is almost full.  I went to my Settings > icloud to manage my account, but I can't select this option.  The icloud support website didn't offer any help with this problem.

  • Is there a way to see what is in other spaces while in space 1?

    I did not see this a response to my question previously posted. If I missed the response, my apologies. I tried to use spaces but I never remember what is in the other spaces and have to cycle through them. Is there a way to "preview" what is in the

  • Placeholder artwork corrupted after updating to v9.2

    After updating to iTunes 9.2, I'm noticing the album artwork used to represent no album artwork has become corrupted. Here's a picture of the problem: http://www.imagebam.com/image/37a24b85099950 Does anyone have any idea of what to do to fix it?