I want to use a variable in set_block_property

i m trying to SET insert_allowed,update_allowed property of database at form level.
SET_BLOCK_PROPERTY(ARG_TBL_NAME,UPDATE_ALLOWED,PROPERTY_TRUE);
Its working fine with above syntax but i want to do like this can I?
SET_BLOCK_PROPERTY(ARG_TBL_NAME,UPDATE_ALLOWED,X);
-- WHERE X IS ANY VARIABLE WHICH CONTAIN VALUES EITHER PROPERTY_TRUE OR PROPERTY_FALSE.
WHEN I TRIED THIS MY FORM COMPLIED BUT AT RUN TIME WHEN IT COMES THIS STATEMENT IT JUST SIMPLY CLOSED. REMBER I M USING FORM 6I

Ok, here's the deal. PROPERTY_TRUE and PROPERTY_FALSE are Forms NUMERIC Constant variables. The numeric value for these variables are:
PROPERTY_TRUE = 4
PROPERTY_FALSE = 5
You can find the value of almost all Forms Constant variables by simply outputting them to the message console using the Message() built-in, eg; Message(PROPERTY_TRUE);
If you want to make this parameter to Set_Block_Property more dynamic, then I would make "X" a numeric variable and where ever you are assigning "X" a value either assign it the literal value or use the Forms variable. For example:
BEGIN
   IF ( SOME CONDITION is TRUE ) THEN
      X := 4;
   ELSE
      X := 5;
   END IF;
END;Or you can use the following:
BEGIN
   IF ( SOME CONDITION is TRUE ) THEN
      X := PROPERTY_TRUE;
   ELSE
      X := PROPERTY_FALSE;
   END IF;
END;Craig B-)
If someone's response is helpful or correct, please mark it accordingly.

