Set initial value using SQL

Hi,
How do I set the 'initial value' property of a default value using an SQL statement?
Any help appreciated,
Rob

Hi Kevin,
you are right. It is sometimes confusing for the users, but it is - as you said - like setting the initial value, of course you can do some more complexity there.
One big problem is. If you want to set the initial values in a detail record of a master-detail relatioship depending on the master-record, you CAN'T use it. If you change the master record to a record which doesn't have a detail, the WHEN-CREATE-RECORD trigger fires before the master-record really changes. That means, the detail will be initialized with data from the old master-record (the one you were in, before changing the master record). Stupid thing.
I never tried the WHEN-DATABASE-RECORD trigger, I even don't know how it works. I think I have to check what it is doing.
Regards,
Torsten

Similar Messages

  • How do I retain a PDF form widget's design when setting its value using Javacript in Acrobat?

    I've been experimenting with interactive PDF forms in InDesign and JS in Acrobat. I think I've encountered something that might be a bug: widget design is overriden when using Javascript to set the field's value in Acrobat. Here's what a checkbox, for example, should look like when checked:
    However performing:
    var f = this.getField("Checkbox");
    f.value = "Yes";
    in the JS Console results in the widget's appearance defaulting to acrobat's:
    I've tried every single widget property documented in Acrobat's Javascript API Reference to no avail. Initially, checking/unchecking using the mouse works fine. Once the value has been set using JS, Acrobat's default black check character is used for all subsequent toggling, including when using the mouse...
    How does InDesign export interactive PDFs with custom icons for widgets? Is there any way to enforce the use of those icons using JS in Acrobat Pro? What's the difference between selecting a checkbox or a radio button using the mouse and setting its value using JS?

    I thought it might be the case, too, but all widgets have the same properties both before and after setting the value with JS. I did this check using all documented properties in Acrobat JS Reference in an attempt to figure out what might be going on.
    By the way, I don't think Indesign necessarily uses glyphs for the checked state of widgets, although in this case a glyph is used (albeit with different stroke and fill colours for the glyph, acrobat doesn't allow setting these properties AFAIK). With Indesign CS6 it seems you can practically use any Indesign tool to design the widget's On and Off states. So I'm thinking that maybe Indesign exports these with button-like properties where there are no restrictions on appearance (I think there is an "icon" property/object for buttons or something like that). However Acrobat treats them as checkboxes, so if that is the case it is more of a hack. Is there a way to probe an object's various properties other than using JS or the properties pop-up dialog?

  • Default form value using sql with bind variable

    I wish to create a form based upon a table with a foreign key. I wish to add a field to the form that is an uneditable text field with a default value using sql of 'select name from other_table where other_table_id = ?' where ? is a bind variable defined by a hidden field which is the value of the foreign key identified at runtime. How can this be done?
    null

    I don't think that will work. I have multiple people accessing the Portal at the same time with the same login (or lack of as public will be the most common user). I could set it easily enough as the value is passed to the form by a link object, so I could add it to the before page plsql block and set the value. But I am uncertain how it will behave in a multi-user mutlitasking environment.
    Maybe I should describe what I am looking to accomplish. I want to create a display above a form that will list static details from other tables (i.e. when editing a user's phone number, which is in one table, you want the user to see the person's name, which is in another table, and the form is based upon the phone table) ...
    Just as I am thinking about it, I thought of an idea. I could put some specific code in the before displaying page plsql section to query the database and use htp to output the information for data not in the table the form is based upon. I will try this and see how it works. It would have been nice to have just created a field that is not editable and had a default value, but this should work as well.
    Let me know if you see any problem with this or if you have any better suggestions.
    Thanks for the fast response.

  • Query to set initial values

    Hi all,
    Is it possible to use queries to set initial values or change existing values?  For example, we are adding in a new sales employee that will be our sales rep for customers in a certain area.  Would it be possible to run a query that would set the Sales Employee field in the BP Master Data as this new sales rep if the customer is in that area?  If yes, what is the general process for using queries to set values in this manner (we have other things we would like to use this for as well, if its possible)?
    Thanks for the help

    Hi Todd,
    The best way to tackle this is probably to use a query to extract the business partners you wish to update and then use the Data Transfer Workbench to update the Business Partners in question.
    You could also add a Formatted Search to the Business Partner screen so all new Business Partners default to the correct Sales Person based upon territory/address or whatever criteria you like.
    Cheers,
    Sean

  • Problem setting initial value for LOV

    Hello, everyone. This seems like it should be simple, but it's giving me lots of problems. I am trying to create my first LOV. I have a messageLovInput item called PFedFilingStatus. From the Property Inspector, I can set an Initial Value of "02", which displays when I run the page, and lets me change it and validate it using the associated LOV.
    What I would rather do is set the initial value programmatically, but here are my problems:
    If I set the value like this:
    OAMessageLovInputBean lovText = (OAMessageLovInputBean)pageLayout.findIndexedChildRecursive("PFedFilingStatus");
    lovText.setText("02");
    then the field displays properly at run time, but can't be changed. The LOV runs, but any value I select flips back to "02"
    If I set the value like this:
    lovText.setDefaultValue("02");
    then nothing seems to happen at run time. The value is not displayed at all.
    Can anyone tell me what I am doing wrong? Thanks for your help.
    --Dave                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Yes, that helps a bunch. Now can you tell me where that is set?
    Thanks so much.
    --Dave                                                                                                                                                                                       

  • Setting initial values on structures

    I have written a middle-ware wrapper which allows me to call a SAP RFC from SQL Server stored procedures.  I am upgrading it from the DCOM to the .Net connector so I can run it on Windows 2003 Server.
    When I set a string value (SAP C type) to initial I get the error "Object reference not set to an instance of an object." raised in the proxy object.  This error does not happen for non-initial values, and also does not happen on my development workstation.  It happens if I set the string to "" or to " ". It occurs on two servers - Windows 2000 and Windows 2003.
    I can't figure out how to debug this, and can't find anything in this forum or on SAP Notes.  Has anyone else found this error?

    A clear head in the morning makes all the difference. There was no problem with the .Net Connector.
    The problem lay with SQL Server's sp_OAMethod procedure, or possibly in the .Net component's CCW.  If you pass an empty string in as an argument, your component gets a Nothing.  I therefore fixed it in the component with:
       If Value Is Nothing Then Value = ""
    Thanks,
    Derek

  • Deafaul Value using SQL query

    Hi
    I'm trying to make a default value using Computations;
    when I create computation,
    I select
    Computation item: PXX_TEST
    computation type: SQL query
    computation Point: I tried all
    Computation: select X FROM Y WHERE X= '1'
    This is the way to get Default Value ??
    I need to display the value when the page is open
    Thanks
    MM

    MM,
    You can use the default value attribute of the item to set a value if the item's source produces a null. A computation (before/after header) can work too, but it's possible that the item source and Source Used attribute (Always/Only) are interfering with your computation so you might want to try setting Source Used to 'Only...' if you have a computation setting the item.
    Scott

  • Set initial value based on query

    Is it possible to set the initial value of a field based on a query. Kindly advice.
    Regards,
    Careen

    Hi,
    Yes. You can create a VO for your query and map that to the field on your page. Then execute the VO in PR method.
    Or if the field is not based on VO, you can execute your query in PR method using PreparedStatement. Then get the handle of the field and set its value to the value returned in resultSet of the query.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Vl31n set initial values

    Hello,
    I donu2019t have very much experience in abap, so I will ask you to help me. I need to fill the the purchase order and the vendor field from vl31n transaction - initial screen with some values. Can you suggest me an user-exit, a badi or something else to solve my problem? I mention that I never worked with badi or user-exits, so I will appreciate any details about this and how is used..
    Thanksu2019

    I assume you want to call the transaction from within another abap program and populate the entry fields on the selection screen ?
    Generally for any transaciton, if you place the cursor in the input field and press F1 you will get the help. From here if you select the technical help you will see information about the field.
    On here there is a parameter id field, showing BES for Purchase order number and LIF for Vendor.
    You can then use SET PARAMETER ID to set the values for these two IDs and they will appear when the transaction is then called.

  • IDOC CLFMAS set initial values

    Hi,
    I am using IDOC CLFMAS02 to update values in material classification. I do not have problems with modify a normal value. But I want to set a date classification value to initial. If I inform with ' ' the value is showed as '00.00.0000', but I need that this value become initial.
    I am trying to use field MSGFN = 003 (delete) on segment E1AUSPM but it does not running.
    The FM that we use to input idoc is IDOC_INPUT_CLFMAS.
    Any suggestion. Thanks¡¡¡¡

    Yes I try to remove date characteristic from E1AUSPM.
    Also I try to set blank value.
    Also I try with MSGFN value = 003.
    I think that your code is only to delete values from multiple-values characteristics.
    TEST 1 ( set blank)
    Current Material characteristic value: 01.01.2011
    Objective Material characteristic value: Blank
    E1OCLFM                     004MARA      00000XXXXXXXXXXXXX                           001OMARA
        E1KSSKM                     004ZCLAS                                 1
        E1AUSPM                     004Z_CHARACTERISTIC
        E1DATEM                     004
    Result Material characteristic value: 00.00.0000
    TEST 2 (MSGFN 003)
    E1OCLFM                     004MARA      00000XXXXXXXXXXXXX                           001OMARA
        E1KSSKM                     004ZCLAS                                 1
        E1AUSPM                     003Z_CHARACTERISTIC                        01.01.2011
        E1DATEM                     004
    OR
    E1OCLFM                     004MARA      00000XXXXXXXXXXXXX                           001OMARA
        E1KSSKM                     004ZCLAS                                 1
        E1AUSPM                     003Z_CHARACTERISTIC                         
        E1DATEM                     004
    OR
    E1OCLFM                     003MARA      00000XXXXXXXXXXXXX                           001OMARA
        E1KSSKM                     003ZCLAS                                 1
        E1AUSPM                     003Z_CHARACTERISTIC                         01.01.2011
        E1DATEM                     003
    OR others...
    The problem is that characteristic must be defined to DATE format and when I set blank value, inside code is converting to 00.00.0000

  • Set initial value in a DD table

    Hi,
    I want set initial/default  value in a column when create a table by Tcode se11.
    please help me.
    thanks.

    Hi,
    You can do this using the Events in table maintenance generator,
    When you save an entry in table using SM30 or any other transaction, the default values get saved in the table along with the other entries...for instance you can disable the fields for input on SM30 for the fields where you want to default values...so that user cant enter values in table entries creation.
    To access events: SE11->Table maintenance generator->
    On the table maintenance screen->Menu->Details->Modifications->Events.
    Events: 01- Before save(Do F4 help for more events available)
    Routine: <give form name where you add code to default value on screen field>
    For more information on events you can search SDN
    Hope this helps you
    Regards
    Shiva

  • To set Initial value at run time

    Hi all,
    i am working in forms.There is a poplist with 3 elements.Forms will be open for two different user. 1st user able to see only one element from the list, So I used Delete_list_element. Now I want to set this value as a default value without select that value because there is a only one element. Is it possible if yes please help me.
    Thanx in advance
    Sanjit

    I think, setting property required=Yes will do the job ...
    It is also possible to directly initialize a list item with a value (which should be then content of the actual list).
    :BLOCK.LIST_ITEM := VALUE;
    or you try something like (after your delete_list, to keep it dynamic) :
    :BLOCK.LIST_ITEM := GET_LIST_ELEMENT_VALUE('BLOCK.LIST_ITEM',1);
    Message was edited by:
    user434854

  • Setting Initial Values in Sharpening Panel

    I have found that one of the reasons that LR3 Process 2010 sharpening seems to be a problem is that the initial values in the Sharpening panel in Develop has a setting of 50 for Detail. Aside from the fact that the Detail adjustment isn't even available in LR2, I have found that a setting of 50 almost always gives a "crinkle" effect (for want of a better term) clearly visible at 100%.  This can usually be correct by lowering the Detail value, often to 0.
    Is there a way to preset the Sharpening values (currently Level 0, Radius 1.0, Detail 50, and Mask 0 -- at least as I'm seeing it) to my own preferred settings?  Seems to me it may be related to camera-specific presets, but I can't find anything (yet).  For example, I'd like mine set to 25,1.0,0,0.  Or, am I completely missing something here?
    dds

    Default settings are set by camera model, so you can have as many different default settings as you want.  Additionally, the dialog box that appears when you set camera raw defaults has a button to enable you to restore the Adobe Camera Raw defaults.
    Visual360photography wrote:
    Hey, I have three cameras and when I click set default, it shows what camera the picture was taken. So my question is what happen to the other two cameras that I have. Especially when it say that this action is not undoable.
    Thanks.

  • Set attribute value using plugins

    Hi Experts,
    I am facing error when setting the value of attribute in the event "OnInvestigationStartedEvent". Any suggestion to fix the issue
    code:
                Session ses = onInvestigationStartedEvent.getSessionContext().getInterviewSession().getRuleSession();
                Attribute start = ses.getGlobalEntityInstance().getEntity().getAttribute("test_start_time");
                Date start_date = new Date();
                start.setValue(ses.getGlobalEntityInstance(), start_date);
    Error:
    25750 [http-apr-8080-exec-9] INFO com.oracle.determinations.engine.Session  - User setting attribute test_start_time, entity global, instance name global, session 1 to value 7/21/13 2:17 PM
    25752 [http-apr-8080-exec-9] ERROR com.oracle.determinations.web.platform.templatingengine.ErrorRenderer  - A unauthorised change to the Rule Session has been detected.
    com.oracle.determinations.interview.engine.exceptions.CorruptSessionException: A unauthorised change to the Rule Session has been detected.
      at com.oracle.determinations.interview.engine.data.local.RuleSessionManager.checkSessionIntegrity(RuleSessionManager.java:760)
      at com.oracle.determinations.interview.engine.data.local.RuleSessionManager.getRuleSession(RuleSessionManager.java:144)
      at com.oracle.determinations.interview.engine.local.LocalInterviewSession.getRuleSession(LocalInterviewSession.java:203)
      at com.oracle.determinations.interview.engine.data.model.InterviewEntityInstanceIdentifier.findEntityInstance(InterviewEntityInstanceIdentifier.java:73)
      at com.oracle.determinations.interview.engine.local.AttributeGoal.getNextScreen(AttributeGoal.java:112)
      at com.oracle.determinations.interview.engine.local.LocalInterviewSession.getNextScreen(LocalInterviewSession.java:222)
      at com.oracle.determinations.web.platform.controller.actions.InvestigateAction.getResource(InvestigateAction.java:65)
      at com.oracle.determinations.web.platform.servlet.WebDeterminationsServlet.doGet(WebDeterminationsServlet.java:112)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at com.oracle.determinations.web.platform.util.CharsetFilter.doFilter(CharsetFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
    Thanks,
    Vinay

    Vinay,
    When working in an Interview Engine event handler, you need to use Interview Engine objects to set values. Have a look at the example "Use the OnInterviewSessionCreatedEvent to pre-seed data into a newly created session" in the "Oracle Policy Automation Developer's Guide"
    Your code should look something like:
    // get the globalInstance from a new InterviewUserData;
    InterviewUserData data = new InterviewUserData();
    InterviewEntityInstance globalInstance = data.getGlobalInstance();
    // set the test_start_time
    Date start_date = new Date();
    globalInstance.setValue("test_start_time", start_date );
    // submit the data to the Interview session.
    TransactionResult result = session.submit(data);
    Hope this helps.
    Cheers
    Frank

  • Setting parameter value using hyperlink

    I have a jsp search page which shows records in an html table. In each table row I have the id of the record. I would like to use this id value as a hyperlink and set the value of a hidden field to the id and then submit the form. my idea is to open a new page showing all the details of the specified record by the id which is sent as a parameter from the search page as soon as I click the id hyperlink. I am trying to use javascript, but I am a bit green in this area. I would appreciate any help.

    You could easily do this with JSPs, HTML and JSTL - there's no need for JavaScript in this case.

Maybe you are looking for