How to assign a default value to a column ?
Hi
In the Object browser is it possible to modifiy a column in order to assign a defalut value to the column ?
I have a table FICHE in which I want to assign a default value 0 to a column which type is NUMBER.
Thank you for your kind answers.
Christian.
Hi Christian
For one reason or the other you can't do that using 'Create Column' or 'Modify Column'. You can only do that by issuing a SQL command : alter table fiche modify column( <column name> default 0)
HTH
Roel
Similar Messages
-
How to assign a default value to a SelectOneChoice
Hi,
I'm working with ADF 11g: WebLogic 10.3 and JDeveloper 11.1.1.3.0.
I wonder how to assign a default value to a SelectOneChoice.
In a ViewObject I have a field defined as Combo Box. Then drawing the combo in my jspx page:
+<af:selectOneChoice value="#{bindings.Circularidad.inputValue}"+
+label="#{bindings.Circularidad.label}:"+
+required="#{bindings.Circularidad.hints.mandatory}"+
+shortDesc="#{bindings.Circularidad.hints.tooltip}"+
+id="soc2">+
+<f:selectItems value="#{bindings.Circularidad.items}"+
+id="si2"/>+
+</af:selectOneChoice>+
Can anyone help me?
Thanks.Assume u have an LOV relation associated with VO attribute.
1. Go to Edit List of Values window
2. Click UI Hints tab
3. Check Include no selection item check box.
4. Select Labeled Item ( First of the list) entry form right combo box.
5. Give ur default value in right text box.
Regards,
Dinil Mithra -
How to assign a default value when there is no prompted value
Dear all,
I create a filter and it's value is relate to a prompt.If the prompt is not fill I found that all record is selected.
How did I assign a default value so that when I didn't fill some value in to the prompt and still can get the result by
the default value I set?
Thanks a lot!Are you using dates for between or some character column?
Post your example.
Instead of between use to is equal prompts, so u will have then 2 fields one for date from a nd one for date to. Everything is the same as I wrote just repeat steps...
You must put 2 separate fields if you are using date between and you want to have default variable for both.
Column formula for the first calendar date prompt:
case when 1=2 then TIMES.TIME_ID else cast ('1.1.1900' as date) end
and for the second:
case when 1=2 then TIMES.TIME_ID else cast ('1.1.2900' as date) end
Now you set up default repository variable for both prompts.
Presentation variable you put in the set presentation variable on each prompt:
p_date_from
p_date_to
And in Answers filter will be like this:
*TIMES.TIME_ID between @{p_date_from}{VALUEOF("rv_test_date_to_char")} and @{p_date_to}{VALUEOF("rv_test_date_to_char")}*
or you can put a different default variables
*TIMES.TIME_ID between @{p_date_from}{VALUEOF("rv_test_date_to_char_from")} and @{p_date_to}{VALUEOF("rv_test_date_to_char_to")}*
I posted similar in my blog:
Date between in filter and title when using presentation variable from calendar dashboard prompt or drop-down list in OBIEE
http://108obiee.blogspot.com/2009/03/date-between-in-filter-and-title-when.html
Regards,
Goran O
http://108obiee.blogspot.com
Edited by: Goran O on 2009.04.23 03:37 -
How to assign the default value to search parameter
Hi Experts,
I am using search view , In this I have 5 parameter lets say Transaction Type, Partner No. etc... Now I want to assign a default value to transaction type ( lets say TA) . User should be able to see this default value in the transaction type field before pressing search button.
How can I do it?
My second problem is: I have configured this search view using configuration tool but I want to assign only one value to transaction type (i.e. user should not be able to add new row in the search criteria for the transaction type by using + sign) but in rest 4 fields he can add new row and search based on that.
Note: I am using only "Is" criteria .
Any pointer will be helpful for me
Thanks and regards,
SandeepHi Sandeep,
For the default search values, here is a solution. You have to redefine the method GET_VALUE1 of the context node
For example if it is the BP search (component BP_HEAD_SEARCH) context node is your enhanced class: ZL_BP_HEAD__MAINSEARCH_CN00
METHOD get_value1.
CALL METHOD super->get_value1
EXPORTING
attribute_path = attribute_path
iterator = iterator
RECEIVING
value = value.
TRY.
* Delegate operation to selection parameter
DATA: current TYPE REF TO if_bol_bo_property_access.
IF iterator IS BOUND.
current = iterator->get_current( ).
ELSE.
current = me->parameter_collection->get_current( ).
ENDIF.
IF current->get_property_as_string( iv_attr_name = 'ATTR_NAME' ) EQ 'XXX'.
IF value IS INITIAL.
value = 'Your default value'.
ENDIF.
ENDIF.
CATCH cx_root.
ENDTRY.
ENDMETHOD.
where XXX is the name of the field.
Default value will then appear in your search field, but you are still able to modify it if you want...
Regards,
Fabian -
How to assign a default value on a Tabular Report?
version 3.2.1
I have a column in a Tabular Report (SQL Query (updateable report) ) that I would like to default to a value every time that the Add Rows button is clicked. This column needs to have the same value for every row.
How do I set a default value on the column?
Thanks,
JoeI've run into the same problem. The 'Default' value isn't even appearing in the form, let alone getting stored.
I'm not 100% certain (I'm still new to Apex too), but I think that the 'Default Type' and 'Default' value fields of the 'Tabular Form Element' might only apply to new records, ie when using the Tabular Form to create new records.
In my case, I'm displaying existing records and I've been trying to enter a default new value for a particular field, ie change the value in the field for existing records from null to today's date. I couldn't get it to work and the more I think about it the more I realise that it is probably not the right way to do it.
One alternative would be to put the SYSDATE into the source SQL (noting that changing an existing tabular form definition would cause an error, so I would have to create a new tabular form). But another (and I think preferable for me) option is to create a trigger that will put the SYSDATE into the field as each record is updated.
Regards,
Peter -
Hi,
In my target table I want to Increment a value and store it in the table ........
the increement shud start frm ...........5001,5002,5003..................etc
How can I achieve this...........?
I created an numeric Variable and in assigned the default as 5000 nad action as Historize.........
In the target Datastore ......I assigned VAR+1.......
but in the Target column I got 5001 for all the columns........
Which way is the best way to deal with the Variables.......
Thanks
AK
Message was edited by:
AK2008Hi Gurusank and Micropole,
Thanks for reply and info.....
I am trying out one of the solutions first........
Gurusank,
I have created a sequence........whether I need to mention the schema and table name ,column.........also ( I gave all the information) and Increement column =1 and saved it .......
Then I follwed the procedure as u have mentioned .....
And in the Target field also I gave the same the same.......for tat column I gave choose (target for execution).
And I directly ran the interface ..........
I got the folowing Error:
287 : 42000 : java.sql.SQLException: ORA-02287: sequence number not allowed here
java.sql.SQLException: ORA-02287: sequence number not allowed here
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Thread.java:534)
Could u plz let me know where I am doing the mistake
Thanks
AK -
How to assign a default value to a query variable
If I create a query, and it contains a variable that I want the user to input, can I also assign a default to that variable which the user will see when they run the query? If they make no selection it would use the default instead of the user input?
ThanksHello Peter - One way might be by using the "CASE" function inside the SQL.
It might be good for you to post your curent SQL here in the forum and a bit more explanation of what you are looking for. That way folks can review and provide suggestions on how to accomplish on how it can be done...
Zal -
How to create a default value of timestamp column?
I am trying to create a table with a default value on a timestamp column, can it be done?
CREATE TABLE myTbl
FutureDateTime date default TIMESTAMP WITH TIME ZONE '2999-12-31 23:23:59.000'
)user1035690 wrote:
I am trying to create a table with a default value on a timestamp column, can it be done?
CREATE TABLE myTbl
FutureDateTime date default TIMESTAMP WITH TIME ZONE '2999-12-31 23:23:59.000'
)Yes, but you don't have a timestamp column, you have a date column.
CREATE TABLE myTbl
FutureDateTime date default to_date('2999-12-31 23:23:59', 'yyyy-mm-dd hh24:mi:ss')
4 );
Table created.
Elapsed: 00:00:00.09
ME_XE?And just in case you weren't aware, storing "end of time" information like this will be rough on your queries (it skewes the cost based optimizers estimates for cardinalities and could wildly throw off the estimates for your queries, resulting in bad plans). You're better off to store NULL values, NULL denoting not known values.
Just an FYI :) -
Assigning a default value to a field
Hello Everyone,
Could you please tell me how to assign a default value to a field in a transparent table, so that while creating an entry even if we don't enter the value, a default value will be assigned.
Thanks,
Anbu.Like this
DATA: BEGIN OF itab OCCURS 0,
field1 TYPE c VALUE 'X'
field2 TYPE c,
END OF itab.
append itab.
append itab.
You will have by default X set in both rows for field1.
Regards
Marcin
PS: Ooops I just noticed you meant transparent table but I wrote about internal one. As long as you maintain that table using maintenance view you can use event 05 - When Creating a New Entry and set fixed value for a field there. So whenever you create new entry it will receive that value.
Edited by: Marcin Pciak on Jun 23, 2010 8:57 AM -
A question about assigning a default value
Hi guys, I have a question about assigning a default value to a Numeric Decision CO. This Co needs 2 parameters to compare with each other. I wanna assign para1 during runtime and para2 during design time, but I have no idea how to assign a default value to para2 during design time. Can anyone help me solve this question? Thx a lot.
BTW I`m searching an article about Time-off example`s "details". I have read several articles about time-off example, but those are not detailed enough. I wanna know about all details of COs. Can anyone forward such article to me, plz. Thx again.^^Hi,
You can assign a default value to the parameter of a callable object.
First attach your CO to an Action.At the action level you can assign default values to the CO Parameters.
Select the action in the design time.
Select the parameters tab for that action.
Select the required paramter. At the top, you can find Default value tab, with that you can assign default value.
I think you can achieve your requirements with Business logic CO better.
[Business Logic CO|http://help.sap.com/saphelp_nwce10/helpdata/en/44/3d3936c5c14a8fe10000000a1553f6/content.htm]
Thanks -
How to set default value in matrix column
Hi all,
Does any one know how to set a default value in matrix column ?. I just want , when an event right click and add row. so i set a default value in a column field for example 'Test'. FYI the matrix is in the UDO.
so my code will be like this
If pVal.ItemUID = "Matrix" And pVal.MenuUID = "1292" Then
Try
Dim oColumn As SAPbouiCOM.EditTextColumn
Dim matrix As SAPbouiCOM.Matrix
matrix = oForm.Items.Item("Matrix").Specific
oColumn = mat.Columns.Item("Code").specific
oColumn.Value = "Test"
Catch ex As Exception
Debug.Print(ex.Message)
Debug.Print(ex.ToString)
End Try
End If
I have run it and when i right click and add row it still can not set the default value in one of the matrx column.
does any one know how to solve it. thanks in advanceHi Bodhi
Sandeep is right you can set value using SetValue() function
If pVal.ItemUID = "Matrix" And pVal.MenuUID = "1292" Then
Try
Dim matrix As SAPbouiCOM.Matrix= oForm.Items.Item("Matrix").Specific
oForm.DataSources.DBDataSources.Item("UDT").Clear()
matrix .AddRow()
matrix .FlushToDataSource()
With form.DataSources.DBDataSources.Item("UDT")
.SetValue("UDF", matrix .RowCount - 1, "Test")
End With
matrix .LoadFromDataSource()
Catch ex As Exception
Debug.Print(ex.Message)
Debug.Print(ex.ToString)
End Try
End If -
Assigning a default value to a user property
Hi everyone,
do you know how can I assign a default value to a user property? It would be great if I should be able to assign it from the administration without writing any code (like profile web services...).
Thank you!
Alberto MarchiaroHi Alberto,
I don't think you can currently do this. In other words you can't set a default value for some object property and have it subbed in when no better value is available.
You can however create a default profile, and set values for the object properties assigned to users (You do this by going to the "Default Profiles" manager). You can then edit the "Default Profile" that is already there (or create a new one), and edit the "Properties and Names". Set the value field to whatever you'd like to be copied by default.
Once done, all new users that are created via a User Synchronization job will have this default profile. The changes will not apply to users that were previously created. If you created a new Default Profile in the Default Profiles Manager, then you need to goto the Authentication Source that you are doing your sync's from and pick which profile you'd like to use for All Groups. You can also create custom Default Profiles for various groups.
Hope this helps,
Akash -
How to insert into default values in onli 1 column of a table
if u create a table with onli 1 column
which can accept a default value of say
only 100.
then how do u actualli enter values into the table.
is there any data dictionary which stores details about default
values of a tableThe default value for a column is the value that will be stored
for that column if you do not provide one in your insert
statement. If you do provide a value, then it will be stored in
the column.
You can query user_tab_columns ( or all_ or dba_)to see the
default value assigned to a column. -
How to pass some default values in all elements which are blank in xslt.
Hi,
Help needed:
Scenario:
After .xslt transformation, there are some elements which are being mapped but left blank. I want to assign some default values to it like '0'. How to do that.
Thanks.One solution would be something like this...
http://remysharp.com/2008/08/15/how-to-default-a-variable-in-xslt/
Or you can use a template like this...
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Title">
<xsl:choose>
<xsl:when test="string-length(normalize-space(.)) = 0">
<Title>default</Title>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>For every empty "Title" node, this template will add <Title>default</Title>... If the Title has value it won't be changed... You can change this to your fields/your defaults... If you need default for other field just add another template in the same transformation...
Cheers,
Vlad -
How to config the Default Values in IT 2006
Dear Gurus,
My Client requirement is if i create Absence quota they want default quotas values
eg PL= 40
CL=7
SL=5
Then how to config the Default Values in IT 2006
Other wise where i have to assign in Quotas limit
Please advised
Regards
MHPOConfigure ur Absence Quotas with Selection group and assign the value of that selection group in Quomo
and run RPTQTA00
Time Data Personnel Time Management IMG Managing Time Accounts Using Attendance/AbsenceRecording and Administration Define Absence Quota Types. Time Quota Types Quotas
PersonnelIMG Managing Time Time Data Recording and Administration Time Management Calculating Absence Entitlements Accounts Using Attendance/Absence Quotas Permit Quota Generation Without TimeAutomatic Accrual of Absence Quotas Evaluation.
Time Time Evaluation Personnel Time Management IMG Set Personnel Subarea Groupings for Time Recording.Evaluation Settings
PersIMG Time Data Recording and Administration onnel Time Management Calculating AbsenceManaging Time Accounts Using Attendance/Absence Quotas Set Base Entitlements Rules for Generating Absence Quotas Entitlements Base Entitlement for Absence Quota Generation.
Personnel TimeIMG Managing Time Accounts Time Data Recording and Administration Management Rules for Calculating Absence Entitlements Using Attendance/Absence Quotas Determine Validity and Deduction Periods.Generating Absence Quotas
IMG Managing Time Data Recording and Administration Personnel Time Management Calculating Absence EntitlementsTime Accounts Using Attendance/Absence Quotas Define Set Base Entitlements Rules for Generating Absence Quotas Generation Rules for Quota Selection.
Define Public Holiday Work Schedules Personnel Time Management IMG Classes
Personnel Work Schedules Personnel Time Management IMG Group Personnel Subareas for the Work ScheduleSubarea Groupings
IMG Group Personnel Subarea Groupings Work Schedules Personnel Time Management Personnel Subareas for theDaily Work Schedule
Daily Work Schedules Work Schedules Personnel Time Management IMG Define Daily Work Schedules
Work Personnel Time Management IMG Define Period Work Schedules. Period Work Schedules Schedules
IMG Define Day Day Types Work Schedules Personnel Time Management Types.
Day Types Work Schedules Personnel Time Management IMG Define Day Types.
Day Work Schedules Personnel Time Management IMG Define Special Days.Types
Work Personnel Time Management IMG Define Employee Subgroup Work Schedule Rules and Work Schedules Schedules Groupings
Work Work Schedules Personnel Time Management IMG Define Groupings for the Public HolidaySchedule Rules and Work Schedules Calendar.
Work Work Schedules Personnel Time Management IMG Set Work Schedule Rules and WorkSchedule Rules and Work Schedules Schedules.
Work Work Schedules Personnel Time Management IMG Generate Work Schedules ManuallySchedule Rules and Work Schedules
IMG Set Planned Working Time Work Schedules Personnel Time Management Default Value for the Work Schedule.
Personnel Time Management IMG Set Default Value for Time Management Planned Working Time Work Schedules Status.
Time Data Recording and Personnel Time Management IMG Define Personnel Subareas for Substitution Substitutions Administration Types.
Time Data Recording and Personnel Time Management IMG Set Defaults for Substitution Types. Substitutions Administration
IMG Absences Time Data Recording and Administration Personnel Time Management Group Personnel Subareas for Attendances and Absence Catalog Absences.
Time Data Recording and Personnel Time Management IMG Define Absence Types. Absence Catalog Absences Administration
IMG Absences Time Data Recording and Administration Personnel Time Management Define Counting Classes for the Period Work Absence Counting Absence Catalog Schedule.
Time Data Recording and Personnel Time Management IMG Rules for Absence Counting Absence Catalog Absences Administration Group Employee Subgroups for Time Quotas.Absence Counting (New)
IMG Absences Time Data Recording and Administration Personnel Time Management Group Rules for Absence Counting (New) Absence Counting Absence Catalog Personnel Subareas for Time Quotas
Time Personnel Time Management IMG Absence Absence Catalog Absences Data Recording and Administration Define Rules for Rounding Counted Rules for Absence Counting (New) Counting Absences
Time Data Recording and Personnel Time Management IMG Rules for Absence Counting Absence Catalog Absences Administration Define Counting RulesAbsence Counting (New)
Personnel TimeIMG Absence Catalog Absences Time Data Recording and Administration Management Define Counting Rules Rules for Absence Counting (New) Absence Counting Deduction rules for Absence quotas
Time Personnel Time Management IMG Absence Absence Catalog Absences Data Recording and Administration Assign Counting Rules to Absence Types.Counting
Personnel TimeIMG Attendances/Actual Working Time Data Recording and Administration Management Define Attendance Types.Times
Time Personnel Time Management IMG Attendances/Actual Working Times Data Recording and Administration Assign Counting Rules for Attendance counting (New) Attendance counting Rules to Attendance Types.
Time Data Personnel Time Management IMG Managing Time Accounts Using Attendance/AbsenceRecording and Administration Define Absence Quota Types. Time Quota Types Quotas
PersonnelIMG Managing Time Time Data Recording and Administration Time Management Calculating Absence Entitlements Accounts Using Attendance/Absence Quotas Permit Quota Generation Without TimeAutomatic Accrual of Absence Quotas Evaluation.
Time Time Evaluation Personnel Time Management IMG Set Personnel Subarea Groupings for Time Recording.Evaluation Settings
Time Data Recording and Administration Personnel Time Management IMG Managing Calculating AbsenceTime Accounts Using Attendance/Absence Quotas Set Base Entitlements Rules for Generating Absence Quotas Entitlements Base Entitlement for Absence Quota Generation.
Personnel TimeIMG Managing Time Accounts Time Data Recording and Administration Management Rules for Calculating Absence Entitlements Using Attendance/Absence Quotas Determine Validity and Deduction Periods.Generating Absence Quotas
IMG Managing Time Data Recording and Administration Personnel Time Management Calculating Absence EntitlementsTime Accounts Using Attendance/Absence Quotas Define Set Base Entitlements Rules for Generating Absence Quotas Generation Rules for Quota Selection.
Maybe you are looking for
-
Import VM - Discover and Register
Hello, I have several VMs in my running_pool that I need to register with OVM Manager 2.2.1 running on OEL 5.5. I was able to import and approve 4 of my machines, but when I attempt to do the rest, I am unable to approve the import. I was able to imp
-
Font size appear reduced from original document?
Hi all-- The fonts appear at least 1/2 pt. smaller in the PDF that I am generating than in the original word document. Is there any way to preserve the size of the original in the PDF output?
-
I received the following message AFTER Firefox had been upgraded on my computer: ''There are known issues with Firefox 7 and Course mail. It is recommended that you do not upgrade to Firefox 7 at this time.'' It is true...there are problems! I want t
-
i Have go a free 1 year subscription to creative cloud as part of a canon promotion for buying a 6D, but I already subscribe to this service, can I still use it?
-
Pause button for Podcast downloads?
iTunes ***** up virtually all available bandwidth and a great deal of processor time and appaently doesn't like to share these resources with other running processes. Exiting iTunes while it is still downloading results in partial files. Question: Is