Variables Vs. Parameters

Hello,
I'm attempting to call a method (with several parameters) from another class. I've instantiated a new instance of said class, but passing the parameters is something which is posing a bit of difficulty...as the parameter values are determined by command line arguments (its a console app) as well as data in a config file...this is basically what I'm looking at.
The original method within source class (named CSVToXML)
public void doMain(String args[], CSVToXML app, String name){
          // associated logic What i've done to call this method is this...
CSVToXML passer = new CSVToXML();
passer.doMain(String args[], CSVToXML app, String name);I know that's not quite correct, I get a message stating " ')' Expected"...but where those parameters aren't determined until console arguments are input, I'm not sure what to do...there. Any suggestions and/or insight?

You don't use the variable types when using them.
It would be just passer.doMain(args, app, name);
Also, if you don't know that, why aren't you reading the tutorials? You shouldn't be allowed to code yet.

Similar Messages

  • Variables or parameters in Sender JDBC Adapter.

    Hi,
    I have the following question:
    Is there any way to use variables or parameters when specifying the WHERE clause of a SQL SELECT statement or when using a Store Procedure in a Sender JDBC Adapter? If so, can anyone give an example.
    Thanks in advance.
    Sebastian Pereira.

    Hi Sebastian,
                   The links mentioned below will help you in this regard:
    Using a stored procedure for a  sender jdbc adapter
    Stored Procedure in sender JDBC
    JDBC Sender - Oracle Stored procedures
    Reward with points if helpful
    Regards
    Sai Ganesh

  • What are variables or parameters in Apex and how to use them?

    Hi
    What are variables or parameters in apex and how to use them to connect and run BI Publisher Report
    From Apex URL

    Hello Kanaiya,
    You should go here: http://www.oracle.com/technology/products/database/application_express/index.html
    Look at "What is Oracle APEX?" then download the documentation and review the various PDF files that are available.
    If you have a version of APEX installed and available, go through the 2-Day Application Express Developer's Guide followed by the Advanced Developer's Guide.
    Good luck,
    Don.

  • How can i find all global variable and parameters in a form?

    I don't know name of global variables and parameters,but i want get their name and value .
    how can i do? who can help me?
    Thank you.
    Daniel Liang
    2007.1.19

    no problem. As Francois said you can't do it programmatic in runtime.
    But when you use the debug-mode you can see each global with name and value.
    By the way: It's not good to not know all the globals in your application. This is one of the most important things you have to write down for your app. Create a wiki for such informations, so that all developer can share their information.

  • String variable - within parameters statement

    Hi,
    is it possible to define a string variable like:
       PARAMETERS: var_xxx type string,
    It doesnt works. Why?
    Thanks
    Markus

    HI,
         For patameters you can only use FIXED-LENGTH types' Since String is a data type of variable length you can not use it for declaring parameters. Both string and Xstring cannot be used as both are variable lengths. This only for releses before ERP 2005. From ERP 2005 onwards you can type using string but not using xstring.
    You can create your own type with 
    TYPES: param_type(200) type c.
    PARAMETERS: input type param_type.
    Regards,
    Sesh

  • Personalisation - 'Launch a Function' using variables as parameters

    I am trying to call a function from another form using Built In 'Lanch a function'.
    In Add parameters, If I provide hardcoded values, its working fine. When I try to pass variables such as :GLOBAL.XX_ITEM_ID or ${item.folder.item_id.value} ,
    it errors out
    When I use GLOBAL variable, the error is 'Type does not match definition in form XXX ' I tried using to_char , to_number but no use.
    When I use item.folder.item_id.value it errors out with 'FROM keyword not found'
    I tried putting them in single quotes, pipes etc.
    Can anybody tell me how to pass variabes while launching a function?
    Thanks a lot.

    I just solved it. Used the following syntax
    'G_QUERY_FIND=PO_LINE_LOCATION_ID
    PO_LINE_LOCATION_ID='||${global.xx_po_line_location_id.value}

  • Cursors,Variables,DB parameters

    Hello All,
    Not sure how to start with this problem.
    This is the first time i am facing it (So i need your help :D )
    Unfortunately i cannot reproduce the problem or rather i am so confused that my i dont want to.
    I beleive your knowledge and experience will be handy here
    Posting the actual code
    Connected to Oracle9i Enterprise Edition Release 9.0.1.1.1
    Connected as sales
    -- Created on 5/5/2010 by USER
    declare
      -- Local variables here
      v_run_date date := sysdate;
      v_company varchar2(3) :='SFL';
    cursor x is
          select text
            from (select b.text_code text
                    from tran_dtl a,
                         (select distinct text_code, code
                            from bs_inc_codes
                           where des_rpt = 'OH') b
                   where yr =
                         (select distinct code
                            from yr
                           where v_run_date between date_yr_start and date_yr_end)
                     and fin_account in
                         (select code
                            from fin_account
                           start with parent = b.code
                          connect by prior code = parent)
                     and company = v_company
                     and tran_date <= v_run_date)  /* This condition tran_date <=v_run_date is the killer  */
           group by text;
    begin
      -- Test statements here
      for y in x loop
      dbms_output.put_line(y.text);
      end loop;
    end;In the above code as soon as i change tran_date <=v_run_date to tran_date <=sysdate all is OK. that block executed in seconds.
    Not sure why it hangs when i put in the variable v_tran_date with the value sysdate.
    I have a feeling it might be to do something with the DB parameters.
    Well recently we moved from one server to another :(
    any hints/leads are greatly appreciated.
    Thanks as usual,
    Bhushan

    Hi,
    thank you so much Tubby for your reply.
    Sorry since i am not in office cannot give the explain plans.
    However what did was to import the tables (on a DB on my personal machine) and its works fine, ofcourse the DB is
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
    Connected as scottI believe we will have to patch the DB
    Will do a few more tests at work and let you know.
    Thanks,
    Bhushan

  • Variables/Input Parameters Value help not showing texts

    Hello,
    I have created a crystal report based on a calculation view in Crystal Reports for Enterprise 4.1 SP5, which has a input parameter on the field "Region". For the value help, I am using a custom view based on T005U in which I have made sure that RegionName field is present in the "Label Column" property of the Region field.(Required for viewing descriptions of LOVs).
    In the crystal report, while previewing data in the query builder, I am able to see the value help for the input parameter in the prompt screen, which displays only the key part, but does not display the description of it. Moreover, after accepting the prompt value, the preview runs into an error(as shown below). Please note that I get the error below only when Region is a part of the output fields of the query.
    Instead of input parameter, when I create a variable on the region field in the main calculation view, with the same value help view, I am able to do data preview in the query builder as also data appears in the report on running the query. But, just as in the case of input parameter value help in the prompt screen, even over here, I am only able to see the key part and not the description.
    Are variables/input parameter LOV's supposed to display descriptions or just the key part? As also, any reason why I should be getting this error while using Input parameter?
    Kindly let me know if I am missing something in the development of this report.
    Regards,
    Alston

    Hi,
              I hope you are taking the BEx Query as a source to the crystal report. In the BEx query check region info object  should is maintained as  Text and Key. If text is not maintained over there you will not be getting text in Crystal reports.
    Krishna.

  • Variable Transport Parameters in Mail Sender

    Did anyone ever successfully use the "Variable Header XHeaderName1" in the mail sender adapter (IMAP4)?
    We have two mail sender channels which require a slightly different mapping. My idea was to define a value for the field "Variable Header XHeaderName1" and evaluate that in the mapping. But the value is not passed into the SOAP header, I can configure what I want. I turned on "Adapter spec.attributes" and "Variable Transport...".
    So I cannot access the field value in the mapping.
    Now I evaluate the dynamic configuration field "SUser", that works, but that's only a workaround.
    So either this is a bug in the system (XI 3.0 SP 21) or the documentation is wrong.
    We are using an attachment, is that the problem ? "Use Mail package" off/on does not change anything.
    Any ideas ? No general links to the documentation please.
    CSY
    Edited by: Christian Sy on Aug 15, 2008 8:48 AM

    I think the DynamicConfigurationBean would help in this scenario.
    You can assign a constant value in sender channel and use that constant for the determination of the mapping.
    Regards
    Stefan

  • Job creation with variable variant parameters

    Hi,
    Is it possible from a FM to start a job using a program where one sends the selection screen parameters with?
    As the called FM calls the program with different parameteres each time.
    If it is possible can someone please assist by giving an exsample?
    Thanks in advance.
    Best regards

    Hi,
    Check this eg.
    This program will submit an another program in background mode as a job.
    REPORT  ZACE1031_ROUTING_CONV_TRG NO STANDARD PAGE HEADING
                                    LINE-COUNT 255(1)
                                    LINE-SIZE 255.
    TYPES: BEGIN OF x_mat,
           werks TYPE mast-werks,
           matnr TYPE mast-matnr,
           stlal TYPE mast-stlal,
           stlnr TYPE mast-stlnr,
           stlan TYPE mast-stlan,
           END OF x_mat.
    DATA:  v_params    TYPE pri_params,
           v_jobname   TYPE tbtcjob-jobname,
           v_jobcount  TYPE tbtcjob-jobcount VALUE 1,
           v_stringlen TYPE i VALUE 0,
           v_msg_string(50) TYPE c,
           v_prog(30)  TYPE c,
           c_cross(1)  TYPE c VALUE 'X',
           c_01(2)     TYPE c VALUE '01',
           c_trg(1)    TYPE c VALUE 'X'.                "CCT51576
    DATA : it_mat TYPE TABLE OF x_mat,
           wa_mat type x_mat.
    DATA : v_werks TYPE mast-werks,
           v_pre_werks TYPE mast-werks.
    RANGES: r_matnr FOR mara-matnr.
    TABLES : mkal,mast.
    SELECTION-SCREEN BEGIN OF BLOCK matnr
                              WITH FRAME TITLE text-001.
    SELECT-OPTIONS : so_matnr FOR mast-matnr.
    SELECTION-SCREEN END OF BLOCK matnr.
    SELECTION-SCREEN BEGIN OF BLOCK plant
                              WITH FRAME TITLE text-002.
    SELECT-OPTIONS : so_werks FOR mast-werks OBLIGATORY .
    SELECTION-SCREEN SKIP.
    PARAMETERS     : p_date TYPE datuv OBLIGATORY.                        "CCT51576
    SELECTION-SCREEN END OF BLOCK plant.
    INITIALIZATION.                                                        "CCT51576
    CONCATENATE sy-datum+0(4) c_01 c_01 INTO p_date.
    AT SELECTION-SCREEN.
    START-OF-SELECTION.
      SELECT bwerks bmatnr  bstlnr bstlal b~stlan
      INTO CORRESPONDING FIELDS OF TABLE it_mat
      FROM mara AS a
      INNER JOIN mast AS b
      ON bmatnr = amatnr
      WHERE a~matnr IN so_matnr
      AND b~werks IN so_werks
      AND  ( a~mtart = 'FD')
    AND b~stlan = 1.        "CCT53428
      AND b~stlan IN (1,2).    "CCT53428
      IF sy-subrc = 0.
       SORT it_mat by werks matnr.                                  "CCT53428
       DELETE ADJACENT DUPLICATES FROM it_mat COMPARING werks matnr."CCT53428
      SORT it_mat BY matnr werks stlan stlal  ASCENDING.                  "CCT53428
      DELETE ADJACENT DUPLICATES FROM it_mat COMPARING matnr werks stlan. "CCT53428
      SORT it_mat BY matnr werks stlan DESCENDING.                        "CCT53428
      DELETE ADJACENT DUPLICATES FROM it_mat COMPARING matnr werks.       "CCT53428
        SORT it_mat BY werks.
        LOOP AT it_mat into wa_mat.
          CLEAR : r_matnr.
          r_matnr-sign = 'I'.
          r_matnr-option = 'EQ'.
          r_matnr-low = wa_mat-matnr.
          APPEND r_matnr.
          AT END OF werks.
            CLEAR v_werks.
            v_werks = wa_mat-werks.
            CLEAR v_jobname.
            CONCATENATE 'WWACSD12' '_' v_werks INTO v_jobname.
            PERFORM f_open_job USING v_jobname.
            PERFORM f_submit_job.
            PERFORM f_job_close.
            REFRESH r_matnr.
          ENDAT.
        ENDLOOP.
      ELSE.
        WRITE / text-017.
      ENDIF.
    *&      Form  f_open_job
    Form to open the job with the particular job name
    FORM f_open_job USING v_jobname TYPE any.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname  = v_jobname
        IMPORTING
          jobcount = v_jobcount
        EXCEPTIONS
          OTHERS   = 8.
      IF sy-subrc NE 0.
        WRITE: /3 v_werks,
                11 text-008, v_jobname.
      ENDIF.
    ENDFORM.                                                    " f_open_job
    *&      Form  f_submit_job
    Form to submit the program (ZACC0014_COST_COLLECTORS_BDC) as job
    FORM f_submit_job.
      v_prog = text-016.
      SUBMIT (v_prog) WITH so_matnr IN r_matnr
                      WITH p_werks EQ v_werks
                      WITH p_date   EQ p_date                 "CCT51576
                      WITH ck_trg   EQ c_trg
                      TO SAP-SPOOL
                      SPOOL PARAMETERS v_params
                      WITHOUT SPOOL DYNPRO
                      USER sy-uname VIA JOB v_jobname NUMBER v_jobcount
                      AND RETURN.
      IF sy-subrc > 4.
        WRITE: /3 v_werks,
                11 text-009, v_jobname.
      ENDIF.
    ENDFORM.                    " f_submit_job
    *&      Form  f_job_close
    Form to close the job
    FORM f_job_close.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = v_jobcount
          jobname              = v_jobname
          strtimmed            = 'X'  "start immediately
        EXCEPTIONS
          cant_start_immediate = 1.
    Process various error conditions
      CASE sy-subrc.
        WHEN 0.
          MOVE v_jobname TO v_msg_string.
          CONDENSE v_msg_string.
          v_stringlen = STRLEN( v_msg_string ).
          WRITE ' created.' TO v_msg_string+v_stringlen.
          WRITE :/3 v_werks,
                  11 v_msg_string.
        WHEN OTHERS.
          MOVE v_jobname TO v_msg_string.
          CONDENSE v_msg_string.
          v_stringlen = STRLEN( v_msg_string ).
          WRITE 'create failed.' TO v_msg_string+v_stringlen.
          WRITE :/3 v_werks,
                  11 v_msg_string.
      ENDCASE.
    ENDFORM.                                   "f_job_close

  • To use PARAMETERS or GLOBAL Variables

    I want to share data values amongst Forms (I am using Forms 9i), which is a better trade-off using GLOBAL variables or PARAMETERS.
    Which option is a better one ?
    Please Suggest...
    Regards,
    Gaurav Srivastava

    Also if your application uses go_form and allows the user to have two copies of the same form running at once, if you decide to use globals, make sure the form receiving the global erases it immediately on startup. Otherwise the user might go-form to the other copy of the form, which then be seeing the globals.

  • Need help on global variables / parameters

    Hi friends,
    Please let me know if there a way to see the list of global variables and parameters in a form.
    Thanks
    Joe.

    I presume you mean at runtime, since at design time parameters are in the Navigator, and globals can only be created at runtime. But unfortunately at runtime there is no way to get a list of them, like you can with blocks and items. (There's no easy way to get other objects either, like LOVs, canvasses, etc., though most of them can be derived from properties of items). But let's say you thought you knew the name of a parameter or global and wanted to confirm it really exists. With parameters there is no solution; you can't use find_item(). With globals a common technique is the following:
    t_name := 'global.var';
    default_value('SoMe ImPoSsBlE VaLuE', t_name);
    if name_in(t_name) = 'SoMe ImPoSsBlE VaLuE' then
    -- the global did not exist!
    erase(t_name);
    else
    -- the global did exist!
    null;
    end if;
    And of course remember that globals are not owned by a form; they are visible to all forms that are running.

  • Parameters with jsp variables

    Hi all,
              I want to know if it is possible to pass JSP script variables as parameters
              between functions and files
              for example in this tag
              <cm:selectbyid contenthome="com.beasys.commerce.axiom.document.Document"
              contentid="<%= contentId %>"
              id="newsItem" />
              I would like to pass the "newsItem" content variable to another file (as a
              return from a function) to be used later for operations such as
              <cm:printdoc id="newsItem" />
              Is this possible and if not, is there a work around it that enables me to
              place my logic of content selection in a different location than the display
              of the content
              Thanks in advance
              May AbdelRazik
              

    I am so frustrated.
    I have tried to write the syntax many many times, what's wrong of using jsp:include?
    What JSP version supports jsp:include?
    Thanks!
    "Unterminated error if
    i write <jsp:include page="date.jsp">; no error if using
    <jsp:include page="date.jsp">, but no effect.
    //demo.jsp
    <HTML>
    <BR><BR><BR><BR><BR><BR>
    <jsp:include page="date.jsp">
    <jsp:param="name" value="testingvalue" />
    </jsp:include >
    </HTML>
    //date.jsp
    <HTML>
    <%@ page import="java.util.*"%>
    <%@ page import="javax.servlet.http.*"%>
    <%
    String name = request.getParameter("name");
    %>
    <%= new java.util.Date()%> Parameter <%=name %>
    <BR>
    </HTML>

  • How to get the variable value in a flatfile

    I have some 2 line string in a variable I wanted to see this value in a flat file.
    Thanks,
    Narthan

    Hi Narthan,
    If I understand correctly, you want to use some variables in a Flat File Connection Manager. If in this case, we can use variables in a Property of Flat File Connection Manager. For more details, please refer to the following steps:
    Click the Flat File Connection Manager in Connection Manager tab, then navigate to Properties window.
    Click “…” next to the Expressions property to open the Property Expressions Editor.
    In the Property Expressions Editor dialog box, select the corresponding property at the Property drop-down list.
    Click “…” next to the Expressions property to open the Expression Builder, then expand Variables and Parameters folder to select the variable.
    Reference:
    http://www.mssqltips.com/sqlservertip/1084/dynamic-flat-file-connections-in-sql-server-integration-services/
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Filter (variable) applied at analytical view is not reflected in Caculation view.

    Hello All,
    I am new to hana and would like to discuss one issue here.
    Model is something like this:
    Calculation  view  ---- >   has one Analytical View  --->  has one attribute view and a fact table.
    Now, in analytical view I have applied a filter using a variable on dimension attribute ( column of attribute view). When I do data preview on  analytical view I get a prompt (asking single value to put in - mandatory). However when I do a data preview for calculation view (which involves analytical view created earlier) ...I don't get a prompt this time.
    Calculation view is a 2 level only [ semantic --> projection/aggregation(analytical view) ].
    Please assist with it.
    Thanks
    Sumit

    Thanks for your reply Ravi.
    It seems like this approach is applicable for "Input Parameters" only and not for "Variable" ?
    I created a variable & an Input parameter in Analytical view, and created same variable & input parameter in calculation view...and then clicked on "Input parameter managed mapping" button under section "Variables/Input parameters" of semantics. I could see only Input parameters listed on both sides not the variables.
    1. I am curious now to understand ...when it is recommended that the data needs to be filtered out at the lowest level...however we still need to define parameters at calculation level ?
    2. The prompt based filters applied at analytical view is getting reflected in calculation view when it(calculation view) is refreshed for data preview ?
    3. Is it possible to expose analytical or attribute view directly into the business objects universe ?
    Yours, and other member's reply on it will be appreciated.
    Thanks
    Sumit

Maybe you are looking for

  • Getting Error while deploying StoreFrontModule application

    I am getting this error:-- [12:28:43 PM] ---- Deployment started. ---- [12:28:43 PM] Target platform is (Weblogic 10.3). [12:28:43 PM] Retrieving existing application information [12:28:45 PM] Running dependency analysis... [12:28:45 PM] Building...

  • Imovie 9.0.9 wont open

    I just purchased imovie 11.  It wont launch.  I just got my mac back from best buy with a new harddrive in it.  But I cannot launch imovie.

  • Hi8 Movie Import

    Hello All, I have been using my Sony DCR-TRV510 connected via FireWire to import my home movies recorded in Digital 8 format without issue. Now I want to import my old Hi8 tapes, which play fine on the camera, but do not play out via firewire. Are th

  • Solaris10 containers, create pool configuration /etc/pooladm.conf

    I am freshly installed solaris10 u6, and trying to enable pool. However i am getting bellow error messages. Please anyone tell me, how to solve the bellow issue ? # pooladm -e pooladm: cannot enable pools: No such file or directory # pooladm -s poola

  • Mpeg2 rendering issues

    Hi, I have a customer who is using two nearly identical workstations for Adobe Premiere CS5. Both are running Win7 64bit with 12GB of ram, i7 quadcore cpu and a mix of SSD and HDD drives. Both are also using the Nvidia GTX graphic cards & CS5 acceler