How to set a date value at netui:hidden/ tag bind to a RowSet item/property through a form bean?

Hi,
I have the following urgent problem.
I created a pageflow which uses a form bean (created with a db control) to insert
values in a table. I overcame the disability to insert date values in the table
by converting this columns to string values in the table. But now I have to insert
a sysdate in a column that holds the row sampled date. How is it possible? I used
javascript without an success.
Code in jsp:
document[getNetuiTagName("myForm",this)][getNetuiTagName("date",this)].value=new
Date();(have used string values too)
<netui:hidden dataSource="{actionForm.sampled}" tagId="date"/>
Code in .jcx file
<xsd:element name="SAMPLED" type="xsd:dateTime" wld:JDBCType="DATE" minOccurs="0"
wld:TableName="theTable" nillable="true">
* </xsd:element>
Code in .jpf file
* <pageflow-object id="formbeanprop:portlets.Career.Submit_CV.Submit_CVController.DatabaseForm#sampled#java.sql.Timestamp"/>
public static class DatabaseForm extends RowSetForm
public java.sql.Timestamp getSampled()
return sampled;
public void setSampled(java.sql.Timestamp newOne)
registerChange("sampled");
this.sampled = newOne;
I have tried to use java.sql.Date too...
Any help would be very appreciated.
Thx,
Vincent

Hi,
Hope You're using the template.fmb.
If  your Custom Form is in INV module, use  'FND_ORG.CHOOSE_ORG;' in the pre-form.
Else Set the org id dynamically,
begin
    MO_GLOBAL.SET_POLICY_CONTEXT(ACCESS_MODE,ORG_ID);
end;
Example:
begin
    MO_GLOBAL.SET_POLICY_CONTEXT('S',101);
end;
S - Denotes that the current session will work for Single Org_id (101)
M - Denotes that the current session will work for Multiple Org_id
Thanks