Similar Messages

  • I want to use static variable instead of using variable in servlet context

    Hi all,
    In my web application i have to generate a unique Id.
    For this, At the application startup time i am connecting to the database and getting the Id and placing it in the servlet context.
    Every time i am incrementing this id to generate a unique id.
    But, now i want to place this id in a static variable which is available to all the classes.
    why i want to do this is to reduce burden on servlet context.
    my questing is, is this a best practice ? If not please give me your valuable suggestion.
    thanks
    tiru

    There isn't a problem with this as long as you want to share the value of that variable with all requests. If this is read-only except when it is first set then you're fine. The only real issue will be how to initialize and/or reinitialize the variable. When the servlet is started, how will you get the value for the variable? If the servlet is shutdown and restarted (a possibility in any application server) how will you re-read the variable? You need to answer these questions to decide the best route. It may be as simple as a static initializer or it may be more complex like a synchronized method that is called to see if the variable is set.

  • Error in using System Variable

    Dear all,
             I want to use System Variable 225 ( VAT percent (per VAT code) ) which is used in one of document i.e. "VAT Only Invoice".
    When I used it in my Invoice document the following error occurs:
    Printing Error : Invalid Variable number (RPT -6300)(Field:F_XXX) Variable 'XXX'
    Please help me to use this System Variable in my Invoice.
    Note: I have already read "How To Use the PLD Variables File in Release 2007 A" .pdf file.
    can any one tell the meaning of folowing which is in the sheet "vars utilisation" of PLD_Vars_march2007 xls file
    " it means that this variable can be used only under certain repetitive area exclusive numbers (109, 126, 132, 135, 139, 148, 149, 309, 316, 427, 502, 509, 686)
    Regards,
    Ghazanfar
    Edited by: Ghazanfar Ahmed on Jun 18, 2009 12:16 PM

    Hi,
    It is a special variable available for the VAT summary part, not to be used in the rows but in a separate repetitive area.
    To display the respective VAT rates in each row, create a database field instead: Tax Definition - Rate%. It will populate the VAT percentage for you.
    Regards,
    Nat

  • Using a variable as a value in jsp:param

    I was wondering, I have a String variable, vid_1, and want to use a jsp:include and pass that in as one of the parameters. How can I do this? I have to do some testing to make sure vid_1 is valid and set a default if not. It contains a number referring to which video needs to be displayed.
    Is there anyway I can get this value to be used in jsp:param value?
    John

    RahulSharna wrote:
    Well,First thing you haven't pharsed your question properly.
    Anyways as per my understading.
    The first thing is make use of in this case as your defined requirement states you need to make use of variables of both the JSP's which need compile time include not at the runtime.use of
    <%@ include file="url" %>would be more appropriate as you want to use the variable of parent jsp to the child one.
    Anyways if you are thinking to apply a solution using <jsp:include/>
    <jsp:include page="url">
    <jsp:param name="paramName" value="<%=stringVariable>"/>
    </jsp:include>and extract the paramName's corresponding value as a request parameter in other JSP.
    Hope that might answer your question :)
    REGARDS,
    RaHuLRaHul,
    Thanks for the reply. The second example you gave is what I was trying to do. I thought I did exactly what you have there and it was not working. I will check it over again and post back on here when I have a chance.
    For now I was trying to use c:set to save the variable in the request and then using the EL expression ${requestScope.variable} to put it in the <jsp:param> element. I had some things working and others not when I quit. Hopefully tomorrow I can give you a full report and we can get this worked out.
    Maybe my problem is something else? Look at this post of mine:
    http://forum.java.sun.com/thread.jspa?threadID=5236252&tstart=10
    Thanks so much for the help.
    John

  • How do I use bin variable in package without asking a user?

    hi,
    I would like to write an SQL but I want to use bind variable in package as a static without asking user? Like below?
    I would like to ask you, below there is a emp_id variable? Is this BIND variable?
    DECLARE
    bonus NUMBER(8,2);
    emp_id NUMBER(6) := 100;
    BEGIN
    SELECT salary * 0.10 INTO bonus FROM employees
    WHERE employee_id = emp_id;
    END;
    If not, like this SQL how can define a BIND variable as static inside a code? not asking a user?
    db version. 9.2.0.8
    regards and thanks

    OracleADay wrote:
    I would like to ask you, below there is a emp_id variable? Is this BIND variable?
    DECLARE
    bonus NUMBER(8,2);
    emp_id NUMBER(6) := 100;
    BEGIN
    SELECT salary * 0.10 INTO bonus FROM employees
    WHERE employee_id = emp_id;
    END;
    /In the query "SELECT salary * 0.10 INTO bonus FROM employees WHERE employee_id = emp_id" emp_id is turned into a bind variable because
    if you are coding static SQL in PL/SQL then PL/SQL wil automatically use bind variables: please read http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/overview.htm#sthref145.
    This can also be proved with SQL trace. The following code:
    alter session set sql_trace=true;
    declare
    v number;
    c number;
    begin
    select count(*) into c
    from t
    where x=v;
    end;
    show errors
    alter session set sql_trace=false;generates following raw trace file section with 10G XE:
    =====================
    PARSING IN CURSOR #2 len=79 dep=0 uid=69 oct=47 lid=69 tim=33338762257 hv=2860574766 ad='3c10120c'
    declare
    v number;
    c number;
    begin
    select count(*) into c
    from t
    where x=v;
    end;
    END OF STMT
    PARSE #2:c=46800,e=329811,p=0,cr=9,cu=0,mis=1,r=0,dep=0,og=1,tim=33338762253
    =====================
    PARSING IN CURSOR #1 len=35 dep=1 uid=69 oct=3 lid=69 tim=33338788761 hv=3539261652 ad='3c10053c'
    SELECT COUNT(*) FROM T WHERE X=:B1
    END OF STMT
    PARSE #1:c=0,e=216,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=33338788755
    =====================Edited by: P. Forstmann on 17 mai 2011 17:47
    Edited by: P. Forstmann on 17 mai 2011 17:55

  • How to use a variable between interfaces or class?

    Hello All;
    Far by now I can say that the forum is very helpful for me. Thanks for all the people who have the time and generosity to help our problems. Thank you.
    Unfortunately I have a problem <Again :( >
    I want to use a variable in two different *.java files.
    Is it possible?
    The Variable i want to use is; int CiftSayisi
    The variable is declared in the CamCalib.Java under a button's Action Listener.
    Here is the code;
    public void actionPerformed(ActionEvent arg0) {
                        ImagePair.main(null);
                        String[] ImPath = list.getItems();                                           //Storing Items in an Array
                        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();                     //Dimensions of the Screen Storing in an object
                        int ScreenHeight = dim.height;                                           //Definition ScreenHeight
                        int ScreenWidth = dim.width;                                          //Definition ScreenWidth
                        // System.out.println(ScreenHeight);                                                    //Testing of the Dimensions
                        // System.out.println(ScreenWidth);                                                     //Testing of the Dimensions
                        int CiftSayisi = ImPath.length -1 ;
                        if (CiftSayisi == 0){
                             System.out.println("Added Images do not Construct a Pair");
                        else {
    }Now i want to use it in another java file which is ImagePair.Java in the loading part of the interface;
                 setType(Type.UTILITY);
              setTitle("Image Pair Selection");
              setResizable(false);
              setAlwaysOnTop(true);
              setBounds(100, 100, 450, 68);
              contentPane = new JPanel();
              contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
              setContentPane(contentPane);
              contentPane.setLayout(null);
              textField = new JTextField();
              textField.setBounds(61, 11, 22, 20);
              textField.setEditable(false);
              textField.setEnabled(false);
              contentPane.add(textField);
              textField.setColumns(2);I have a text field in here that i need to fill with the value of CiftSayisi
    Any help please?
    ömer kaya
    METU-GGIT
    Edited by: Ömer K. on Apr 10, 2012 12:43 AM

    I didn't bother reading the code, since you didn't format it.
    But to answer your question (if I understand it correctly), yes, it is possible to pass variables between different object instances (not from an interface specifically, since interfaces don't have members). The simplest way to pass the variable as an argument to a method or constructor. If these aren't available, you could create a static global variable, though in a multithreaded app you'd have to synchronize access.

  • Using EL variable in struts bean:message tag(not struts EL tag)

    Is there any work around to use an EL variable inside struts bean:message tag as key:
    I have like this:
    <bean:message key="${bean.keyName}"/>
    which is throwing error , I know this can be resolved by using struts-el tags but i cannot use them for specific reasons.
    I dont want to use bean:define tag to define my 'bean' and then use like this:
    <bean:message key="<%=bean.getKeyName%>"/> (this actually works, but i want to use EL variable)
    Is there any work around to use EL variable and make the message display on the jsp.
    i tried multiple ways like scriplets and jsp:useBean but nothing worked, Please let me know..
    Thanks in advance

    Im pretty sure that EL does not work in the normal struts tag unless its struts-el tag.Have you tried it?
    As I said, in a properly configured JSP2.0 container you can use EL expressions anywhere you could traditionally use a standard runtime expression <%= expr %>.
    What server are you using? What JSP version?
    The Struts-el tags were written so that you could use EL with struts in JSP1.2 containers.
    The c_rt tags were written so you could use runtime expressions with JSTL tags in JSP1.2 containers. Their use was discouraged even then. Now I consider their use absolutely unnecessary.
    Please read this thread: http://forum.java.sun.com/thread.jspa?threadID=629437&tstart=0
    Cheers,
    evnafets

  • Using process variables in conditional transition

    HI,
    I am usin Oracle BPM 1.03
    I wanto to have a value of a variable visible in the user's inbox. Therefore, I need to use project level variables.
    I also want to use this variable in conditional tranistion, but the condition editor only allows Instance level variables.
    Am I overlooking something? Is there an easy way to use project variable in conditional transtions?
    Matej

    you should be able to manually type the transition condition on the properties tab.
    xArea == "MyArea"
    where xArea is a Project Variable

  • Using a Variable to select a function

    Hi there.
    I am looking to use a variable that is set when a user clicks
    a button to then use as the variable name to call a function. The
    actual functions work, but when using a variable as the function
    name it doesn't call the function. Here's my code so far, could
    anyone help with what I may be doing wrong (please see code snippet
    attached).
    Thanks a lot
    Tony Mead

    Thanks for the reply Dave. I wanted to use a variable because
    when any of the 4 buttons are clicked they have to
    1. Run the function determined by the closeActive variable
    (closing the open panel - could be 1 of 4)
    2. open and run a particular panel
    Probably best explaind by looking at what I have done so far
    (home & about us only at the moment):
    http://www.soapbox-creative.com/development/08/index.html
    Basically I needed the flash movie to 'know' what panel is
    currently opn and when another button is clicked it can just run
    the close function and close the panel that is open.
    Thanks again
    Tony

  • Use Session Variable with row-wise initialization

    Hello,
    I use an initialization block in order to load some translations in my repository (version is 11.1.1.6.BP1) :
    SQL :
    SELECT CODE_KEY, STRING_VALUE FROM "TABLES" WHERE  LANGUAGE_KEY= 'VALUEOF(NQ_SESSION.USERLOCALE)'
    Values :
    CN_INCOMING, Incoming, en
    CN_OUTGOING, Outgoing, en
    CN_INCOMING, Réception, fr
    CN_OUTGOING, Emission, fr
    etc ...
    I checked the row-wise intialization.
    The query is correct and returns the right values (I check in the log file ..).
    So far, So good.
    But when I want to use session variables in a column expression (in repository) like  :
    CASE WHEN "column"="xx" THEN VALUEOF(NQ_SESSION."CN_INCOMING")  ELSE VALUEOF(NQ_SESSION."CN_OUTGOING") END
    I got the error: [nQSError: 23006] The session variable, NQ_SESSION.CN_OUTGOING, has no value definition.
    If I used the same formula directly in Answers it's working correctly.
    Do I have to necessarily do this in answers or is there a way to do this in the repository.
    Thanks in advance
    Regards
    Benjamin

    Yes I already tested this point, when I don't use a row wise initialization it's working, but I don't want to create one variable for each translations that I need to use in column formula if you know what I mean.
    I don't understand why we can't use this kind of variable in this context ..but if I have to create the column in my analysis, I will do that, but it's not really user friendly
    Anyway thanks for your time.

  • Using Text Variable in BEx Formula

    Hi Everyone,
    I have two columns in BEx query. First column shows the value based on variable ZFISCPER_M(based on fiscal year/period).
    The other column shows the value for period ZFISCPER_M minus 1 (I have used offset in variable).
    So if my user inputs 009.2009, the first column will show values for 009.2009 and 2nd column will show values for 008.2009.
    In the third column I have formula : 2nd column minus 1st column. I want to use text variable to display column heading. The heading in the 3rd column should be 009.2009.
    Can anyone guide me how to achieve this?
    Regards
    Utpal

    Hi Rakesh,
    My first column shows cumulative balance upto 009.2009; My second column shows the cumulative balance upto 008.2009; In the third column I am trying to display balance for the month - not the cumulative figure. So for the third column my heading should be For the month 009.2009
    But when I substract col 2 - col 1in third column; the text variable finds two different values(009.2009 & 008.2009). Hence it is not displaying any text.
    I hope this makes my question clear.
    Regards
    Utpal

  • How to use Public variables in other classes

    Please have a look at the program.
    In the below program, i want to use the variable 'name' in the class cl_airplane1 implementation under the method aircraft to display 'BRITISH AIRWAYS' which i am passing through the object AIR1.
    The variable 'name' is declared under public section of the class cl_airplane. I do not want to use inheritance. Can i do this.
    *&             CLASS DEFINITION
    CLASS cl_airplane DEFINITION.
      PUBLIC SECTION.
        METHODS set IMPORTING  im_name TYPE string
                               im_weight TYPE i.
        METHODS display.
        DATA name TYPE string.
      PRIVATE SECTION.
        DATA weight TYPE i.
    ENDCLASS.            
    *&                   CLASS IMPLEMENTATION
    CLASS cl_airplane IMPLEMENTATION.
    *******METHOD SET*****************
      METHOD set.
        name = im_name
        weight = im_weight.
      ENDMETHOD.               
    *******METHOD DISPLAY**************
      METHOD display.
        WRITE : / ' NAME :', name, ' AND ', 'WEIGHT:', weight.
      ENDMETHOD.                   
    ENDCLASS.                   
    *&     END OF CLASS CL_AIRPLANE IMPLEMENTATION
    *&             CLASS DEFINITION-CL_AIRPLANE1
    CLASS cl_airplane1 DEFINITION .
      PUBLIC SECTION.
        METHODS : aircraft IMPORTING im_name1 TYPE string,
                  dis1.
    ENDCLASS.                   
    *&                   CLASS IMPLEMENTATION
    CLASS cl_airplane1 IMPLEMENTATION.
    *******METHOD AIRCRAFT
      METHOD aircraft.
      ENDMETHOD.                
    ********METHOD DIS1
      METHOD dis1.
      ENDMETHOD.                                         
    ENDCLASS.                 
    **********CREATING REFERENCE VARIABLES
    DATA : air TYPE REF TO cl_airplane.   
    DATA : air1 TYPE REF TO cl_airplane1. 
    START-OF-SELECTION.
    ***CREATING AN OBJECT OF THE CLASS CL_AIRPLANE
      CREATE OBJECT air .
      CALL METHOD air->set
        EXPORTING
          im_name   = 'Lufthansa'
          im_weight = '1000'.
      CALL METHOD air->display.
    ***CREATING AN OBJECT OF THE CLASS CL_AIRPLANE1
      CREATE OBJECT air1.
      CALL METHOD air1->aircraft
        EXPORTING
          im_name1 = 'BRITISH AIRWAYS'.
      CALL METHOD air1->dis1.
    <removed_by_moderator>
    Thanks.
    Edited by: Julius Bussche on Jul 30, 2008 3:13 PM

    Here is ur solution:
    *& Report  Z157780_PRG1
    REPORT  z157780_prg1.
    *& CLASS DEFINITION
    CLASS cl_airplane DEFINITION.
      PUBLIC SECTION.
        METHODS set IMPORTING im_name TYPE string
        im_weight TYPE i.
        METHODS display.
        DATA name TYPE string.
      PRIVATE SECTION.
        DATA weight TYPE i.
    ENDCLASS.                    "
    *& CLASS IMPLEMENTATION
    CLASS cl_airplane IMPLEMENTATION.
    ********METHOD SET******************
      METHOD set.
        name = im_name.
        weight = im_weight.
      ENDMETHOD.                    "set
    ********METHOD DISPLAY***************
      METHOD display.
        WRITE : / ' NAME :', name, ' AND ', 'WEIGHT:', weight.
      ENDMETHOD.                    "display
    ENDCLASS.                    "
    *& END OF CLASS CL_AIRPLANE IMPLEMENTATION
    *& CLASS DEFINITION-CL_AIRPLANE1
    CLASS cl_airplane1 DEFINITION INHERITING FROM cl_airplane.
      PUBLIC SECTION.
        METHODS : aircraft IMPORTING im_name1 TYPE string,
        dis1.
    ENDCLASS.                    "
    *& CLASS IMPLEMENTATION
    CLASS cl_airplane1 IMPLEMENTATION.
    *******METHOD AIRCRAFT
      METHOD aircraft.
        name = im_name1.
        WRITE : / ' NAME :', name.
      ENDMETHOD.                    "aircraft
    ********METHOD DIS1
      METHOD dis1.
      ENDMETHOD.                                                "dis1
    ENDCLASS.                    "
    **********CREATING REFERENCE VARIABLES
    DATA : air TYPE REF TO cl_airplane.
    DATA : air1 TYPE REF TO cl_airplane1.
    START-OF-SELECTION.
    ***CREATING AN OBJECT OF THE CLASS CL_AIRPLANE
      CREATE OBJECT air .
      CALL METHOD air->set
        EXPORTING
          im_name   = 'Lufthansa'
          im_weight = '1000'.
      CALL METHOD air->display.
    ***CREATING AN OBJECT OF THE CLASS CL_AIRPLANE1
      CREATE OBJECT air1.
      CALL METHOD air1->aircraft
        EXPORTING
          im_name1 = 'BRITISH AIRWAYS'.
      CALL METHOD air1->dis1.
    Hope That Helps
    Anirban M.

  • Using environment variable in rule file

    Hi,
    I want to datacopy from one cube (scenario Forecast) to another (scenario FcstJan, FcstFeb, and so on) based on which month is running currently. I want to use environment variable in the rule file. The Forecast data will be extracted in .txt and will be imported to the second cube in FcstJan if current month is Jan and same for Feb, Mar..... The CurrentMth will be my env variable.
    Can anyone please let me know how I can use that variable in the rule file. Or, if there is any other way to load the same.
    Thanks.

    You could just set a substitution variable and then use the substitution variable in the header of the rule.
    Have a read of :- Re: Data error
    to understand about using substitution variables in the header of a rule file.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How can I use a variable for an interface log and error fle

    I want to use a variable for the interface's log and error file so that when I migrate from Dev to QA to Prod I don't have to do a lot of editing.
    Specifically on the "flow" tab for the "target", I want a variable to be the first part of the path for the log (\\sundev1\fnd1-hypd1) and join this with the rest (\update\log\logfile.log) within the LOG_FILE_NAME field.
    Thank you!

    Hi,
    It is quite simple....
    just use the <%=odiRef.getSchemaName("D")%> before the file name and configure both path in the topology linked to each context.

  • Use of variables in cross tab

    Hi experts,
    Can anyone tell me how to use a variable in cross-tab?
    I am populating the crosstab from the columns of a table.
    I want to use a variable (say percentage of averages) which calculates for each month for any number of months the data has been generated.
    Ex: Demo is my table and contains two average fields - average1 and average2 generated once for each month.
    Now I want a variable which calcaulates for each month, their variance based on some formula like (average1-average2)/average1.
    I have created a variable which calculates according to the above formula but its value is getting repeated for each month (the value of the first month) . It is not giving me the value corresponding to each month.
    Request you to help me.
    Thanks,
    Roshan

    Hi,
    Thanks for the reply.
    I have the following data from the cross tab.
         Jan     Feb     March
    Average 1     25     35     50
    Average 2     20     20     35
    Average 3     15     10     25
    And i want to generate the following structure dynammically based on the number of months/quarters.
         Jan     Var %     Feb     Var %     March     Var %
    Average 1     25          35          50     
    Average 2     20     20     20     42.85     35     30
    Average 3     15     40     10     71.42     25     50
    The new columns in the crosstab display should be dynamically generated.
    Request you to help me generate the new columns and the values.
    I have created this table in MS-Excel for reference.
    Thanks,
    Roshan

Maybe you are looking for

  • Wireless Communication Problems

    Hi Everyone! I have to mention a problem I face with my brand new OfficeJet AllinOne 8500 wireless. First of all, I use a laptop HP Pavilion and I have a wirelss network at home with other 2 PCs connected that run XP. Installing the printer software

  • Information of Print Area is missing in VB6 Addin of version Excel 2007 and Excel 2010

    Hallo,  I have a problem with my old VB 6 COM Addin. My document has Print Area, but when I use my addin to open this document. The information of print area is lost.  This problem takes place only in the following situations. If the PrintArea is set

  • Planned Order Rates

    We run detail scheduling for our plant. We often change the duration of the planned order to either run longer or slower than what was created by the system (based off of the rates). If we change the planned order quantity the rate of the planned ord

  • RH7 Trial HTML View

    This discussion started with this thread. I am using the RH7 trial on a Windows XP SP2 machine and looking at a project with Japanese text in the topics. The project language is now set to Japanese. In Design view, the characters display properly, bu

  • I want to upgrade to CS6.  Can I uninstall previous versions so I don't accumulate PS apps

    I want to upgrade to CS6.  Can I uninstall previous versions so I don't accumulate PS apps