How to set a default value to t-list when creating t-list programmatically

hi,
I'm creating a t-list programmatically
by calling
n = populate_group('groupname');
populate_list('form.list','groupname');
In this case how to set a default value for the t-list
thanks
rani

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.

Similar Messages

  • SRM 4.0- How to set the default values for product type (01) only for SC

    The radio button “Service” should not be visible.
    Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
    How to set the default values for product type (01) only for SC
    We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
    Here we can set defalut value 01 but it is not correct one since same search help is using several places.
    We need to limit the search help results only for SC.
    Kindly help out me ASAP.

    The easiest way to set defautl values is to edit the batch class.
    Goto the characteiristic and go to update values.
    In here you probably have something like 0 - 100 as a spec range.
    On the next line enter the default value within this range.  At the end of the line, click in the box in the column labelled "D".  This indicates the defautl value for the characteristic.
    If you need to you can do this in the material classification view as well.
    Just to be clear, these values will only show up in the batch record.  You can not have defautl values in resutls recording screens.
    FF

  • 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 Default Value in the drop down on Account Creation ?

    Hi,
    i have to set a default value in the drop down as soon as a User in a particular business role clicks on New Account. I have written the following code in do_prepare_output method. But this code is executed in the 2nd server round trip after entering some value or pressing enter. so i am not getting as soon as user clicks on the New Account.
    How to set that default value when user clicks on New Account ? and where should i code ?
      IF lv_icwc_profile = 'ZCSALESPRO' or lv_icwc_profile = 'Z_SALESPRO' .
      try.
                  lr_entity ?= me->typed_context->header->collection_wrapper->get_current( ).
                  lv_current = lr_entity->create_related_entity(
                                                  iv_relation_name = 'BuilRolesRel' ).
                                 lv_current->set_property(
                                    iv_attr_name = 'PARTNERROLE'
                                    iv_value     =  'BUP002' ).
                   CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
                   cx_crm_genil_model_error.
                   return.
            ENDTRY.
    Thanks and Regards
    Raman Khurana

    Hi,
    I have some idea abt it, it is also used in account life cycle.
    Please refer SAP note 1097651, Defaulting a life cycle stage.
    Let me know if useful.
    rgds,
    Vinay

  • How  to set a Default Value  in Combobox

    Dear All,
    I want to set a default value in a combobox  when open the form. How can I set that?
    Default value : It is one of the options of the combobox.

    Im doing it as
      If BusinessObjectInfo.FormTypeEx = "150" And BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD Then
                oForm = SBO_Application.Forms.GetFormByTypeAndCount(BusinessObjectInfo.FormTypeEx, 1)
                Dim vepcombo As SAPbouiCOM.ComboBox
                Dim vepitem As SAPbouiCOM.Item
                vepitem = oForm.Items.Item("24")
                If vepitem.Enabled = True Then
                     vepcombo = vepitem.Specific
                    vepcombo.Select(10, SAPbouiCOM.BoSearchKey.psk_Index)
                End If
            End If

  • How to set a default value in Select one choice.

    Hi
    I'm using ADF BC, in that how to set a default value in select one choice.
    pls. help on this.
    regards

    set the default value on the underlying EO or VO attribute
    john

  • How to set a default value for particular field in SRM PO Portal

    Dear Gurus,
    Im desparetly need a help in web dynpro on how to set a default value for a field(flag) in PO header tab in portal.
    My requirement is whenever the user press the edit button in PO screen,automatically a flag field should be set as abap_false.
    I dont think this will handle in check badi or change badi. i tried this part in onbuttonpressed overwriteexit in CNR_VIEW views,i can get the function EDIT in debugging mode,but dont know how to proceed further.....
    Many of them suggested to go with get attribute and set attribute for changing any particular field in web dynpro,but im not very familiar in using those get and set attributes.I request you people can give me sample code on how to identify my target field in the node and set the values while pressing EDIT Button.
    Thanks in advance...
    Regards,
    Sathish

    Dear Laurent,
    Thanks for your response,
    But i searched in enhancement spot of WD_BADI, but couldnt get the exact way to change the coding,
    My real requirement is, that particular flag should be enable and disable dynamically by checking a condition in my header values.So in that case i dont know how to proceed further to handle in the PO screen.
    Kinly guide me how to get the particular node of field in the Purchase order screen.
    Thanks you in advance,
    Sorry for the inconvenience if any
    Regards,
    sathish

  • 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 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 the default value in dashboard prompt?

    Hi there,
    In my Dashboard prompt I'm getting values like:
    Mar 2010
    Apr 2010
    May 2010
    Jun 2010
    How to set the default value to the current month (Jun 2010). I don't want to use "specific value". I want to use the "SQL Result" for populating the default value.
    Appreciate your help

    hi,
    you can create a Repository variable current_month with the expression as
    select to_char(trunc(sysdate),'Mon')from dual
    and use this in the prompt "Default to" Server variable and use this repository variable.
    hope this helps.
    cheers,
    vineeth

  • How to set a default value in my DropDown using the key  ?

    Hello All,
      Can someone advose how I can achieve the above ? I will like to know how to select a default value for the dropdown by key using the key value instead of description.
      The reason why I need to do so instead o fusing description is because my application will populate the dropdown using web services based on the language selection. Hence, if I were to set the default value using description, den other languages will not work anymore.
      Any help will be greatly appreciated. Thank you !!
    from
    KWok Wei

    Kwok,
    Assuming that:
    1. You have a node NodeX, where attribute TargetAttr defined
    2. You have a DropDownByKey UI control, its property selectedKey bound to NodeX.TargetAttr attribute
    Then:
    Place in your code:
    wdContext.currentNodeXElement().setTargetAttr("yourKey");
    VS
    P.S. This topic was raised several times, and forum search works good enough to find an answer

  • How to set a default value in a dropdownlistbox

    Hi,
    In CRM 2007 WEBUII have created a dropdownlistbox (ddlb)  filled with currency codes.
    Now I want the default value of the ddlb to be the currency of the country of the loggedin user, ie : 'EUR'
    Anyone an creative idea how I can achieve this ?
    In first place I need to know how I can set a default value of a ddlb.
    --> ddlb type ref to CL_CRM_UIU_DDLB.
    regards,
    Abjuh

    Hello Wolfgang,
    If the method does not exist yet, you can create it in your enhanced (Z) context node.
    Definition:
    ATTRIBUTE_PATH Importing     Type                  STRING
    ITERATOR          Importing           Type Ref To     IF_BOL_BO_COL_ITERATOR
    VALUE                    Returning        Type                  STRING
    Implementation:
    method GET_BP_GROUP.
        DATA: current TYPE REF TO if_bol_bo_property_access.
        DATA: dref    TYPE REF TO data.
        if iterator is bound.
          current = iterator->get_current( ).
        else.
          current = collection_wrapper->get_current( ).
        endif.
      TRY.
        TRY.
            dref = current->get_property( 'BP_GROUP' ). "#EC NOTEXT
          CATCH cx_crm_cic_parameter_error.
        ENDTRY.
        CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
              cx_crm_genil_model_error.
          RETURN.
      ENDTRY.
        IF dref IS NOT BOUND.
          value =''
          RETURN.
        ENDIF.
        TRY.
            value = if_bsp_model_util~convert_to_string( data_ref = dref
                                        attribute_path = attribute_path ).
          CATCH cx_bsp_conv_illegal_ref.
            FIELD-SYMBOLS: <l_data> type DATA.
            assign dref->* to <l_data>.
    *       please implement here some BO specific handler coding
    *       conversion of currency/quantity field failed caused by missing
    *       unit relation
    *       Coding sample:
    *       provide currency, decimals, and reference type
    *       value = cl_bsp_utility=>make_string(
    *                          value = <l_data>
    *                          reference_value = c_currency
    *                          num_decimals = decimals
    *                          reference_type = reference_type
            CONCATENATE <l_data> '-CURR/QUANT CONV FAILED-' INTO value
                        SEPARATED BY space.                 "#EC NOTEXT
          CATCH cx_root.
            value = '-CONVERSION FAILED-'.                  "#EC NOTEXT
        ENDTRY.
        if value is initial.
         value = 'Your default value'.
        endif.
    endmethod.
    Regards,
    Fabian

  • How to set a default value in a DateTime field?

    Hi!, how do you set a default value in a DateTime field in a user table to the value of "today"?
    Thank you!

    It's in SAP Business One 2007, in User-Defined-Fields, under User Tables, Iam trying to add a field to a Table I created in the User-Defined-Tables-Setup menu.
    I click Add then type the field name, description and then I select the Type, which is DateTime, then the SelectDefault Value For Field get's grayed out.
    Thank you!

  • How to set a default value of " " for a VARCHAR2 in ER diagram?

    Hi,
    I am trying to set the default value of a VARCHAR2 attribute to " " (space) in an ER diagram. But it just thinks I don't want anything for the default value. If I specify CHR(32) will it work? or is there another way? Will I have to wait until I get into the server model to do this, if so how do I do it there?
    thx
    adam

    Are you sure you want the default to be a space, not a NULL? VARCHAR2 fields want to trim spaces from the right, which makes them NULL if they started as all spaces. You can force them to accept spaces, but it is an unnatural condition. Even the VARCHAR2 columns that I use as surrogates for booleans I set as 'Y' for true and 'N' for false, or 'T' for true and 'F' for false. Occasionally, it will be 'X' for selected and NULL for not selected, but the NULLs tend to cause trouble so I avoid them.
    Okay, let's assume that you have a good reason to default to a space. Use ' ', including the single quotes. When you transform to a Table Definition, change the Default Value Type for the column to a Database Function Call. You can't do that in the logical (Entity/Attribute) design, only in the physical (Table/Column). That will make sure that the Server generator will leave it the way you wrote it.

  • How to set a default value to a field in *_BrowEdit.jsp?

    I know that we can use:
    <jbo:AttributeIterate id="def" datasource="<%=dsName%>">
    <jbo:RenderValue datasource="<%=dsName%>"/><br>
    </jbo:AttributeIterate>
    to accept value .
    And now ,I want to set a default value to a filed.
    How to do?

    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

  • Aperture Import window

    With the Aperture import window open and a memory card in a reader, I have at top left two option. One is the select the computer itself as the source and the other is the memory card. If I select the computer, at the bottom of the window I get pane

  • Oracle Stored Procedure Not Accepting Comma delimited values in database

    I have a stored procedure which does the following, declares variables and assigns values retrieved from a parameter temp_table database to each variable, then it reads column headings from a master table. Using the variables assigned to each paramet

  • FB01 uploading problem with posting keys

    Hi Gurus! I created this program to upload the FB01 transaction froma  csv file using 'BAPI_ACC_DOCUMENT_CHECK'. Everything seems to be working fine except for the fact that even when my csv file has the posting key of 31 for the  vendor and 40 for t

  • CSS or MLS for Routing

    I have a pair of 11506 CSS and 4506 switches with sup IV. I would like to use the switch to route because it would provide me with faster route speeds, since it would use MLS and provide me wire speeds instead using the Route Processsor all the time.

  • Adobe Reader doesn't show correct version.

    Adobe Reader doesn't show correct version. How can i check if the current version (10.2.3) is installed?