Similar Messages

  • How to set default date value to a field on screen

    How to set default date value to a field on screen and allow users to modify it ....

    Hello,
    In the PAI module, you need to save the changes to the database using the command MODIFY.
    Follow an example:
    Create or change a message in database table T100. If there is no message with the number 100 in the MYMSGCLASS message class in English, it will be created. Otherwise only the text is changed.
    DATA message_wa TYPE t100.
    message_wa-sprsl = 'EN'.
    message_wa-arbgb = 'MYMSGCLASS'.
    message_wa-msgnr =  '100'.
    message_wa-text =  'Some new message ...'.
    MODIFY t100 FROM message_wa.
    Regards.

  • How to set a attribute value of a sub node binded to a table.. pls respond.

    Hi friends,
    I have context defined like this.
         Head_node ( table 1)
              Item_node ( table 2, sub node ).  ( now this im saving in global internal table).
    so now when i hit save button, im passing my internal table (it has col1- sales order no, col2 item details(table type, which can have more than one record) to a FM, to create sales order.
    My sales order is getting saved.
    But the function module will return some new values (like sales order number, item number etc).
    Now i want these values to be updated in my context.
    Meaning whenever after that i do get_attribute, i should get these new (sales order no, item no ) also.
    I dont know how to set the context values of sub nodes , so im missing these values.
    kindly respond back to me..
    thanks in advance,
    Niraja

    Its very simple.
    Follow these steps. e.g you want to get the new sales order number. Define a attribute in ur node (or set of attributes in ur case as per reqruirement) say new_so_number.
    Check your FM, if its returning new_so_number then it's fine, otherwise you have to change the FM to return the new_so_number or you have to get from db table somehow, which best suites your req.
    So once you have new_so_number after calling the FM, say in lv_new_so_number field. Then write this code to set the attribute (change the variables as per your context attributes)
    DATA lo_nd_head TYPE REF TO if_wd_context_node.
      DATA lo_el_head TYPE REF TO if_wd_context_element.
      DATA ls_head TYPE wd_this->element_head.
      DATA lv_new_so_number LIKE ls_head-new_so_number.
    * navigate from <CONTEXT> to <HEAD> via lead selection
      lo_nd_head = wd_context->get_child_node( name = wd_this->wdctx_head ).
    * get element via lead selection
      lo_el_head = lo_nd_head->get_element(  ).
    lv_new_so_number = new_so_number. " (You got this as a exporting parameter of FM etc..)
    * get single attribute
      lo_el_head->set_attribute(
        EXPORTING
          name =  `NEW_SO_NUMBER`
          value = lv_new_so_number ).
    Hope it works.

  • How to set a date string in a textbox which bind to a Date type datasource

    Hi,
    I found i can't set a default date value in a textbox which bind to a Date type datasource. Even i tried copying a date string which is picked by the calendar date picker and copy the exactly same string into my source code. It just doesn't work and gives me error said "Invalid date value".
    My source code is like this:
                    oEditText = (SAPbouiCOM.EditText)oItem.Specific;
                    oEditText.DataBind.SetBound(true, "", "dtFrom");
                    oEditText.Value = "09/08/2010"; //DateTime.Now.ToString("dd/MM/yyyy");
    Any suggestion?
    Thanks!
    Lan

    Hi,
    oItem = oForm.Items.Item("10")
    oEdit = oItem.Specific
    oEdit.String = Format(Today.Date, "dd/MM/yyyy")
    or
    datestring = oForm.Items.Item("10").Specific.value
    datepass = Left(datestring, 4) & "/" & Mid(datestring, 5, 2) & "/" & Mid(datestring, 7, 2)
    dtDocDate = Date.Parse(datepass)
    Thanks,
    Mahesh

  • SAPUI5 : How to set the date value format for DateTimeInput?

    Hi SAPUI5 experts:
    I'd like ask 2 things regarding the control: sap.m.DateTimeInput
    1: Here is I want to do: show the current date (May 1, 2014) in the control in format as "01-05-2014". But by default the following code shows "May 1 2014". How can I show it as "01-05-2014"?
    var oDateTimeInput = new sap.m.DateTimeInput({});
    oDateTimeInput.setDateValue(new Date());                   //shown as "May 1 2014"
    2. Can someone explain what difference is between the following settings of DateTimeInput?
       ValueFormat
       DisplayFormat
    Please write a short code example.
    Thanks very much in advance!
    Br,
    Dong

    Hi,
    to understand ValueFormat and DisplayFormat, you can refer this example from ui5 testsuite sap.m.DateTimeInput and check the source code.
    in one of the example, this is how valueformat and displayformat is used.
    // free style date value assingment according to valueFormat
                                                    dti3 = new sap.m.DateTimeInput({
                                                                    value : "05-29, 2012",
                                                                    valueFormat : "dd-MM, yyyy",
                                                                    displayFormat : "dd MMMM, yyyy",
                                                                    width : "20%",
                                                                    change : function(e) {
                                                                                    console.log(dti3 + " : " + e.getParameters().newValue + " # " + e.getParameters().newDateValue);
    also in both cases, Default value is taken from locale settings.
    Regards,
    Chandra

  • How to set the date value in textbox

    i want to assign a date value which is fetched from database.the value is not set to that particular textbox

    Dear
    please kindly refer to the following sample:
    Dim oItem As SAPbouiCOM.Item
    Dim oEdit As SAPbouiCOM.EditText
    Select Case pVal.FormType
    Case "60006"
    If (pVal.ItemUID = "Btn1" And
    pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK And _
                        pVal.BeforeAction = False) Then
    oForm = SBO_Application.Forms.Item(FormUID)
    oItem = oForm.Items.Item("EdTxt")
    oEdit = oItem.Specific
    Dim a As String
    a = Microsoft.VisualBasic.Today.ToShortDateString
    oEdit.String = a
    End If
    End select
    best regards,
    xiaodan an
    sap business one forum team

  • How do i get source value in netui:image tag at runtime ?

    Hi i am trying to get the src value in netui:image at runtime. is this possible?
              <pt:getSetting id="imgServer" type="gateway" settingName="<%= GS.PT_IMAGESERVER_URI %>"/>
              <pt:getSetting id="imgBaseDir" type="admin" settingName="imageDirectory" />
              <%
              String imgPath = imgServer + imgBaseDir;
              %>
              <netui:image src="<%=imgPath%>/welcomelogo.gif" onClick="submit()"></netui:image>
              here i am not able to get the src value.
              Any idea on this ?
              Thanks,
              marsha

    Marsha,
              Replase the double quotes " by single '. Here is an example:
              <netui:image
              src ='<%=request.getContextPath()
              + "/resources/down.gif"%>'
              />
              Ariel

  • How to set a clob value to a hidden field

    I have a function returning a clob value . Please let me know if there is a way to set a hidden variable with a clob value.

    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 set a variable value on the BPC Data Manager

    Hello BPC Experts,
    I'm creating a BPC10 NW version demo environment for our prospect customer.
    I made a data manager to import  BW data into BPC model from BW cube.
    I need to import just one month data into BPC from the BW cube that has more than one month data.
    When I run the data package manually, I can select a member of the time dimension prompt and I can import specific month data I want.
    But, in a case where the program (data manager) runs by JOB monthly,
    I can't select a member of the time dimension prompt manually.
    So I want to know how to set a  variable value to the time dimension prompt from a system date etc. automatically.
    Are there any way to set a variable value to the time dimension prompt on the data manager automatically from a system date?
    Or, do you have any other solution to import just one month data into BPC from the BW cube that has more than one month data  by the data manager running on JOB ?
    (without selecting a member of the time dimension prompt of the data package manually)
    Thanks in advance,
    Keisuke

    Hi Gersh
    Sorry for my late reply and thanks for your helpful information.
    I tried the second way of your information and I could configure it.  
    And I 'll try first way of your information.
    Regards,
    Keisuke

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

  • How to set Oracle Data Integrator Timeout paramter value as unlimited

    Hi
    Can any one help me how to set Oracle Data Integrator Timeout (ODI menu>User Paramter>Oracle Data Integrator Timeout > paramter value as unlimited.
    By default it is 30 and i want to change it as unlimited.
    I am connecting linux box through windows using citrix and opened ODI and start the scenario execution (my scenario execution in loop and it will execute continuesly) after execution starts I an logout from citrix (I am not closing ODI) and after some time like 50 min my odi execution is stoped due to timeout.
    my ODI execution should continue in my absence that to unlimited.
    Please help me it is urgent
    Regards,
    Phanikanth

    Thanks Bhabani
    Is it work for unlimited in linux box because I have given operator dispplay limit(0=no limit) as 1000000 and I am unable to see the execution session details on Operator>session list
    later i have changed to 10000 and click on ok and just refreshed and it is working fine
    If I give mensioned below it will not impact on ODI ?
    windows it is working but I have doubt on linux version
    Please help me
    Regards,
    Phanikanth

  • How to set the default value of an item type DATE PICKER to the day of yest

    Hi
    How to set the default value of an item type DATE PICKER to the day of yesterday ?
    Thank you very much !
    Christian.

    Hi Christian,
    Have a look at this thread Re: Default the Date Picker to Today
    It covers this issue in detail.
    Regards
    Paul

  • How to set a default value in dropdown list in Wendynpro ABAP? Help!

    Hi Experts,
           I have Webdynpro for ABAP application that shows a DropdownwithKey UI element.
    1. I am able to populate the dropdown list. But by default the list is not showing any value. Only when I select a value from the list then it shows it.
    So how to set the default value to the first value in the list? Any code sample will be really helpfull.
    I have written the following code:
    method WDDOINIT .
      DATA:
        node_category TYPE REF TO if_wd_context_node_info.
      node_category = WD_CONTEXT->GET_NODE_INFO( ).
      node_category = node_category->GET_CHILD_NODE( 'CATEGORY' ).
      data:    LT_VALUESET type WDR_CONTEXT_ATTR_VALUE_LIST,
               L_VALUE type WDR_CONTEXT_ATTR_VALUE.
    L_VALUE-VALUE      = 'V1'.
    L_VALUE-TEXT    = 'yesterday'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE      = 'V2'.
    L_VALUE-TEXT    = 'today'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE      = 'V3'.
    L_VALUE-TEXT    = 'tomorrow'.
    INSERT L_VALUE into table LT_VALUESET.
    node_category->SET_ATTRIBUTE_VALUE_SET(
                 NAME = 'CAT_VALUE'
                 VALUE_SET = LT_VALUESET ).
    endmethod.
    Note that: I am using webdynpro for ABAP.
    Thanks
    Gopal

    I am not sure how it works in Web Dynpro for ABAP, but in Web Dynpro for Java to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element)  in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<defalut value>)
    This generally done in Initialization method of the controller.

  • How to set a object value bound to a session to JavaScript variable

    In a JSP, I store an object value in a HttpSession and I also write a Javascript function to display something on the screen. I need to use the Javascript function to display the object value which is stored in the session. How to set the object value to variable of the JavaScript function. Thanks.

    I write a class JavaScriptHelper to convert the object value to variable of the JavaScript;
    1.get the data to a javabean from database;
    2.convert the data to variable of the JavaScript as a String ;
    3.store the object in a HttpSession or Httprequest ;
    4.use in Jsp get the String (variable of the JavaScript )
    YourBean bean = (YourBean) request.getAttribute("model");
         if (bean != null) out.println(bean .getJsCode())
    convert function,(this is only for the matrix):
    public static String formatJsCode(Vector vector) {
    String sJsCode = "";
    //get js head
    sJsCode = getJsHeader();
    //define js array;
    sJsCode += "var data=new Array();\n";
    Vector v = null;
    String sTemp = "", sLine = "";
    for (int i = 0; i < vector.size(); i++) {
    v = (Vector) vector.get(i);
    sLine = "";
    for (int j = 0; j < v.size(); j++) {
    sTemp = (String) v.get(j);
    //replace " to \"
    sTemp = sTemp.replaceAll("\"", "\\\\\\\"");
    //escape Html Tag
    //sTemp = StringUtil.escapeHTMLTags(sTemp);
    //replace \r\n to <br>
    sTemp = sTemp.replaceAll("\r\n", "<br>");
    if (j != 0)
    sLine += ",";
    sLine += "\"" + sTemp + "\"";
    sJsCode += "data[" + i + "]=new Array(" + sLine + ");\n";
    //get js foot
    sJsCode += getJsFooter();
    return sJsCode;
    public static String getJsHeader(){
    return "<script language=\"JavaScript\">";
    public static String getJsFooter(){
    return "</script>";
    }

  • How to set a date range for date field ?

    Dear Experts,
    Scenario:
    I have a query in validating the date field in my BSP application. My application is for maintain infotype 0023 Other/Previous Employers online by employees in the company.
    As per our design we are maintaining the all employment details of the employee both ( with in the current company / previous employment outside the company) in the same infotype.
    Every employee will have a hiring date within the SAP HR system. We consider this date as the cutoff date between current and previous employment in our application. When the employee updating the details wia BSP page I need to check the following.
    Record inside current company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  greater than or equal HIRING DATE and END DATE(ENDDA) should be greater than FROM  DATE (BEGDA).
    Record outside current Company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  less than or equal HIRING DATE and END DATE (ENDDA) should be greater than FROM  DATE (BEGDA) and less than HIRING DATE.
    Technical Requirement:
    How to set a date range for date field, i.e. how we can limit the date range in a HTMLB date field? Can this it be achieved via standard functionality of HTMLB?
    Following is the code to describe date field in my application.
        <htmlb:inputField id= "ENDDA_NEW_IN"
                          type= "date"
                    doValidate= "TRUE"
                      showHelp= "TRUE"
                      disabled= "FALSE"
                         width= "183"
                         style= "cssTextAreadate"
                         value= "<%='99991231'%>"/>
    Thanks a lot in advance for your assistance and help.
    Cibinu2026
    Edited by: cibin kuruvilla on Nov 12, 2008 11:13 AM

    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>

Maybe you are looking for

  • Attachments not showing when composing emails

    Hello. For some reason I don't know, Mail has suddenly stopped displaying attachments I insert when composing emails. No matter what file type, it displays the Lego cube with the question mark instead of the attachment. (Note: NOT the little blue squ

  • ?can you do hdmi into iMac as a display using an adapter?

    i have a 21.5-inch, Late 2009 imac, and want to try to use it as a display for hdmi connected devices like xbox etc., is there some kind of hdmi adapter to then input to the iMac?

  • Query payment

    hai all Expert hi all experts how to display line customers in the payment in 3 months, and displays invoice date, invoice due date, incoming and average transaction value in 3 months this my query : SELECT T0.[DocNum], T0.[CardName], T0.[DocDate], T

  • Sales Handling unit enhancement

    Dear friends, This is regarding packing handling units in delivery. I have a customized table which is having ready handling units with reference to sales order. I have a requirement to pick these handling units from Ztable and attach to delivery whe

  • How to use the Commission Payable feature?

    Hi all, I need to use the commissions payable feature under products to allocate a % commission to suppliers. the features description looks great, but I can't work out if this feature is actually working. Going by a post from last year it might not