How to declare variable in an application

I want to declare a pl sql variable in an application(form, report...)without editing the package code.
Thanks
null

Thanks for information.
Actually still I have a doubt which one is the best. And which way is the easiest way. Can you give a more explanation for me.
I start to read about Log4J, and here is one of link I refer.
[http://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/tutorials/log4j/log4j.html]
My question on that is, on a text file I can do it, on Windows. But in Linux, Mac and so on. Please instruct me. I've never done such things before.

Similar Messages

  • How to declare variables in standard text  - so10 t.code

    Hello Friends,
             How to declare variables in standard text  - so10 t.code? Your response will be appreciated much.
    Thanks
    Sri

    For Script & Smartform  Text - &VAR&

  • How to declare variable in the scipt

    data is coming from standard program .
    rf140-stida key entry date.
    bsik-bldat posting date
    i want to display difference between  rf140-stida and bsik-bldat in scipt form it will give number of days.
    how can i declare variables for this.
    how to write code in my form.

    Hi
    U need to create a routine to calculate the difference:
    /: DEFINE &DELTA& = SPACE
    /: PERFORM <FORM NAME> IN PROGRAM <PROGRAN NAME>
    /: USING &RF140-STIDA&
    /: USING &BSIK-BLDAT&
    /: CHANGING &DELTA&
    &DELTA&
    The routine has to be defined in your Z-PROGRAM and to have these interface:
    FORM <FORM NAME>  TABLES IN_TAB_EM     STRUCTURE ITCSY
                                                       OUT_TAB_EM STRUCTURE ITCSY.
      DATA: DELTA TYPE I.
      DATA: DATE1 LIKE SY-DATUM,
                 DATE2 LIKE SY-DATUM.
    * ---> Rembember the date has the ouput format, so it has to be converted in the
    * input format
      READ TABLE  IN_TAB_EM WITH KEY NAME = 'RF140-STIDA'.
      IF SY-SUBRC = 0.
         DATE1(4)     = IN_TAB_EM-VALUE+6(4).
         DATE1+4(2) = IN_TAB_EM-VALUE+3(2).
         DATE1+6(2) = IN_TAB_EM-VALUE(2). 
      ENDIF.
      READ TABLE  IN_TAB_EM WITH KEY NAME = 'BSIK-BLDAT'.
      IF SY-SUBRC = 0.
         DATE2(4)     = IN_TAB_EM-VALUE+6(4).
         DATE2+4(2) = IN_TAB_EM-VALUE+3(2).
         DATE2+6(2) = IN_TAB_EM-VALUE(2). 
      ENDIF.
      DELTA = DATE1 - DATE2.
      READ TABLE  OUT_TAB_EM WITH KEY NAME = 'DELTA'.
      IF SY-SUBRC = 0.
         WRITE DELTA TO OUT_TAB_EM-VALUE.
         MODIFY OUT_TAB_EM INDEX SY-TABIX.
      ENDIF.
    ENDFORM.
    Max

  • How to declare webservice in the application's xml file

    Hi
    Is there a way by which we can declare webservice in the application's xml file.if yes how..?
    please help

    I'm no expert, but I find that if you generate Java from a WSDL, the resulting code is fairly ugly and difficult to control. (Similarly, if you generate a WSDL from a Java class, the WSDL is pretty ugly).
    One way to encode "contants" in a WSDL is in a referenced schema, using an enumeration restriction, viz:
          <simpleType name="SuccessCode">
            <restriction base="string">
              <enumeration value="FAILURE"/>
              <enumeration value="SUCCESS"/>
            </restriction>
          </simpleType>Now, that would result in an enumeration-style class in your generated source. That's the best I can think of, others may be able to suggest something better. If you wrap the web service in an adapter that hides its ugliness, maybe you can map the constants across there.
    Like I say, I'm far from an expert, these are just my first thoughts.
    -Tim

  • How to Pass Variables from One Application to Another Pop Up Window

    Hi,
    I am wondering if anyone on the list has tried calling up a
    pop up manager, and have two other variables imported for secondary
    usage. I have tried using [Bindable], but this does not seem to be
    working, and I am still getting errors that tells me that the
    variables are "not defined" when it gets passed to another
    HTTPService. I tried embedding the Pop Up Manager in the same
    application as the one that is supposed to "pass the variables,"
    but it no longer acts as a pop up window.
    Could anyone please tell me where I can find the answers for
    this?
    Thanks in advance.
    Here is the code of what I have for my pop up manager:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical"
    title="New Scenario"
    showCloseButton="true"
    width="325"
    height="145" horizontalScrollPolicy="off"
    close="titleWindow_close(event);">
    <mx:Script>
    <![CDATA[
    import mx.events.CloseEvent;
    import mx.managers.PopUpManager;
    import mx.controls.Alert;
    [Bindable]public var message:String;
    [Bindable]public var message2:String;
    private function titleWindow_close(evt:CloseEvent):void {
    PopUpManager.removePopUp(this);
    private function submit_click():void {
    Alert.show(scenario_name.text, "Alert");
    new_scenario.send();
    PopUpManager.removePopUp(this);
    var win:Hello = PopUpManager.createPopUp(this,Hello, true)
    as Hello;
    PopUpManager.centerPopUp(win);
    private function reset_click():void {
    scenario_name.text = "";
    ]]>
    </mx:Script>
    <mx:HTTPService id="new_scenario" method="POST" url="
    http://localhost/simulator/scenario.php"
    useProxy="false">
    <mx:request xmlns="">
    <scenario_name>{scenario_name.text}</scenario_name>
    <message>{message}</message>
    <message2>{message2}</message2>
    </mx:request>
    </mx:HTTPService>
    <mx:Form>
    <mx:FormItem label="Scenario Name:">
    <mx:TextInput id="scenario_name"
    text=""
    maxChars="45" />
    </mx:FormItem>
    </mx:Form>
    <mx:ControlBar horizontalAlign="right">
    <mx:Button id="submit"
    label="Submit"
    click="submit_click();" />
    <mx:Button id="reset"
    label="Reset"
    click="reset_click();" />
    </mx:ControlBar>
    </mx:TitleWindow>

    Hi,
    I am trying to display some data on the Child window that
    would need to take the data from the parent titleWindow, which
    could be drop down menus, text labels or combo boxes. I would need
    to use a HTTPService on the child dialog box to accomplish task I
    think, but the problem is, how would I get the information from its
    parent window? The example I have are all about how the text input
    from the child window gets feed back to the parent.
    Would I need to create a "reverse" declaration or something
    so I can access the information from the parent in the child
    window?
    I hope this makes sense.
    Thanks for your help.
    Alice

  • How to declare variable in solution file for use in project files.

    Hi Folks,
    Apologies if this is not the right place to ask, but I would like to declare a variable in my solution file that can used by all of the projects (prof files) in that solution.
    More specifically in the project files, references are stored using relative paths which cause issues if they don't exist. I would like to replace the relative paths with a variable set in the solution file that can easily be changed when the solution is
    built in a different location.
    So I would like to replace "../../../SomeProject"  with "$(SomeLocation)/SomeProject"  but set the $(SomeLocation) in the solution file.
    Regards
    Andy

    Hello Andy,
    Here is a common sln file:
    Microsoft Visual Studio Solution File, Format Version 12.00
    # Visual Studio 2013
    VisualStudioVersion = 12.0.30723.0
    MinimumVisualStudioVersion = 10.0.40219.1
    Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wpf_EntityFramework", "wpf_EntityFramework\wpf_EntityFramework.csproj", "{A282940A-5F76-4FF8-9568-8B7D14133259}"
    EndProject
    Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
    Debug|Any CPU = Debug|Any CPU
    Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
    {A282940A-5F76-4FF8-9568-8B7D14133259}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    {A282940A-5F76-4FF8-9568-8B7D14133259}.Debug|Any CPU.Build.0 = Debug|Any CPU
    {A282940A-5F76-4FF8-9568-8B7D14133259}.Release|Any CPU.ActiveCfg = Release|Any CPU
    {A282940A-5F76-4FF8-9568-8B7D14133259}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
    HideSolutionNode = FALSE
    EndGlobalSection
    EndGlobal
    And the Global Interface in the solution file is actually used for Visual Stuido add-ins. To know details, please read the following MSDN article:
    1. Persisting Information in Projects and Solutions
    Here you can find "If the Globals object is associated with the
    Solution2 object, then the value persists in the .sln file. These values are persisted when the solution file is saved."
    2.
    Solution2 Interface
    It's about the solution interface.
    As you can see although they may save something to your solution file, it is not intended for you to use it in your project.
    What's your projec type and can you alter to use some common ways?
    For example:
    1. If it is in project level, set your value public so that all classes can access the value.
    2. Or you can choose to create a xml/text file or any file that you can read by code, and then read the value out from that file.
    It will be much better than thinking about set value in the solution file.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to declare variable Forms Personalization

    Hi
    I want to use a variable in a form to assign it to a procedure which I am calling in the form itself?
    How can i define such a variable
    I wanted to use global variable but i read somewhere global variable can only be used when passing parameters between several forms
    so is there any other way?

    Hi,
    Is your procedure a database procedure or attached as a library to the Form? If its in the database, you cannot use a global variable - however, if its attached to the form itself, yes, you can define a global variable and refer it in the procedure. (Its preferable to initialize such a variable in the WHEN-NEW-FORM-INSTANCE trigger to avoid any issues arising out of transactional problems).
    Rgds,
    Rakesh.

  • How to declare variable for Table type in the ABAP Editor

    Hi!
    I have Table Type 'FIELDNAME_TAB' (Table of fieldnames). I want to pass the list of fieldnames to this Table Type in the ABAP Editor.
    Can anyone help me in this?

    You would declare the internal table like so.
    data: itab type FIELDNAME_TAB.
    data: wa like line of itab.
    wa = 'This_value'.
    append wa to itab.
    Regards.
    Rich Heilman
    Message was edited by:
            Rich Heilman

  • How to declare variable in table valued function

    hello.
    i have the following code to define a inline table valued function
    but the use of cmn.ReshteId('Lf_WL') as a function in where clause is not good performance.
    Alter function lf.fn_WholeLifeBn_GetForm(@ViewKind tinyint, @CurrentLocation int) returns table
    as
    return
    select B.*
    from lf.fn_LifeBN_GetForm(@ViewKind, @CurrentLocation) B
    where Reshte = cmn.ReshteId('Lf_WL')
    for better performance following code is good:
    declare @Reshte smallint
    set @Reshte = cmn.ReshteId('Lf_TS')
    select B.*
    from lf.fn_LifeBN_GetForm(@ViewKind, @CurrentLocation) B
    where Reshte = @Reshte
    but can not use it as the first code block in inline function.
    please help for define a good function.

    What do you think about Multi-Statement Table-Valued UDFs?
    create function Func(@Var int)
    returns @T table(ColName int)
    as
    begin
      insert into @T(ColName) values (@Var)
      return
    end
    select * from Func(10)
    select * from Func(20)
    ---or
    alter function Func()
    returns @T table(ColName int)
    as
    begin
      declare @Var int
      set @Var = 10
      insert into @T(ColName) values (@Var)
      return
    end
    select * from Func()
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to declare variables in the script

    My total data is coming from standard print  program.
    i copied standard form into zform.
    i am dispaying regup-skfbt and regud-wrshb in my layout set.
    now i want to deduct regup-skfbt and regud-wrshb and display in layout set only.
    for the above issue how to solve.

    Hiiii
    write the subroutine in the layout
    ex: perform (performname) in program(program name)
         using (regup-skfbt )
         changing(regup-skfbt )
    goto se38 in the attributes types select the subroutine pool
    in tht write as follows:
    form <perform name> using in_par
                                    changing out_par
    read table in_par index 1.
    write ur code depends on ur business process
    modify out_par index sy-tabix.
    endform
    reward points if useful
    regards
    Jaipal

  • Declaring Variable in Web dynpro ABAP

    Hi all
    I want to know how to declare variables globally and how to use internal tables from one method to another method without declaring each and every time in methods?
    Please suggest me to do this
    Appreciated your solution
    Regards
    Indiranjithn

    Hi
    This code in onselct method. For example
    DATA lt_node_am_detl1 TYPE wd_this->Elements_node_am_detl1.
    logic to move the data to internal table.
    lo_nd_node_am_detl1->bind_table(  lt_node_am_detl1 ).
    Now the filterd data in internal table and
    I declared this internal table in componentcontroller attributes tab like
    lt_node_am_detl1  and Elements_node_am_detl1 (Associate column ) and i tick the pulic check box.
    i am using another method onclick() .
    As you said the internal table declaration is not required if declared already in componentcontroller attributes tab .
    data wa_itab like line of lt_node_am_detl1 .
    Loop at lt_node_am_detl1 to wa_itab.
    endloop.
    while debugging i am not getting data in internal table .. Should I declared correctly in componentcontroller attributes tab .
    Tlhanks
    Indiranjithn

  • How to declare internal table in BADI with variable name beginning with 0..

    Gurus,
    How to declare an internal table within a BADI. I have to implement a BADI UC_TASK_CUSTOM for BCS to BW load and there i have to  declare an internal table like:
    TYPES:          BEGIN OF t_cube_data,
                    0cs_version       TYPE /bi0/oics_version,
                    0sem_cgcomp       TYPE /bi0/oisem_cgcomp,
                    bcs_vers          TYPE /bic/oibcs_vers,
                    bcs_lcus          TYPE /bic/oibcs_lcus,
                    bcs_ldch          TYPE /bic/oibcs_ldch,
                    bcs_invcom       TYPE /bi0/oibcs_invcom,
                    bcs_litem         TYPE /bic/oibcs_litem,
                    bcs_llob          TYPE /bic/oibcs_llob,
                    bcs_lmay          TYPE /bic/oibcs_lmay,
                    0move_type        TYPE /bi0/oimove_type,
                    pcompany         TYPE /bi0/oipcompany,
                    bcs_lprg          TYPE /bic/oibcs_lprg,
                    figlxref3         TYPE /bic/oifiglxref3,
                    fiscyear         TYPE /bi0/oifiscyear,
                    fiscper3         TYPE /bi0/oifiscper3,
                    fiscvarnt        TYPE /bi0/oifiscvarnt,
                    curkey_gc        TYPE /bi0/oicurkey_gc,
                    unit             TYPE /bi0/oiunit,
                    cs_trn_gc        TYPE /bi0/oics_trn_gc,
                    cs_trn_qty       TYPE /bi0/oics_trn_qty,
              END OF t_cube_data
    But with this declaration it gives a error saying that u cannot have a variable beginning with 0...like 0cs_version....
    but i have to do it for my functionality to wrk...
    Please help me do it....
    how can i declare a internal table that allows me to have variable names that start with 0....
    Please help....Its URGENT....
    Thanks
    Sam

    Murali,
    I need to have 0 before the variable name in the declaration of the internal table....how can i attain that....
    Please suggest...
    Thanks
    Sam

  • How to declare a variable in form

    how to declare a variable in form?

    Hi,
       do you want to create variable in script or smartform?
    In scripts to define a variable use the following declaration statement.
    DEFINE &<VARIABLE_NAME>&
    place this statement as command. we can assign initial value for this by adding VALUE ' ' to above statement.
    If your requirement is for smartforms go to global declaration, create a variable there that will be applicable only for smartform.
    Hope this will help you,
    Regards,
    Aswini.

  • How to declare class variable with generic parameters?

    I've got a class that declares a type parameter T. I know how to declare a static method, but this doesn't work for a static variable:
    public class Test< T >
        * Map of String to instances of T.
        * error: '(' expected (pointing to =)
        * <identifier> expected (pointing to () )
       private final static < T > Map< String, T > MAP = new HashMap< String, T >();
        * Get instance of type T associated with the given key.
       public final static < T > T getType( String key )
          return MAP.get( key );
    }Edited by: 845859 on Mar 20, 2011 11:46 AM

    jveritas wrote:
    I'm trying to create a generic polymorphic Factory class that contains boilerplate code.
    I don't want to have to rewrite the registration code every time I have a different return type and parameter.I haven't seen a case yet where that is reasonable.
    If you have hundreds of factories then something is wrong with your code, design and architecture.
    If you have a factory which requires large number of a varying input types (producing different types) then something is probably wrong with your code and design.
    A reasonable factory usage is one where you have say 20 classes to be created and you need to add a new class every 3 months. Along with additional functionality represented by the class itself and perhaps variances in usage. Thus adding about 3 lines of code to one class is trivial. Conversely if you have hundreds of classes to be created by the factory and you are adding them daily then it is likely that
    1. Something is wrong with the architecture which requires a new class every day.
    2. You should be using a dynamic mechanism for creation rather than static because you can't roll out a static update that often.
    More than that the idiom that leads to factory creation is different for each factory. A factory that creates a database connection is substantially different than the one used in dynamic rules logic processing. A generic version will not be suitable for both.
    Actualy the only case I know of where such a factory might be seem to be a 'good' idea is where someone has gotten it into their head that every class should be represented by an interface and every class created by a factory (its own factory.) And of course that is flawed.

  • How to declare a bind variable with 'date' data type in command prompt?

    how to declare a bind variable with 'date' data type in command prompt?
    sql>variable q date;
    when i execute it show list of datatypes

    Hi,
    As Lokanath said, there are no DATE bind variables.
    You can use a VARCHAR2 bind variable, and convert it to a DATE in your SQL statment.
    If you're using SQL*Plus, consider a substitution variable. It won't be as efficient as a bind variable, but it will be as convenient.
    For example:
    DEFINE  first_entrry_date = "DATE '2010-06-20''
    SELECT   ...
    WHERE   entry_date >= &first_entry_date
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Key Field Value in FCC

    Hi Experts, I have a scenario in PI, where I have 1 Header, n Data Records and 1 Trailer in the source file. This data is coming in CSV format. I am using FCC to convert CSV into XML. In the FCC, I have used keyFieldValue parameter. For the Header Re

  • Firefox 4 can't print or print preview a .pdf file

    When viewing a .pdf file, File, Print does nothing at all; and File, Print Preview shows a blank page. Example: http://www.seniors.alberta.ca/opg/personaldirectives/OPG5521.pdf. Note that Internet Explorer can print the same pdf just fine. - Using Fi

  • NT Kernel error 1256 and vturr.exe

    Hi everybody! I'm having troubles with my computer, 'cause when the system starts, shows the following messages: NT kernel error 1256 KMODE exception not handled. Then I get another windows and it says windows can not acess the path or file window/sy

  • Cancelled Excise Invoice in J2IUN.......Urgent

    Dear Gurus, We have to post MODVAT for the month of July 2007. But system showing Cancelled invoice in Excise payable duty invoice list. Invoice date and cancelled invoice date was same. Pls guide me. Regards, Venkat

  • I am facing problem in my Iphone

    Hi, I am facing problem in my Iphone5. When ever I am trying to install free application it will ask me for payment. I don't know why this is happening, if the application is free then why it ll ask me for payment. Please resolve this problem as soon