SSIS Dynamic Input Parameters

Good day,
I have a simple package that makes use of a stored procedure.  The stored procedure makes use of a start and end date parameter. I would like, when I execute the package, the first thing is an input box(es) to accept these parameters, then pass them
onto the proc, and the package executes.
May I kindly get assistance with this. I have so far created a script task to prompt the user for these parameters, but I'm getting stuck somewhere.
Please assist.
Many thanks
Regards
Zimiso

Hi Zimiso,
To achieve your requirement, please add two variables User::StartDate, User:EndDate to ReadWriteVariables property of Script Task, then add the following code in the Script Task:
Public Sub Main()
' Add your code here
Dim message, title, message1 As String
Dim myValue, myvalue1 As Object
' Set prompt.
message = "Enter a value for parameter @StartDate"
' Set title.
title = "InputBox Demo"
' Display message, title
myValue = InputBox(message, title)
' Set prompt.
message1 = "Enter a value for parameter @EndDate"
' Display message, title
myvalue1 = InputBox(message1, title)
Dts.Variables("User::StartDate").Value = CType(myValue, DateTime)
Dts.Variables("User::EndDate").Value = CType(myvalue1, DateTime)
Dts.TaskResult = ScriptResults.Success
End Sub
Then use two variables in Execute SQL Task as the parameters.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • How to add programatically/dynamically input parameters to a taskflow?

    I have usecase like this -
    I have a taskflow created. But I dont know how many input parameters that I need to define on this taskflow.
    Is there any way, by which I can add input parameters to a taskflow programatically? using a MBean or any APIs are available that will enable to do this?

    When using the task-flow as a region, instead of specifying the parameter individually - you could provide Map as the input parameters with Key being the parameter name and Value being the actual value of the parameter.
    Check this sample:
    http://adfsampleapplications.googlecode.com/svn/trunk/TaskflowParamSampleApp.zip
    Thanks,
    Navaneeth

  • Getting column headers dynamically from input parameters in alv.

    Hi all,
    I am new to abap, can any one help me in getting column header dynamically through parameters in alv ?
    Eg:-
    i Have parametars for days field ,
    user inputs days as 10 20 30 40.
    Now I want to display in alv column headers as:-
    1st column-  'FROM 0 TO 10'
    2nd column- 'FROM 10 TO 20 '
    3rd column- 'FROM 20 TO 30'
    4th column- 'FROM 30 TO 40'
    5th column- 'FROM 40 TO 50'
    6th column- 'FROM 50 TO 60'
    thanks in advance........

    Check this code snippet:
    Step 1: Create a dynamic table based on the input in the selection screen.
    TYPE-POOLS: abap.
    DATA:
      lr_structdescr    TYPE REF TO cl_abap_structdescr,
      lr_tabledescr     TYPE REF TO cl_abap_tabledescr,
      lr_datadescr      TYPE REF TO cl_abap_datadescr,
      lt_components     TYPE abap_component_tab,
      ls_component      TYPE abap_componentdescr,
      lr_wa             TYPE REF TO data,
      lr_tab            TYPE REF TO data.
    DATA: lv_index TYPE sy-index.
    DATA: lv_index_num(5) TYPE n.
    DATA: lv_index_char(5) TYPE c,
          lv_iter TYPE i,
          lv_low TYPE numc2 VALUE 0,
          lv_high TYPE numc2 VALUE 10.
    DATA: lr_alv TYPE REF TO cl_salv_table.
    FIELD-SYMBOLS: <fs_field> TYPE ANY.
    FIELD-SYMBOLS: <fs_wa> TYPE ANY.
    FIELD-SYMBOLS: <fs_tab> TYPE table.
    PARAMETERS p_numcol(2) TYPE n DEFAULT 50.
    START-OF-SELECTION.
      lv_iter = p_numcol DIV 10.
      DO lv_iter TIMES.
        IF sy-index > 1.
          lv_low = lv_low + 10.
          lv_high = lv_high + 10.
        ENDIF.
        lv_index_num = sy-index.
        lv_index_char = lv_index_num.
        CONCATENATE 'FROM' lv_low 'TO' lv_high INTO ls_component-name
        SEPARATED BY '_'.
        ls_component-type =
        cl_abap_elemdescr=>get_p( p_length = 10 p_decimals = 2 ).
        INSERT ls_component INTO TABLE lt_components.
      ENDDO.
    * get structure descriptor -> lr_STRUCTDESCR
      lr_structdescr
      = cl_abap_structdescr=>create( p_components = lt_components
                                     p_strict = space ).
    * create work area of structure lr_STRUCTDESCR -> lr_WA
      CREATE DATA lr_wa TYPE HANDLE lr_structdescr.
      ASSIGN lr_wa->* TO <fs_wa>.
      lr_datadescr = lr_structdescr.
      lr_tabledescr
      = cl_abap_tabledescr=>create( lr_datadescr ).
    * Create dynamic internal table
      CREATE DATA lr_tab TYPE HANDLE lr_tabledescr.
      ASSIGN lr_tab->* TO <fs_tab>.
    * Populate the internal table
      DO 10 TIMES.
        DO.
          lv_index = sy-index.
          ASSIGN COMPONENT  lv_index  OF STRUCTURE <fs_wa> TO <fs_field>.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          <fs_field> = sy-index.
        ENDDO.
        APPEND <fs_wa> TO <fs_tab>.
      ENDDO.

  • Dynamically select data with 20 input parameters

    Hi Experts,
    Now i have created a subscreen with more than 20 fields on it. these fields are defined by parameters, not select options. user can input any fileds for these input parameters.
    So now i should write codes to select data from database according the user input. Is there any easy way for me to write it? I heard about dynamically SQLs, but i don't know how to use it.
    Thanks a lot!

    you forgot to mention why you needed dynamic SQL : I guess that when user lets a field blank, you must not perform selection on it.
    The easiest is ( FIELD1 = P_FIELD1 OR FIELD1 = space ) AND ( FIELD2 = P_FIELD2 OR FIELD2 = space ) AND etc. Even if it seems repetitive, I advise you to keep the SQL static instead of dynamic, because in this latter case, I think the code will be a little bit less clear.
    Of course, if you argue that there are other requirements, then maybe it's worth re-evaluating the solution.
    If you need more information, just look at ABAP examples in your system (SE38, Environment, Examples, ABAP examples -> ... -> Dynamic conditions)

  • How to create a list of Input Parameters ? (BAPI)

    Hi guys,
    I'm executing a BAPI in my webdynpro app, the Bapi has various input parameters (simple and structure).  
    I needed to fill an input structure, and that was ok... BUT, now I need to create and fill dynamically the same input structure but with more than 1 record. 
    Example
    -->MyBAPI
    >MyStructure (1)
    >MyStructure (2)
    >MyStructure (3)
    >MyStructure (...n)
    I have tried to create nodes dynamically but I just receive errors.. =(  
    Could you recommend me anything ?
    Thanks and regards
    Diego

    Hi,
    You could use one of the following methods to add more than one element to a node of upper cardinality greater than one.
    MyBAPI.MyStructure.addElement(int arg0, IWDNodeElement arg1)
    MyBAPI.MyStructure.addElement(IWDNodeElement arg0)
    Incase the MyBAPI node is a model node you could also use
    MyBAPI.MyStructure.bind(Collection arg0)
    Thanks and Regards,
    Sam Mathew

  • Passing dynamic selection parameters for fagll03 transaction

    hi experts,
    im trying to call  a transaction ( fagll03) in my report with the input parameters via selection screen (using SUBMIT ) , but iwant to pass the profit center  values to the transaction fagll03 , but the profit center is in dynamic selection , i just tried with some code , but it is not working, can any one just tell me briefly how to pass the profit center variable to the dynamic selection screen in fagll03. if u have any code please update me , it will be more useful.
    Regards,
    Venkat.

    Look at FM FREE_SELECTIONS_RANGE_2_EX which will build the correct parameter to use in the WITH FREE SELECTION option.
    First read Abap documentation at SAP online help [WITH FREE SELECTIONS texpr |http://help.sap.com/abapdocu/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm#!ABAP_ADDITION_5@5@] in [SUBMIT - selscreen_parameters|http://help.sap.com/abapdocu/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm] of [SUBMIT|http://help.sap.com/abapdocu/en/ABAPSUBMIT.htm] (or press F1 on SUBMIT)
    Also look if those notes are relevant for your system
    - [Note 965988 - FAGLL03: 'Dynamic selections' are ignored|https://service.sap.com/sap/support/notes/965988]
    - [Note 1105201 - FAGLL03: 'Custom selections' are ignored|https://service.sap.com/sap/support/notes/1105201]
    Regards,
    Raymond

  • Input parameters from process

    Hi,
    I have a scenario where the user enters the process id as the input and once he submits it
    I have to retrieve the input parameters of that process
    Is it possible to get the input parameters using the GP API
    Please give me a lead on how to achieve this
    Thanks
    Padmaja

    Hi
    You can achieve this using wd api, you need to create the webdynpro application
    IGPProcess process = null;
         String message = "";
         String processName = "Cab Booking Process";
         try {
               IWDClientUser wdUser = WDClientUser.getCurrentUser();
               IUser user = wdUser.getSAPUser();
              // wdComponentAPI.getMessageManager().reportSuccess("current user is : " + user.getFirstName());
               IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(user);//, user.getLocale());
               process =GPProcessFactory.getDesigntimeManager().getActiveTemplate("7031AF6B877511DCBBB60016353AC84F",userContext);
               IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
               IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
               int rolenum = process.getRoleInfoCount();
               //wdComponentAPI.getMessageManager().reportSuccess("dyn user is : " + user.getFirstName());
               IGPProcessRoleInstance roleInstance=null;
               IGPStructure params = null;
              // wdComponentAPI.getMessageManager().reportSuccess("Title is "+ process.getTitle());
    //           if (process.getTitle().equals("Cab Booking Process"))
    //               wdComponentAPI.getMessageManager().reportSuccess("get process instance "user.getFirstName()"  "user.getLastName()rtm.getRunningInstances(0, new Date(2007,1,1), new Date(System.currentTimeMillis()), user));
               try {
                    params = GPStructureFactory.getStructure(process.getInputParameters());
                         if (process.getTitle().equals("Cab Booking Process")) {
                             params.setAttributeValue("RequestId.4",wdContext.currentContextElement().getRequestId());
                             params.setAttributeValue("EmployeeId.4",wdContext.currentContextElement().getEmployeeId());
                             params.setAttributeValue("ApproverId.4",wdContext.nodeZhr_Emp_Sup_Info_Input().nodeOutput_Approver().node_Output().current_OutputElement().getUser_Id());
                             params.setAttributeValue("ApproverName.4",wdContext.nodeZhr_Emp_Sup_Info_Input().nodeOutput_Approver().node_Output().current_OutputElement().getName());
                             params.setAttributeValue("Name.4",wdContext.currentOrg_AssignmentElement().getName());
                             params.setAttributeValue("Grade.4",wdContext.currentOrg_AssignmentElement().getEsubgroup());
                             params.setAttributeValue("Department.4",wdContext.currentOrg_AssignmentElement().getOrgtxt());
                             params.setAttributeValue("PersonalArea.4",wdContext.currentContextElement().getPersonalSubAreaText());
                             params.setAttributeValue("CostCenter.4",wdContext.currentContextElement().getCostCenter_GuestText());
                             //params.setAttributeValue("ActionName.4","Test Cab Request From Reddy");
                             if(wdContext.currentContextElement().getResultState().equalsIgnoreCase("Submit")){
                                  //setting the Action name dynamically(UWL Task Name)
                                  wdContext.currentContextElement().setActionName("Approve Cab Request Of " + wdContext.currentOrg_AssignmentElement().getName());
                                  params.setAttributeValue("ActionName.4", wdContext.currentContextElement().getActionName());
                                  wdComponentAPI.getMessageManager().reportSuccess("Your Request Form has been sumbited for the Approval.");
                                  message = "Your Request has been sumbited for the Approval.\n\tRequest ID : " + wdContext.currentContextElement().getRequestId();
                             } else {
                                  //setting the Action name dynamically(UWL Task Name)
                                  wdContext.currentContextElement().setActionName("Cab Booking Request from " + wdContext.currentOrg_AssignmentElement().getName());
                                  params.setAttributeValue("ActionName.4", wdContext.currentContextElement().getActionName());
                                  params.setAttributeValue("Extra.4",getTravelDeskPortalId());//Travel Desk Id
                                  wdComponentAPI.getMessageManager().reportSuccess("Your Request has been sent to Travel Desk.");
                                  message = "Your Request has been sumbited to the Travel Desk.\n\tRequest ID : " + wdContext.currentContextElement().getRequestId();
                    }catch(Exception e){
                         wdComponentAPI.getMessageManager().reportSuccess("Exception in Parameter Set "+e);
               IGPProcessInstance prInstance = rtm.startProcess(process,processName,"This process has been started using the GP public API",user,roles,params,user);
               catch(Exception e){
                    wdComponentAPI.getMessageManager().reportSuccess("Exception Main Try Block "+e);
               try{
               catch (Exception e){
                   wdComponentAPI.getMessageManager().reportSuccess("Error in Calling Complete" +e.getMessage());

  • Changing input parameters at GP-Runtime (Web Dynpro)

    Hi,
    I'm searching for a solution to change the input paramters for an action (at GP-Runtime) in a web dynpro application.
    Is it possible to do something?
    I cannot found something in the API, which solves the probelem.
    Thanks for your helping hands
    Steve

    How many variations of the input parameters do you have.  Could you give more details on the use case?  Did you try the GP public API? It is capable of dynamically changing the input parameters. 
    Are you using the webdynpro GP-Interface?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/50d74ada-0c01-0010-07a8-8c118d408e59
    If you have a limited number of use cases, then you could create a Block type "Alternatives" and then create a WebDynpro callable object for each permutation of the input parameters.
    Regards,
    Austin.

  • Error while creating a BO Universe (using IDT) on top of SAP HANA Calculation View with Input Parameters

    Hi All..
          We are trying to create a Universe (using IDT-Version4.0) on top of the HANA Calculation view. The Calculation view has 4 input parameters, So
    in Universe side we have created the respective prompts. For the creation of derived table we have used the following code
    SELECT *
    FROM "_SYS_BIC"."<schema_name>.<CV_Calculation_View_test>"
    'PLACEHOLDER'=('$$IP_A$$','@Prompt(A)'),
    'PLACEHOLDER'=('$$IP_B$$','@Prompt(B)'),
    'PLACEHOLDER'=('$$IP_C$$','@Prompt(C)'),
    'PLACEHOLDER'=('$$IP_D$$','@Prompt(D)')
    While validating the above code we are getting an error.
    I have attached the snapshot of that error for your reference. Please find the attachment and help me in resolving it.
    Thanks in advance.

    Hello George,
    I don't have any personalization set on the info space. Also I am using mapped Account in BI to connect to HANA. The confusing part is that it is able to validate the infospace with the input parameters and index it. However query does not return any results. I even tried running the same query which explorer sends to HANA in the SQL editor and there too the same results,the query does not return anything. The model does return data when I do a data preview and if accessed from other tools like AAO.
    Also when I use SSO connection to HANA, indexing of the infospace fails. Where can I see the error log?
    Thanks,

  • How to log input parameters for Function Modules?

    Hi,
    I need to create a Logging system to trace input parameters for function modules.
    The log functionality could be done by developing a class method or a function module (For example 'write_log'), and calling it within each function module that I want to log. The 'write_log' code should be independent from the interface of the Function Module that I want to log.
    For example, I'd like to write a function/class method that can log both these functions modules:
    Function DummyA
       Input parameters: A1 type char10, A2 type char10.
    Function DummyB
       Input parameters: B1 type char20, B2 type char20, B3 type char20, B4 type Z_MYSTRUCTURE
    Now the questions...
    - Is there a "standard SAP" function that provide this functionality?
    - If not, is there a system variable in which I can access runtime all parameters name, type and value for a particular function module?
    - If not, how can I loop at Input parameters in a way that is independent from the function module interface?
    Thank you in advance for helping!

    check this sample code. here i am capturing only parameters (import) values. you can extend this to capture tables, changin, etc.
    FUNCTION y_test_fm.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(PARAM1) TYPE  CHAR10
    *"     REFERENCE(PARAM2) TYPE  CHAR10
    *"     REFERENCE(PARAM3) TYPE  CHAR10
      DATA: ep TYPE STANDARD TABLE OF rsexp ,
            ip TYPE STANDARD TABLE OF rsimp ,
            tp TYPE STANDARD TABLE OF rstbl ,
            el TYPE STANDARD TABLE OF rsexc ,
            vals TYPE tihttpnvp ,
            wa_vals TYPE ihttpnvp ,
            wa_ip TYPE rsimp .
      FIELD-SYMBOLS: <temp> TYPE ANY .
      CALL FUNCTION 'FUNCTION_IMPORT_INTERFACE'
        EXPORTING
          funcname                 = 'Y_TEST_FM'
    *   INACTIVE_VERSION         = ' '
    *   WITH_ENHANCEMENTS        = 'X'
    *   IGNORE_SWITCHES          = ' '
    * IMPORTING
    *   GLOBAL_FLAG              =
    *   REMOTE_CALL              =
    *   UPDATE_TASK              =
    *   EXCEPTION_CLASSES        =
        TABLES
          exception_list           = el
          export_parameter         = ep
          import_parameter         = ip
    *   CHANGING_PARAMETER       =
          tables_parameter         = tp
    *   P_DOCU                   =
    *   ENHA_EXP_PARAMETER       =
    *   ENHA_IMP_PARAMETER       =
    *   ENHA_CHA_PARAMETER       =
    *   ENHA_TBL_PARAMETER       =
    *   ENHA_DOCU                =
       EXCEPTIONS
         error_message            = 1
         function_not_found       = 2
         invalid_name             = 3
         OTHERS                   = 4
      IF sy-subrc = 0.
        LOOP AT ip INTO wa_ip .
          MOVE: wa_ip-parameter TO wa_vals-name .
          ASSIGN (wa_vals-name) TO <temp> .
          IF <temp> IS ASSIGNED .
            wa_vals-value = <temp> .
          ENDIF .
          APPEND wa_vals TO vals .
        ENDLOOP .
      ENDIF.
    ENDFUNCTION.

  • How to write a SQL query in SAP B1 2007 B with input parameters?

    How to write a SQL query in SAP B1 2007 B with input parameters, on execution of which will ask for some input value from the user and the values will be selected from a list such as item list?

    The syntax like
    SELECT * FROM OITM T0 WHERE T0.ItemCode = '[%0\]'
    Thanks,
    Gordon

  • How to bind/pass multiple input parameters to sql query in BPEL Process

    Hi,
    I have a requirement to invoke a query on a database table to fetch the records based on the few input values or bind variables?
    I have created a Partner link using the DBAdapter service and have used custom SQL, how can i bind and pass multiple bind/input parameters for these queries.
    foreg: if i have to query employee records based on name , desgination and age, these three params would be my input parameter that i will pass when i invoke the BPEL process, bow how can i pass these parameters to the partner link using DBADAPTER service.
    Please help
    Regards

    If the parameter-value is not known beforehand and cannot be determined based on the process instance data at that time, there are 2 options. Either invoke the PL/SQL procedure you named using a DB adapter service to get the value and pass it to the other DB adapter service. Or create a single service (e.g. PL/SQL procedure) that determines the parameter value, executes the query and returns the result. However, this is more a design issue. Does it makes sense to combine these actions in a separate service and use it or are these actions not related? You furthermore state that additional (DB adapter) services make the process heavier. Do you have strict requirements on the time process-instances may run or other such requirements? If not, I think the design-choice on whether combining these actions in a single service should have more priority.

  • Calling report from a form with user input parameters

    Hello,
    I am new to Oracle reports. I have an application coded in 6i. I am currently running the application in Oracle Forms Builder 9i. There are also few reports which are called from the forms. Since the application was developed in 6i, the report was called using Run_Product. The forms pass a set of user parameters to the report using the parameter list pl_id. The syntax used was Run_Product(REPORTS, 'D:\Report\sales.rdf', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);
    I learnt that the Run_product doesnt work in 9i and we need to use run_report_object. I have changed the code to use run_report_object and using web.show_document () i am able to run the report from the form. There are 2 parameters that need to be passed from forms to reports. The parameters are from_date and to_date which the user will be prompted to enter on running the form. In the report, the initial values for these parametes are defined. So, the report runs fine for the initial value always. But when i try to change the user inputs for the form_date and to_date, the report output doesnt seem to take the new values, instead the old report with the initial values(defined in the report) runs again.
    Can someone give me the code to pass the user defined parameters to the report from the forms? I have defined a report object in the forms node as REPTEST and defined a parameter list pl_id and added form_date and to_date to pl_id and used the following coding:
    vrepid := FIND_REPORT_OBJECT ('REPTEST');
    vrep := RUN_REPORT_OBJECT (vrepid,pl_id);
    But this doesnt work.
    Also, Should the parameters defined in the forms and reports have the same name?

    Thanks for the quick response Denis.
    I had referred to the document link before and tried using the RUN_REPORT_OBJECT_PROC procedure and ENCODE functions as given in the doc and added the following SET_REPORT_OBJECT_PROPERTY in the RUN_REPORT_OBJECT_PROC :
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
    But this also dint work. Please help me understand what difference does setting paramform=no OR paramform=yes make?
    In the report, i have defined the user parameters as FROM_DATE and TO_DATE respectively so that they match the form datablock BLK_INPUT items FROM_DATE and TO_DATE.
    My WHEN_BUTTON_PRESSED trigger is as below:
    DECLARE
    report_id report_object;
    vrep VARCHAR2 (100);
    v_show_document VARCHAR2 (2000) := '/reports/rwservlet?';
    v_connect VARCHAR2 (30) := '&userid=scott/tiger@oracle';
    v_report_server VARCHAR2 (30) := 'repserver90';
    BEGIN
    report_id:= find_report_object('REPTEST');
    -- Call the generic PL/SQL procedure to run the Reports
    RUN_REPORT_OBJECT_PROC( report_id,'repserver90','PDF',CACHE,'D:\Report\sales.rdf','paramform=no','/reports/rwservlet');
    END;
    ... and the SET_REPORT_OBJECT_PROPERTY code in the RUN_REPORT_OBJECT_PROC procedure is as:
    PROCEDURE RUN_REPORT_OBJECT_PROC(
    report_id REPORT_OBJECT,
    report_server_name VARCHAR2,
    report_format VARCHAR2,
    report_destype_name NUMBER,
    report_file_name VARCHAR2,
    report_otherparam VARCHAR2,
    reports_servlet VARCHAR2) IS
    report_message VARCHAR2(100) :='';
    rep_status VARCHAR2(100) :='';
    vjob_id VARCHAR2(4000) :='';
    hidden_action VARCHAR2(2000) :='';
    v_report_other VARCHAR2(4000) :='';
    i number (5);
    c char;
    c_old char;
    c_new char;
    BEGIN
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,report_file_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,report_server_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,report_destype_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,report_format);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
    hidden_action := hidden_action ||'&report='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME);
    hidden_action := hidden_action||'&destype='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE);
    hidden_action := hidden_action||'&desformat='||GET_REPORT_OBJECT_PROPERTY (report_id,REPORT_DESFORMAT);
    hidden_action := hidden_action ||'&userid='||get_application_property(username)||'/'||get_application_property(password)||'@'||get_application_property(connect_string);
    c_old :='@';
    FOR i IN 1..LENGTH(report_otherparam) LOOP
    c_new:= substr(report_otherparam,i,1);
    IF (c_new =' ') THEN
    c:='&';
    ELSE
    c:= c_new;
    END IF;
    -- eliminate multiple blanks
    IF (c_old =' ' and c_new = ' ') THEN
    null;
    ELSE
    v_report_other := v_report_other||c;
    END IF;
    c_old := c_new;
    END LOOP;
    hidden_action := hidden_action ||'&'|| v_report_other;
    hidden_action := reports_servlet||'?_hidden_server='||report_server_name|| encode(hidden_action);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'pfaction='||hidden_action||' '||report_otherparam);
    -- run Reports
    report_message := run_report_object(report_id);
    rep_status := report_object_status(report_message);
    IF rep_status='FINISHED' THEN
    vjob_id :=substr(report_message,length(report_server_name)+2,length(report_message));
    message('job id is'||vjob_id);pause;
    WEB.SHOW_DOCUMENT(reports_servlet||'/getjobid'||vjob_id||'?server='||report_server_name,' _blank');
    ELSE
    --handle errors
    null;
    END IF;
    In the code - " hidden_action := hidden_action ||'&'|| v_report_other; " in the RUN_REPORT_OBJECT_PROC procedure above, how do i make sure that the v_report_other variable reflects the user input parameters FROM_DATE and TO_DATE ??? v_report_other is initialised as v_report_other VARCHAR2(4000) :=''; in the procedure. Will ensuring that the v_report_other contains the user input parameters FROM_DATE and TO_DATE ensure that my report will run fine for the input parameters?
    Thanks in advance.
    Edited by: user10713842 on Apr 7, 2009 6:05 AM

  • How to validate the input parameters in Oracle BI Publisher reports

    Hi
    i am new to Oracle BI Publisher
    I am using OBI for generating simple reports.
    here i need validation for input parameters (Date Parameter) and also want to disable the Date filed so that user can select through the calendar component.
    Here validation in the sense, the system must validate the date and alert the user with an appropriate message
    Can anyone please provide me the solution in detail.
    Thanks in advance
    Edited by: user10185520 on Aug 26, 2008 6:15 AM

    I have the same task to validate input parameters with Oracle BI Publisher 5.6.3 running under Oracle eBS 10.5.10.2. My validation goes beyond of what I can do during parameter registration. I am using Data Templates.
    My first logical place was the before report trigger. So, I built a report trigger which returns 'false' in case the parameters are not proper. Guess what... XMLP just returns a hard-coded message
    !!Error : trigger '" + datatrigger.getName() + "' returns status as 'false'
    First of all, this is a bad style to hardcode messages visible by the user (especially during French implementation). Second of all, it is not informative at all. It would be nice to change oracle.apps.xdo.dataengine.XMLPGEN.executeTrigger() to read, for example, a message from the message stack when the trigger returns 'false' and let the user read it.
    Anyway, what I did was I built a special data group, decalred before any other data group, query like
    select my_package.my_validation fro dual
    If parameters fail the validation my PL/SQL package throws an application exception with a message. At least, in this case the error message gets available as the description of the concurrent request.
    I wish the before report trigger worked!!!

  • How to make input parameters as optional in the function definition

    I have created a function for a data service which is at the Normalized layer and has 3 input parameters.
    This function is called at the Integration layer in which we have to pass only one parameter. But for the remaning 2 parameters it is throwing an error as we cannot pass those parameters.
    Is it possible that we can pass less number of parameters in the higher layer.
    I had also made those parameters as optional in the function definition(by applying '?' while defining the arguments-e.g. $x as xs:string?), but error was thrown while generating the query plan.
    I have attached a Demo project, in which i have defined a function at the normalized layer and this function is been called at the integration layer.
    Thanks,
    Kinjal

    Thanks mreiche for the reply
    But the problem is that while writing
    function myfunction( arg1 as xs:string, $arg2 as xs:string?) { ... }
    in function definition in the normalized layer, the query plan is throwing following error:-
    com.bea.ld.QueryException: Cannot generate XQuery for the function {ld:DemoProject/Normalized/TestGeo}getGeo:3
    at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108) at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:248) at com.bea.ld.Server_ydm4ie_EOImpl_816_WLStub.executeFunction(Unknown Source)     at workshop.liquiddata.xds.views.queryplan.QueryPlanPanel.compileFunction(QueryPlanPanel.java:583) at workshop.liquiddata.xds.views.queryplan.QueryPlanPanel.access$900(QueryPlanPanel.java:39) at workshop.liquiddata.xds.views.queryplan.QueryPlanPanel$5.run(QueryPlanPanel.java:469) at java.lang.Thread.run(Thread.java:534)
    Caused by: com.bea.ld.QueryException: Cannot generate XQuery for the function {ld:DemoProject/Normalized/TestGeo}getGeo:3 at com.bea.ld.EJBRequestHandler.invokeFunction(EJBRequestHandler.java:720) at com.bea.ld.EJBRequestHandler.executeFunction(EJBRequestHandler.java:339) at com.bea.ld.ServerBean.executeFunction(ServerBean.java:95) at com.bea.ld.Server_ydm4ie_EOImpl.executeFunction(Server_ydm4ie_EOImpl.java:312)
    at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:491)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:120)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:434)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:429)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Caused by: com.bea.ld.server.FunctionCallQueryBuilder$QueryBuilderException: The following parameter type is not supported: {http://www.w3.org/2001/XMLSchema}string?
    at com.bea.ld.server.FunctionCallQueryBuilder.addParameter(FunctionCallQueryBuilder.java:257)
    at com.bea.ld.server.FunctionCallQueryBuilder.buildQuery(FunctionCallQueryBuilder.java:99)
    at com.bea.ld.EJBRequestHandler.invokeFunction(EJBRequestHandler.java:716)
    But no error is thrown when I call this function at the Integration layer,using
    for $f in mfunction( 'test', () )
    and the output which i get is as expected.

Maybe you are looking for

  • Database replication between Oracle RAC and Oracle Standalone DB in 9i

    Hi, We have currently 4 node RAC environment and Oracle RAC implementation with 4 Oracle instances. We want to move the one instance and make it Standalone with Oracle database due to availability issue. Thus we will remain with 3 nodes on the RAC da

  • Unknown symbol on status bar

    a symbol that looks like a phone has shown up on my status bar. I looks like a number pad & a handset. I have never seen it before what does it mean?

  • Scaling a bmp image

    I need to scale a bmp image in the x-y directions independently of each other.  The zoom function doesn't work for my application because it locks the aspect ratio at 1:1.  I would like to import a bmp and have it scale automaticly to the size of a p

  • [SOLVED] - Arch Fresh Install - Errors

    I have a few ERRORS from a Fresh Install that I need a bit of help with: 1.  I've created a user (larry) and added myself to audio,lp,optical,wheel,storage,video,power,scanner and inserted the password.      But when I try to login with user larry an

  • Sytem call utssys support in the future?

    Hi, Does anyone know just how future proof utssys system call is considering future Solaris versions? The reason I am asking is that it is not very well documented and the utssys.h header doesn't even contain the function prototype of the utssys func