Set new value for VO attribut

I have function in package on database which is param is String and return value is also String(VARCHAR2).
That function calculate some field on db and return a result.That is OK
I made VO in my AM.
"SELECT package_name.func_name("string") from dual" and that is OK also.
When I start that module I recive valid result from database based on string which I passed to function.
And that works fine.
Question :
How can I change value or how can I set new value for the package_name.func_name(variable) in VO
during runtime in my application ? ^^^^^^^^
JDeveloper 9.0.3.988

I have function in package on database which is param is String and return value is also String(VARCHAR2).
That function calculate some field on db and return a result.That is OK
I made VO in my AM.
"SELECT package_name.func_name("string") from dual" and that is OK also.
When I start that module I recive valid result from database based on string which I passed to function.
And that works fine.
Question :
How can I change value or how can I set new value for the package_name.func_name(variable) in VO
during runtime in my application ? ^^^^^^^^
JDeveloper 9.0.3.988 1. When using stored procedures it would be better to use it in following way:
Connection conn = //get it some how
CallableStatement cs = conn.prepareCall("{call myPackage.do_something(?)}");
cs.registerOutParameter(1, java.sql.Types.VARCHAR);
cs.execute();
2. You could parameterize it like this:
CallableStatement cs = conn.prepareCall("{call " + packageName "." + funcName + "(?)}");
cs.registerOutParameter(1, java.sql.Types.VARCHAR);
cs.setString(1,"someString");
cs.execute();
String result = cs.getString(1);
where packageName and funcName are defined elsewhere
--hery

