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.

Similar Messages

  • How to set the default value filters for navigational block in WAD.

    Hi Experts.
    as per the customer requirement . they have bex report we need to convert in to web. but in the bex for one field  they using default filters but am not aware in the WEB reports.
    Please anyone suggest me how to give the default filter values in the navigation block in WAD.
    Thanks
    Ashok

    Hi,
    In the Properties of the Navigation Block pane. Goto WebItem-- Goto List of Characteristics, in that click list it will pop up new window, there enter the required objects wants to be in the default filter area.
    Hope it hleps you.
    Veerendra.

  • 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 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 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 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.

  • 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 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 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 the default value of a database column to NULL

    Hello,
    I want to set the default value of a column (VARCHAR2(20) to NULL, nut I cannot figure out to do this. I tried the following editing the offline table with JDeveloper:
    Default Value : <empty> -> On database NULL
    Default Value: '' -> On database ''
    When I create a new column, there is no default value on the database side and when I open the tabe properties in the database navigator I can see that the default value is (null). This is what I want to see in the other column as well. I don't know why sometimes a default value is visible on the database side (when generating form offline tables to database tables) and sometimes not.
    Perhaps sombody can bring some light in this issue.
    Thanks Thomas

    Hello Shay,
    I have the impression that you don't understand my problem. So here step by step:
    1. Create a offline Table TEST with one column TEST: VARCHAR2(20). nullable=true, no default value.
    2. Generate the table to the database
    3. When you look at the table properties (columns) with the database navigator the following information is displayed (sorry for the formatting):
    Column Name | Data Type | Nullable | Data Default | COLUMN ID| Primary Key | COMMENTS
    TEST | VARCHAR2(20 BYTE | Yes | (null) | 1 | (null) | (null)
    4. Now set the default value for the column TEST in the offline table for example to 'Test'
    5. Generate the table to the database.
    6. When you have a look at the database table, the default value is now 'Test' (as expected)
    7. Now remove the default value of the column TEST in the offline table
    8. Generate the table to the database
    9. When you have a look at the database table, the default value is now NULL (in uppercase letters without parenthesis)
    And this is where the problem starts!
    When you generate the table again with the options "Alter/Manual Reconcile" the default value of the column test is considered to be different! But in fact it should'nt be different because nothing has been changed.
    Best regards Thomas
    Edited by: thmayr on May 28, 2009 9:05 AM
    Edited by: thmayr on May 28, 2009 9:31 AM

  • How to Set A Default Start Time For New Events In Calendar?

    How to Set A Default Start Time For New Events In Calendar?

    John,
    Thanks for that suggestion - could not get it to work. However, I did manage a different approach. I finally determined the sequence of events in terms of how the various events and listeners fire (I think).
    Basically, the CalendarActivityListener fires, followed by the listener associated with the Calendar object's Create facet, followed finally by the CalendarEventListener - the final is where the TriggerEvent is available and then finally, control is passed to the popup/dialog in the Create facet. So, my approach of trying to set/get the TriggerDate in the user's HTTP session was doomed to failure because it was being get before it had been set :(
    Anyway, I ended up adding a bit of code to the CalendarEvent listener - it grabs the current BindingContext, navigates through the DCBindingContainer to derive an Iterator for the ViewObject which drives the calendar and then grabs the currently active row. I then do a few tests to make sure we're working with a "new" row because I don't want to alter start & end dates associated with an existing calendar entry and then I define the Start and End dates to be the Trigger Date.
    Works just fine. Snippet from the listener follows
    BindingContext bindingContext = BindingContext.getCurrent();+
    *if ( bindingContext != null )    {*+
    DCBindingContainer dcBindings = (DCBindingContainer) bindingContext.getCurrentBindingsEntry();+
    DCIteratorBinding iterator = dcBindings.findIteratorBinding("EventsView1Iterator");+
    Row currentRow = iterator.getCurrentRow();+
    if ( currentRow.getAttribute("StartDate") == null)+
    currentRow.setAttribute("StartDate", calendarEvent.getTriggerDate());+
    if (currentRow.getAttribute("EndDate")==null)+
    currentRow.setAttribute("EndDate", calendarEvent.getTriggerDate());+
    *}*

  • How to set a default colour & thickness  for rectangle in preview?

    How to set a default colour & thickness for rectangle(annotation) in preview ? Because every time that I choose for example red and thickness 1 it reverts to orange and 3 next time .

    Doesn't appear to be a default setting. Peruse the webpage for Secrets at http://secrets.blacktree.com/ for a possible setting.

  • How to set a default Billing type for a particular Delivery type

    Dear All,
    How to set a default billing type for a particular delivery type.
    My requirement is, we are creating delivery for a Stock Transport Order. Delivery type is NL and the Purchase order type is UB.
    When we are creating Billing, it should take Billing type "ZSTO" by default, which is the customised Billing type.
    Where we have to do this setting?
    In case of normal sales order, this control will be available in the Sales order document types.
    In case STO, how to set a default billing type for a delivery type (NL).
    Regards,
    Rajesh

    There is a customization available here no default or hard coded
    Normally in a sales doc type we mention which billing type system has to pick
    If the billing happens from a PO which billing type system will take depends on the controls set in the areas mentioned below
    Go to your delivery type OVLK (say your delivery type is NL)
    In that there is a field called default order qty in the order reference tab (say if you maintained DL there)
    This DL is called PSEUDO order type
    Then in VOV8 for DL based on the billing types mentioned ,system will take the billing doc
    For delivery related billing say if you mention say ZF8 in the details of DL in VOV8(provided you have created ZF8)
    Then while you bill the delivery doc of NL system will take ZF8
    For intercompany delivery you can create ZIV billing type also Pure customization
    PO is linked to delivery type ( MM spro settings)--Del type linked to order (pseudo) type---in order type (pseudo) we mention the billing types. Here the flow is bit different that pure SD flow
    Though the invoice is crated by manually putting customized Biiling Type and A/Cing doc also generated, but in the VF04 still system shows the same deliveries pending with Billing Type (F2).
    This manual is not reqd if the said assignments are done properly
    Hope it can assist you.
    Thanks & Regards
    JP
    Edited by: J Prakash on Jun 23, 2010 4:05 PM

  • 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

Maybe you are looking for