How to set Default value of a parameter to display Current Date
I need to display the Default value for my parameter 'As of Date' which is of datatype Date as Current Date[DD-MON-YYYY].
How can I do This??
As Tamir-L pointed out, there is no direct way to do this, but there is a workaround:
First, create a new parameter, but do not base it on any item. Give the parameter a default value of "Today".
Then, create a condition like:
( :myParam = 'Today'
AND <date_item> = sysdate)
OR ( <date_item> = to_date(:myParam, 'DD-MON-YYYY'))Where :myParam is the parameter you created, and <date_item> is the item you are comparing against.
To make things a bit more bulletproof, you could create a calculation that returns sysdate when the parameter is 'Today', a date when the to_date is successful, and NULL when the to_date fails, and use the calculation in the condition.
Similar Messages
-
In flex, How to set a value to one parameter, the parameter
defined in a cffunction in a cfc file, In the cffunction there are
much cfargument, I want set a value to one of them, such as the
cfc:
<cffunction access="remote" name="myShow" output="false"
returntype="struct">
<cfargument name="ID" type="numeric" default=0>
<cfargument name="GoodsID" type="string" default="">
<cfargument name="DestTime" type="string" default="">
<cfargument name="DestCount" type="numeric" default=1>
How I set a value to only parameter one of them , such as set
GoodsID when use mx:remoteObject.
Thanks for your helpGot maybe a solution for you, I have just tested it.
So, the idea is to use intermediate variables. Imagine Var1 and Var2 variables that you refresh with your more or less complicated queries. Then what you can do is to refresh your final variable Var3 with a query using your intermediate variables. Here is an example for Oracle:
select #Var1+#Var2 from dual
This way you can make a chain of dependent variables: Var3 is using Var2 and Var2 is using Var1.
Hope it helps.
Shamil -
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,
SergioIn the field definition you can set
<Default>1</Default>
or
<Default>0</Default>
How to set the default value Null? -
How to set default values in initialization event for select option
Abapers,
I have 3 GL account like 0024831231,0024831238,0024831245.
Please help me how to set default values in select-options ( s_hkont ) in INTIALIZATION event
ThanksSelect option is table <Structure> with fields, low, high, sign & option
you need to append the value into the select option, with appropriate value in low or
example:
S_HKONT-low = <value>
S_HKONT-SIGN = 'I'
S_hkont-OPTION = 'EQ'
append s_hkont.
Default value for select-option also can be added directly in select-option statement.
Regards,
Mahesh -
How to set default values in dialog programming
hi gurus
can anyone suggest me
how to set default values in dialog programming
thanks®ards
kals.it's a bit dirty but I usually just place it in the PBO with a flag for control. It's simple and not too costly i think.
MODULE preRender OUTPUT.
DATA first_time TYPE flag VALUE 'X'.
IF first_time EQ 'X'.
* put your initialization code here
CLEAR first_time.
ENDIF.
ENDMODULE.
-MiR -
How to set default value in OAMessageLovInputBean?
Hi,
How to set default value in OAMessageLovInputBean while loading the page?
I have tried the following code but its not working.
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
String delToLoc = (String)pageContext.getSessionValue("deliverTOLoc");
Number delToLocId = (Number)pageContext.getSessionValue("deliverToLocId");
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject poHeadervo =
(OAViewObject)am.findViewObject("PoHeaderMergeVO");
PoHeaderMergeVORowImpl poHeaderVoRow =
(PoHeaderMergeVORowImpl)poHeadervo.getCurrentRow();
if (delToLoc != null && !"".equals(delToLoc)) {
// poHeaderVoRow.setShipToLocation(delToLoc);
OAMessageLovInputBean msb = (OAMessageLovInputBean)webBean.findIndexedChildRecursive("DefaultShipToLocation");
msb.setValue(pageContext,delToLoc );
Please suggest me how to resolve this issue.
Thanks & Regards,
SunitaHi Cristoph,
We tried all the way but could not able assign characteristics value before saving the document. it means we can only see the assigned value using transaction CV02N. but our requirement is to check if the user fills any value into characteristics it should check with default value which we would like to assign whenever we create a new part of the document which we are not able to achieve.we tried a lot but could not succeed.
Nay idea if we can achieve this....
Regards
Bhuwan Tiwari -
How to set default values on the screen painter parameters?
Hello ABAP Gurus,
I would just want to ask how to set default values on the screen painter parameters.
Thank you for your replies.Hi,
To set default values for screen painter parameters initialize the field names with default values in the PBO module....
say u have the field name as f_field1....
in the PBO of that screen initialize it....
f_field1 = '100' "here 100 is the default value.
<b>reward points if useful.</b>
regards,
Vinod Samuel. -
How to set default value to date type attribute.
Hi,
How to set default value to date type attribute.
E.g I want to set u201C01/01/1999u201D to date attributes.
First i want to set value and then i want to fetch the same & want to check equals.
please suggest solution.
Regards,
SmitaHi,
In wdinit() method u can set the date
DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
Date today = Calendar.getInstance().getTime();
String reportDate = df.format(today);
wdContext.currentContextElement().setFromDate(reportDate);
Another way you have set the this formate like that
1. Create a Simple type under "Dictionaries->SimpleType" called DateFormat
2. Select the type as "date"
3. Go to the "Representation" tab and set the format as "dd/MM/yyyy" (or whatever u want, but month should be MM)
4.Bind the context attribute to the type created now.
Hope this helps u.
Best Regards
Vijay K -
How to set default value of a table using sequence number
Dear all,
Does any body know that how to set default value of a table
using sequence number.
But I don't want to use trigger to do that.
Please help!!!!
EldonAndrew is essentially correct. You can get around the trigger,
but not the sequence, if (and this may be a very big if) you can
guarantee that every time an insert is done into the table, from
whatever source, the statement looks something like
INSERT INTO tbl VALUES (sequence.nextval,other_columns_values) -
How to change default value of a parameter and LOV attached to a parameter
Hi All
I am new to discoverer reports and I need to accomplish the following tasks:
1. Need to change the SQL query of a discoverer report
2. Need to change the default value of parameter ( from constant to current month). In the discoverer plus responsibility when I open the report and go to tools>>parameter>>edit
I can see the constant default value given there. On the right hand side there is a drop down which says 'Value'. I guess if i need to put a SQL as defaul value I need to change the drop down to sql or something and then put the SQL. Problem is the drop down is froezen and I cannot change it.
Even if I try to create a new parameter/report.
3. Need to change the LOV associated to the item on which the parameter is based.
I have the discoverer plus responsibility attached to myself and do not have the discoverer administrator tool (desktop developer tool like forms 6i). My questions are:
1. Can I change the SQL query by using discoverer plus responsibility or do I need discoverer administrator tool?
2. Any help on how to get the default value from an SQL query? currently it is a constant value.
3. Is there any way to figure out is the LOV is madeup of fixed constant values (like independednt value set) or they are fetched from some sql query(table validated value sets)?
Any pointers/solutions will be highly appriciated!!!
Thanks in advance.
Thanks and Regards,
ShashankHI,
Need to change the SQL query of a discoverer reportThe discoverer generate the SQL according to the item, calculation and conditions designed in the worksheet.
You cannot edit a specific worksheet SQL.
In order to change the SQL you need to change the worksheet using the "Edit-> worksheet" from the menu.
To change the SQL generated inside the folders you need to do that using the administrator.
Need to change the default value of parameterYou cannot use SQL statements for the parameter default value. it is not supported. if you need default you can use only constant (as it was). otherwise you can set the parameter to be optional and then add to this condition an OR saying that <item>= NVL(:Parameter,<your default>)
as <your default> you can use calculations so that if for example you want the current date you will create a calculation containing: SYSDATE.
Is there any way to figure out is the LOV is madeup of fixed constant values (like independednt value set) or they are fetched from some sql query(table validated value sets)?They are based on SQL, even they are const then you will see it as
select 'a','b'... from dual
you can find the LOV (called item classes) in the administrator.
Go to the item your condition is based on and see its properties.
In the properties you should see the item class it uses.
Close the properties and go to the item classes tab, search for this item class and figure the folder it came from.
This is the folder you need to change in order to change the LOV.
Hope it helped a bit, you sure asked several big questions...
Tamir -
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 value in ME21N
Hi all,
I want to set default value of PO item's price unit to 1000 and make it unchangeable, is it possible? If so, could you please tell me how to do that.
Thanks in advance!
WoodyDear Woody,
1) if u want to make any field un-editable then make it Via SHD0
2) Plz find the below link for Demo SHD0, here we need to make the field as out put only
[https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/transactionVariant-AStepbyStepGuidefor+Creation]
Plz Provide the link to ur Abaper
Regards
kumar -
How to set default values in matrix combo
hai everybody.
i want to set default values in a matrix combo box. how to do that
pls.......Hi Priya,
Public Sub comboload1()
Try
ds = oform.DataSources.DBDataSources.Add("OUSR")
oitem = oform.Items.Item("pm7")
omatrix = oitem.Specific
ocolumns = omatrix.Columns
ocolumn = ocolumns.Item("V_2")
ocombo = ocolumn.Cells.Item(r).Specific (r = row number)
LoadEroToCombo1(ocombo)
Catch ex As Exception
oapp.MessageBox(ex.Message)
End Try
End Sub
load to combo function is below
Public Sub LoadEroToCombo1(ByRef ocombo As SAPbouiCOM.ComboBox)
Dim rset As SAPbobsCOM.Recordset
Dim querystring As String
Dim rcount As Long
Dim rindex As Long
Try
rset = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
querystring = "SELECT T0.U_NAME FROM OUSR T0"
rset.DoQuery(querystring)
rcount = rset.RecordCount
rset.MoveFirst()
ocombo.ValidValues.Add("0", "Select")
For rindex = 0 To rcount - 1
ocombo.ValidValues.Add(rset.Fields.Item(0).Value, rindex)
rset.MoveNext()
Next rindex
ocombo.Select("0")
rset = Nothing
System.GC.Collect()
Catch ex As Exception
oapp.MessageBox(ex.Message)
End Try
End Sub
try this code if it helps please reward points
Regards
Cool Ice
Edited by: Cool Ice on Jul 28, 2008 1:43 PM -
How to set default value in transient boolean attribute in VO in ADF
Hi ADF Experts,
I have requirement like,I have viewObject with one transient booelan attribute,
I want to set default value of that boolean attribute as "True"
How can I achive that please help,
Tried every thing but no luck.Hi,
I am not sure what is the use of setting a default value for a transient attribute in a read-only VO.
However, why not include that attribute with a default value in the query itself?
Something like
SELECT
Empno, Ename, Deptno, 'true' as BooleanTransAttr
FROM EMP
and set the type of the attribute to Boolean?
-Arun -
How to set default value to relationship filed(ess~my~fam)new child
Hi Experts,
i have a standard ESS Application for Family members/dependents for Malaysia(essmyfam)-->New child
When i click on new child a view gets opened withcontains relationship field with dropdown.Kdsvh is the field that is binded to dropdown.By default downdown is empty,when i click on dropdown it contains some values(Legitimate,adopted,others).
my problem is node binded to dropdown(selectedinfotype) contains many attributes.so how can i set default value as others from values that dropdown contains.
Code i tried
In wdinit of Vcperfamilymydetail component
wdContext.currentSelectedInfotypeElement().setKdsvh(wdContext.nodeSelectedInfotype().getSelectedInfotypeElementAt(3).getKdsvh());
Error: Indexoutofbond exception
Reply is Highly appreciated..
Thanks
Shikore
Edited by: kishore shikore on Aug 18, 2009 6:09 PMHi Kishore,
you can set the lead selected value while adding the vales to drop down. let say u are getting the data from model node say "Test".
use the below code in doinit method:
int size = wdContext.nodeTest().size();
for (int i-0;i<size;i++){
ITestElement test = wdCOntext.nodeTest().getTestElement(i);
ISelectedInfotypeElement element = wdContext.nodeSelectedInfotype().createSelectedInfotype();
element.setKdsvh(test.getKcsvh());
wdContext.nodeSelectedInfotype().addElement(element);
if("Others".equals(test.getKdsvh())){
wdContext.nodeSelectedInfotype().setleadSelection(element.index());
Hope it helps
Thanks and Regards
Maybe you are looking for
-
Bulky Message are not getting processed
Hi All, Recently we have upgraded our XI systems to EHP4. After upgrade Bulky files are not getting processed into XI system. Small files are getting processed successfully. Earlier we had faced same issue at that time we have maintained some paramet
-
How to sync the calendar with gmail-calendar
I have an E-72 and use the calendar a lot. But how can I sync it with gmail-calendar? Anyone? Thanks! Solved! Go to Solution.
-
Playhead won't show and songs repeat
Playhead won't show and songs repeat. I've turned off phone and tried to tap artwork but it still doesn't show. I just get a place to select stars for the song and it continues to play the same song over
-
Create Form from previous form output?
Hi all, I have problem when I try to do this since I am pretty new with Jdev and ADF. If anyone has any suggestion or guide will be appreciated. I have two forms on a page. Form 1 take in user input (integer) and return an array of String. Form 2 tak
-
Enable CMSS-3D with 5.1 Surround Sound Headphon
Hey everyone I heared of a post or something on another site that a creative rep or soemthing said that you should have CMSS-3D off when you have the X-FI configured for 5. speakers. Is this true? I did a search of the forums and didnt find an answer