Similar Messages

  • How to set new value for the existing jar file

    Help:
    I am wondering if there is a simple to update value for Manifest-Version in a existing jar file?
    Thanks!

    The jar command's -u option is about as easy as I know.
    See the jar command documentation for the details.

  • Need help in Setting a value of an attribute

    Hi,
    I have a requirement where i need to set a value for an attribute in duplicate popup.
    I am able to retrieve the current values with the method
    o_partner->get_properties( IMPORTING es_attributes = x_attributes ).
    After fetching the value, i am programatically setting 
    x_attributes-Soldto = 'X'.
    o_partner->set_properties( exPORTING is_attributes = x_attributes ).
              lv_collection1->add( o_partner ).
              lr_core = cl_crm_bol_core=>get_instance( ).
              lr_core->modify( ).
    I am not sure, what is missed out in my logic but the value is not shown on WEB UI.
    Any pointers will b of gr8 help.
    Thanks,
    Udaya

    Got the solution from other source

  • Set init values for Edit Form

    Hi!
    I'm using JDev 10.1.3+ADF+Struts
    I have some attributes in viewObject, and have related bindings in PageDef. I whant to set init values for that attributes in 2 cases:
    1. Edit Form doesn't contain fields for entring attribute value.
    For example:
    Current_User
    Creation_Date
    etc.
    2. Edit Form contain fields for entring attribute value. And i want that input fields display my init values.
    The purpose is to perform it in onCreate event in PageController.
    But i don't know where to put my values.
    Any help will be appriciated!

    Thank you very much!
    Maybe my question is not so clear.
    I mean, when we call event=Create i need to set values, but before Submit/Commit the Row in viewObject is not exist.
    So I founded solution for this issue - to set my values in method 'create' of Entity Object.
    I have another big problem i confused with. Would you help me, please?
    Description is here:
    Database Constraint Error Handling on create/edit (Struts ADF)

  • Set new smartforms for Plant

    Hi All,
    I have new plant, When  I create new smartform, but a don know how to assigned new form to that plant ?
    Please help me do it !

    I have function in package on database which is param is String and return value is also String(VARCHAR2).
    That function calculate some field on db and return a result.That is OK
    I made VO in my AM.
    "SELECT package_name.func_name("string") from dual" and that is OK also.
    When I start that module I recive valid result from database based on string which I passed to function.
    And that works fine.
    Question :
    How can I change value or how can I set new value for the package_name.func_name(variable) in VO
    during runtime in my application ? ^^^^^^^^
    JDeveloper 9.0.3.988 1. When using stored procedures it would be better to use it in following way:
    Connection conn = //get it some how
    CallableStatement cs = conn.prepareCall("{call myPackage.do_something(?)}");
    cs.registerOutParameter(1, java.sql.Types.VARCHAR);
    cs.execute();
    2. You could parameterize it like this:
    CallableStatement cs = conn.prepareCall("{call " + packageName "." + funcName + "(?)}");
    cs.registerOutParameter(1, java.sql.Types.VARCHAR);
    cs.setString(1,"someString");
    cs.execute();
    String result = cs.getString(1);
    where packageName and funcName are defined elsewhere
    --hery

  • New Format for creating Attribute Sets.

    Hi,
    In SAP CRM webclient ui 7.0 there is a new format for creating Attribute Sets. The format is 'value table'.
    On selecting Format=Value Table the field 'Table' comes up.
    There is a message: Here you can enter a table that contains all the values you want to use. This is particularly useful for attributes with a lot of values or if you want to enter multiple attributes with the same values. The table must be a check table with a search help.
    Do I need to create a table with all the fields in in marketing attribute assignment block with search help on attributes field.
    Can you please guide as to how I should go about this issue.
    Regards,
    John.

    Hi John,
    The Attribute Set of Format type 'Value Table' is for the Mutiple Attribute Sets. These can be either a Single Attribute Set with Multiple values or the Multiple Attribute Sets with One value.
    You can include all such marketing attributes into one table which is a check table with search help. and use this as the Value Table.
    Hope this helps you out!
    Regards
    Veena.

  • How to set a new value for formula field in crystal reports xi?

    <p>How to set a new value for formula field in crystal reports xi?</p><p>//formula</p><p>{@description}</p><p> </p><p>exemplo in VB6</p><p>crxSubreport.FormulaFields.Item(1).Text =  "&#39;Subreport Formula&#39;"  or</p><p>crxSubreport.FormulaFields.Item("description").Text =  "&#39;Subreport Formula&#39;"</p><p>How to in JRC?</p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p>

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • How to save a new value for Set command variable

    I am using SET [variable = [String]] to update Set variable. It works fine. But when I restart MSDOS Prompt, I get old value for variable.
    How to save a new value for SET command variable?
    I am using Windows XP.

    And this has to do with java how?

  • Is there any way we can set default value for a Date Attribute to current date in Master Data Services

    Is there any way we can set default value for a Date Attribute to current date in Master Data Services.
    I as well wants to know that is there any posibility to show Calendar control while input data into respective date attributes.
    Thanks.

    Hi Anagha,
    So far i havent found any way to set todays date by default from MMI, but i guess this flow should work as workaroud
    1. Add buisness rule which can set a default value when Date = NULL/Blank
    2.get the entity table ,use -select EntityTable from mdm.tblEntity where Name = '<enter entity name>'
    3.Go to that table and add a after update trigger like
    if uda_<entityid>_<attributeid(Date attribute)> = default value
    update uda_<entityid>_<attributeid(Date attribute)> =getdate() where id = <LastUpdatedRow>
    I will check on this too from my side.
    By the way AFAIK i dont think so calendar control integration is possible .

  • Setting null values to view.attributes

    Hi all, I am getting following NPE posting form to server. Below I m writing snippet of code which causes the issue:
    SEVERE: value is null for a not available property: test
    java.lang.NullPointerException: value is null for a not available property: test
         at javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.java:303)
         at javax.el.MapELResolver.setValue(MapELResolver.java:90)
         at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:69)
         at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:180)
         at org.apache.el.parser.AstValue.setValue(AstValue.java:158)
         at org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
         at org.apache.jasper.el.JspValueExpression.setValue(JspValueExpression.java:85)
         at javax.faces.component.UIInput.updateModel(UIInput.java:287)
         at javax.faces.component.UIInput.processUpdates(UIInput.java:214)
         at javax.faces.component.UIForm.processUpdates(UIForm.java:99)
         at org.ajax4jsf.component.AjaxViewRoot$2.invokeContextCallback(AjaxViewRoot.java:424)
         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:240)
         at org.ajax4jsf.component.AjaxViewRoot.processUpdates(AjaxViewRoot.java:440)
         at org.apache.myfaces.lifecycle.UpdateModelValuesExecutor.execute(UpdateModelValuesExecutor.java:33)
         at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
         at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:151)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         at java.lang.Thread.run(Unknown Source)My Jsp Page code snippet:
    <t:selectOneMenu value="#{view.attributes['test']}">
         <f:selectItems value="#{myController.listValues}"/>
    </t:selectOneMenu>MyController.java bean property:
    public List<SelectItem> getListValues() {
              listValues.clear();
              SelectItem si = new SelectItem("", "-Select-");
              SelectItem si2 = new SelectItem("1", "1");
              SelectItem si3 = new SelectItem("2", "2");
              listValues.add(si);
              listValues.add(si2);
              listValues.add(si3);
              return listValues;
         }When user selects nothing, I need to set NULL value for this drop down. Kindly suggest if there is any other way or best practice to do the same.I am using Myfaces 1.2.5 for JSF 1.2. This thing was working fine in Myfaces 1.1.5 for JSF 1.1.Any suggestions?

    Give this a try:
    <t:selectOneMenu value="#{view.attributes['test']}">
            <f:selectItem itemLabel="-Select-" />
         <f:selectItems value="#{myController.listValues}"/>
    </t:selectOneMenu>
    public List<SelectItem> getListValues() {
              listValues.clear();
              listValues.add(new SelectItem("1", "1");
              listValues.add(new SelectItem("2", "2");
              return listValues;
         }Note: I cleaned up your getListValue() a bit - most of the changes are cosmetic except for removing you '-Select-' selectItem. Also, why do you use a class level variable if you are generating it on each call? Either generate the list on constructor call (or when needed) and just return it from getListValues(), or simply use a local variable.

  • Unable to set new values in Entity

    Hi Experts,
    I am trying to change an entity from readonly to changeable and set property of an attribute. But, i am not successful. In the below "If ME->IS_CHAN......" condition, the second condition is not successful and it doesnot let the entity to change. I am not sure, from where the data is getting filled for "ME->CONTAINER_PROXY->DATA_REF->ATTRIBUTE_REF". Can someone please point me the solution ?
    Thanks in advance.
    method IF_BOL_BO_PROPERTY_ACCESS~SET_PROPERTY .
      data: LV_IDX       type CRMT_IDX,
            LV_PROPS_OBJ type ref to IF_GENIL_OBJ_ATTR_PROPERTIES.
      field-symbols: <DATA>  type any,
                     <VALUE> type any.
      MAKE_VALID_STATE( ).
      assign ME->CONTAINER_PROXY->DATA_REF->ATTRIBUTE_REF->* to <DATA>.
      assign component IV_ATTR_NAME of structure <DATA> to <VALUE>.
      if SY-SUBRC = 0.
    *   check changeability of property
        LV_PROPS_OBJ = ME->CONTAINER_PROXY->GET_ATTR_PROPS_OBJ( ).
        try.
            LV_IDX = OBJECT_MODEL->GET_ATTR_IDX_BY_NAME(
                                 IV_OBJECT_NAME = ME->MY_INSTANCE_KEY->OBJECT_NAME
                                 IV_ATTR_NAME   = IV_ATTR_NAME ).
            if ME->IS_CHANGEABLE( ) = ABAP_TRUE and
               LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY.
              if <VALUE> ne IV_VALUE.
                if ME->MY_MANAGER_ENTRY->DELTA_FLAG is initial.
    *             first 'change' -> proof that entity is locked
                  if ME->MY_MANAGER_ENTRY->LOCKED = FALSE.
                    if ME->LOCK( ) = FALSE.
                      return.
                    endif.
                  endif.
    Edited by: Gaurav Subramaniam on Jun 2, 2011 5:30 PM
    Edited by: Gaurav Subramaniam on Jun 2, 2011 5:31 PM

    Hi Gaurav,
    As already mentioned your entity is set to READ-ONLY mode at GenIL level. Hence, the following line returns READ-ONLY :-
    LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY.
    This is set at GenIL level in the GenIL class. Hence, you'll have to find the GenIL class and look for method - SET_ATTR_PROPERTIES. Here you will find code that sets mode (changeable / readonly) each attribute.
    Follow below steps :-
    - Create a Zclass and inherit it from the above class.
    - Redefine the above method.
    - Set attributes to changeable mode.
    Here is a sample code :-
      DATA: lv_attr_props       TYPE REF TO if_genil_obj_attr_properties.
    * First get the property object
      lv_attr_props = iv_object->get_attr_props_obj( ).
      lv_attr_props->set_property_by_name( iv_name  = 'Field1'
                                           iv_value = if_genil_obj_attr_properties=>changeable ).
      lv_attr_props->set_property_by_name( iv_name  = 'Field2'
                                           iv_value = if_genil_obj_attr_properties=>changeable ).
    Alternatively you can set attribute properties for all fields at once :-
    * set property 'changeable' for all attributes
      lv_attr_props->set_all_properties( if_genil_obj_attr_properties=>changeable ).
    Thanks,
    Ashish

  • How to Set default value for taxonomywebtagging control with terms and nested terms

    Hi,
    I have created taxonomy control in custom aspx page and I am able to select terms but I am trying to setup default value to that control.
    Can anybody let me know how to set the default value for TaxonomyWebTagging control in custom.aspx page with nested terms?
    Any help would be greatly apprecited.
    Control code in aspx page:
    <td>
    <asp:Label runat="server" ID="lblLanguages">Field A: </asp:Label><asp:Label runat="server" ID="rfvlblLanguages" CssClass="errorMsg" ForeColor="Red">*</asp:Label>
    </td>
    <td>
    <Taxonomy:TaxonomyWebTaggingControl ID="term" Width="385px" runat="server" /></td>Mapping metedata code:TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    //Set the Business Unit Field
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GROUPName"];
    TermSet termSet = group.TermSets["TERMSETNAME"];
    Term term = termSet.Terms["TermA"];
    Guid termGuid = term.Id;
    term.SspId.Add(termStore.Id);
    term.TermSetId.Add(termSet.Id);
    term.AllowFillIn = true;
    term.AnchorId = countryGuid;
    term.IsMulti = true;
    Thank you.
    AA.

    Hi,
    According to your description, you want to set default value for TaxonomyWebTaggingControl.
    I have a test in my environment. It could be achieved by setting the Text Property of TaxonomyWebTaggingControl.
    Here is the code snippet:
    TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GroupA"];
    TermSet termSet = group.TermSets["A"];
    Term term = termSet.Terms["A1"];
    TaxonomyWebTaggingControl1.SspId.Add(termStore.Id);
    TaxonomyWebTaggingControl1.SSPList = termStore.Id.ToString();
    TaxonomyWebTaggingControl1.TermSetId.Add(termSet.Id);
    TaxonomyWebTaggingControl1.TermSetList = termSet.Id.ToString();
    TaxonomyWebTaggingControl1.AllowFillIn = true;
    TaxonomyWebTaggingControl1.IsAddTerms = true;
    TaxonomyWebTaggingControl1.IsMulti = false;
    TaxonomyWebTaggingControl1.Text = string.Format("{0}|{1}", term.Name, term.Id.ToString());
    Here is a detailed article for your reference:
    http://blog.bugrapostaci.com/2010/09/23/taxonomywebtaggingcontrol-sharepoint/
    Feel free to Reply the test result.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • How to set default values for boolean columns

    I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
    I've tried to set default value at column level:
    <Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
    Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
    <Default>TRUE</Default>
    </Field>
    and at content type level:
    <FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
    But in any case, when i create a new item with this content type, default value is applied.
    Can anyone tell how to set default values for boolean columns?
    Thanks in advance,
    Regards,
    Sergio

    In the field definition you can set
    <Default>1</Default>
    or
    <Default>0</Default>
    How to set the default value Null?

  • How to set default value for vc2_255_arr in plsql parameter directive?

    Hi,
    I would like to set a default values for a plsql parameter which is of vc2_255_arr type. How to do that?
    Below is the example from PL/SQL Server Page.
    +" To set a default value, so that the parameter becomes optional, include a default="expression" attribute in the directive. The values for this attribute are substituted directly into a PL/SQL statement, so any strings must be single-quoted, and you can use special values such as null, as in the following example:+
    +<%@ plsql parameter="p_last_name" default="null" %> "+
    My plsql parameter is p_arr which is of "TYPE vc2_255_arr IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER"
    *<%@ plsql parameter="p_arr" type="PMP_LIB.VC2_255_ARR" %>*
    Thanks in advance!
    kwong

    My plsql parameter is p_arr which is of "TYPE vc2_255_arr IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER"You need to declare it in a package specification and initialize in the package body:
    SQL> create or replace package pmp_lib
    as
       type vc2_255_arr is table of varchar2 (255)
                              index by binary_integer;
       vc2_255_arr_default   vc2_255_arr;
    end pmp_lib;
    Package created.
    SQL> create or replace package body pmp_lib
    as
    begin
       vc2_255_arr_default (1) := 'abc';
       vc2_255_arr_default (2) := 'def';
    end pmp_lib;
    Package body created.
    SQL> declare
       arr   pmp_lib.vc2_255_arr := pmp_lib.vc2_255_arr_default;
    begin
       for i in 1 .. arr.count
       loop
          dbms_output.put_line (arr (i));
       end loop;
    end;
    abc
    def
    PL/SQL procedure successfully completed.so in your case it would probably be sth like (assuming pmp_lib is a package):
    <%@ plsql parameter="p_arr" type="PMP_LIB.VC2_255_ARR" default = "PMP_LIB.vc2_255_arr_default" %>

  • How to define a Value for an Attribute of an Class

    Hi,
    How to define a Value for an Attribute of a Class ...
    ( I need to change the value of an Attribute of a class in standard program ....
    Ex...
       cl_hrce_masterswitches=>infotype_framework_is_active
    Here infotype_framework_is_active is the attribute .. its value in standard program is 'X'... Now i need to change it as '  '.
    How to define it and set value as ' '.

    Hello Surendar
    The static attribute INFOTYPE_FRAMEWORK_IS_ACTIVE is read-only and there is not SETTER method to manipulate its value.
    However, the attribute is filled in the CLASS_CONSTRUCTOR:
    METHOD class_constructor.
        IF ce_is_active                 = true OR
           global_payroll_is_active     = true OR
           mngmt_global_empls_is_active = true.
          infotype_framework_is_active = true.
          perid_infotype_is_active     = true.
        ELSE.
          infotype_framework_is_active = false.
          perid_infotype_is_active     = false.
        ENDIF.
    ENDMETHOD.
    Thus, you need to analyze how attribute CE_IS_ACTIVE, GLOBAL_PAYROLL_IS_ACTIVE and MNGMT_GLOBAL_EMPLS_IS_ACTIVE are filled in the CLASS_CONSTRUCTOR.
    For sure you will find customizing settings that are responsible for this.
    Regards
      Uwe

Maybe you are looking for

  • IPhone 2.0 software and Bluetooth

    I am sooo disappointed in the new software. I've successfully used my first generation iPhone with software 1.1.4 with my new Dodge uConnect system ($1,500 sound and bluetooth). Until today. Upgraded my iPhone to version 2.0. Upgrade failed and got r

  • My Itunes wont work,

    It says it's missing some dll file and to re-download. Tried that four times, it won't finish.. help, I don't speak tech

  • How to Call Scapscript program in bapi

    Hi All there, wanted to call a sap-script program in a bapi  my coding is line FUNCTION ZBAPI_ZDIPNB. ""Local interface: *"  EXPORTING *"     VALUE(HTML_STRING) TYPE  STRING *"  TABLES *"      SELTAB STRUCTURE  RSPARAMS *"      HTML_REPORT STRUCTURE 

  • "Same as Input" mapping no longer works in 2.1.1.

    I have "tap tempo" mapped at the concert level to C3. On certain patches I actually want to play a C3 note and hear it. Every time I try to override the concert mapping at the set or patch level the "same as input" option no longer works. It simply c

  • FPS drop when using movie clips.

    Hello, first of all excuse my English it's not my main language. I'm working with a portfolio in Flash CS4 (actionscript 2.0 if that would matter). The portfolio has buttons, each button is connected to a movie clip, so when you press the button a mo