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.

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&

  • Assign a value to a global variable - form personalization

    Hi All,
    We have a requirement in which we want to display a message depending upon the out parameter of the procedure in form personalization.
    We are using 'Builtin' with the buitin type 'Execute a Procedure'.
    And the argument passed is :
    *='declare
    l_request_id Number;
    l_out_come VARCHAR2(10);
    begin
    apps.xx_sr_email_pkg1.xx_sr_email_p1
    ('''||${GLOBAL.XX_CUST_ACCOUNT_ID.VALUE}||''',
    '''||${GLOBAL.XX_INCIDENT_ID.VALUE}||''',
    '''||${GLOBAL.XX_EMAIL_TYPE.VALUE}||''',l_request_id);
    :GLOBAL.XX_REQUEST_ID := l_request_id;
    end'*
    But its not assigning the value of l_request_id to the gloabal variable XX_REQUEST_ID.
    Can you please help?
    Thanks

    I don't have a solution but a work around.
    What if you create a function that accepts the same in parameters and returns the message.
    And then you create an action of the type message and in the message you call the function such as
    = select xx_sr_email_pkg1.sr_email_f1 .... from dual
    Sandeep Gandhi

  • 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 do this Form Personalization in oracle purchasing

    Hi All,
    Am using oracle E-Buz -R12.1.3.
    I trying to do one small form personalization
    Resp --> Purchasing--> Requisitions--> Requisitions.
    Now i ill query for one REQ number for example 1130011. Next ill enter a new line in the line level.
    Requirement:
    Once the line level data entry is completed, User will try to save the line.
    So at this time. I need to fire one message that.
    When the Destination Type is "Expense" and the user didn't enter the project details in the Distribution tab. Then i need to fire a popup message.
    So i tried like this
    Created a new FORM Personalization
    Trigger event :WHEN-VALIDATE-RECORD
    Trigger Object : LINES
    Condition :
    :SYSTEM.RECORD_STATUS IN ('INSERT' ,'CHANGED') AND :LINES.DESTINATION_TYPE_DISP = 'Expense' AND :DISTRIBUTIONS.REQ_LINE_QUANTITY IS NOT NULL AND :DISTRIBUTIONS.PROJECT IS NULL
    And in Action i have created a message type and mentioned to show.
    So Now the problem is when the user click the save button without entering the project detail the message is firing and i clicking three to four times ok and the record is getting saved.
    So my requirement is when the pop messages comes when i click ok i need to go back to the Project block.
    Can any one help in the requirement to get solved.
    Thanks & Regards
    Srikkanth.M

    Hi;
    1. I suggest check:
    Setting Up - Using - Demonstrationg - Personalizations In Oracle Purchasing [ID 1391679.1]
    2. You may get more quick response at Forum Home » Application Development in PL/SQL » Forms
    Regard
    Helios

  • 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.

  • 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 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

  • How to pass variable form javacript to java BackingBean

    Hello,
    I am trying to pass variable from Javascript method (which is written in jspx) page to a Java BakingBean.
    here is the Javascript code:
    <SCRIPT type="text/javascript">
    function OnSave() {
    alert("The signature you have taken is the following data: " + SigPlus1.SigString);
    </SCRIPT>
    of course, this method will be called after the use press save button as follow:
    <INPUT id="submit1" name="Save" type="submit" value="Save" onclick="OnSave()"/>
    As you can see this Javascript will alert the result to the user. Instead I want to pass the object ( SigPlus1) to a Java Bean.
    I am using ADF technology with JDveloper 11.1.2.3

    here is the answer:
    ADF RichClient API - af:serverListener

  • 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

  • Purchase Order Form Personalization Help

    I am new to form personalizations and I am trying to create a personalization that will automatically display the "last price paid" in the Price field in a Purchase Order form for an Item once the Item No. is entered. Also once the data is pulled up, they need to be able to edit the 'Price' field to enter the current price.
    I am not sure how to setup my form personalization using the SQL view to I have that contains the "last price paid" data. I would really appreciate some help on how to do this in personalizations.
    Thanks
    KG

    Forms Personalization is a feature of the Oracle Enterprise Business Suite (EBS) not a feature of Oracle Forms. Please post your question in the General EBS Discussion forum. If you have a general Forms question, by all means, ask it here! ;-)
    Craig...

  • 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 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 use form personalization to lunch concurrent program

    Hi,
    Now I am using the form personalization to lunch a concurrent program with global variables.But how to post the global variables to the program parameters.
    Thanks and best regards
    Fang
    Edited by: 895910 on Dec 25, 2011 7:54 PM

    Hi,
    I have defined global variables using form personalization. But how should i launch a SRS Form to submit a request and pass the variables as parameters. What should the syntax be.
    Thanks and best regards,
    Fang

Maybe you are looking for

  • Styling font

    Hello amigos/amigas. I am trying to style some font I'm importing from a simple .txt file. I know how to set the font family, size, etc. however, I want to change the style of the font as well as the family. The font I am defining is "frutiger", but

  • At least one certficate has expaired

    HI experts, i have installed NetWeaver 2004s server and when i try to start the J2ee instance server0 process is never come up and it is giving exit code -1 in the alrests i am getting an error message '   at least one certficate has expaired' what c

  • Rollover Text Color CHnage

    Hey, I created a tool bar in photoshop and imbedded into a table in dreamweaver. What I am currently trying to do is, as you roll over the hot spot to get the box to change color. Is this possible?

  • APO SPP: No Historical Forecast visible in transaction /SAPAPO/SPPFCSTTRACK

    Hello I am trying to view historical forecast data via transaction /SAPAPO/SPPFCSTTRACK in APO SPP. However i get the message "No hist. fcst time series can be determined". The forecast strategy is correctly assigned to the product & the standard dev

  • Help requested with the background of lighting effects

    I need help creating a light background when rendering with light effects.  I am selecting filter, then render, then lighting effects.  From there I am choosing an omni light to create a blue light shining from above on my project.  The problem I hav