How to set a default value to a transaction property?
Hi All,
I have a table in which one of the columns is production_date. I need to retrieve and display the data corresponding to the month as selected by the user in the front end. But prior to the selection, the user should see the data of the current month. I am able to show the data of the user selected month, but am unable to show the data of the current month. Instead of the current month, the transaction returns the data of the month of January by default. Can anybody help?
Thanks and Regards,
Lipsa.
Jeremy,
I am not at all bothered about the selected month. I think, you too did not get my question. Let me explain you the scenario once again.
In the left hand side of the user's dashboard, there is a link to view current status. Once the user clicks the link, he should see two things.
1. a chart to display the data of the current month.
2. a drop down list to select a month of his choice.
The data is available in the database table. This table is having a column called Production_Date. Once the user selects a month from the list, the selected item is set to an applet parameter. I have designed a BLS which calls the query template having this parameter. The QT queries for all the data from the database. The BLS is having a transaction property called 'month'. The parameter value is assigned to this property. Now, this property has the month selected by the user. Finally, I have the logic where I repeat the column Production_Date, get the month out of the date, compare the month with the property value in a conditional block, and get the data once the condition is true. Using these steps, I can get the data of the month selected by the user.
My issue is, the user should see the data of the current month prior to selection from the drop down list which I am unable to do. Any suggestions as to how can I achieve this?
Regards,
Lipsa.
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
GopalI 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 KhuranaHi,
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.
regardsset the default value on the underlying EO or VO attribute
john -
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
raniI 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 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,
SathishDear 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,
CVHi,
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 helphi,
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 WeiKwok,
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,
AbjuhHello 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 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 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
adamAre 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.
Maybe you are looking for
-
How to make Advance payment to Vendor and cheque printing ( F-48 , F-58 )
Dear All, I have to pay advance to my vendor and then print the cheque.The process followed by me is as follows : 1. I am not using automatic payment run vide F110 but using F-48 to process vendor advance payment. I am assigning Special GL ind
-
Why is my Bounce not working?
I am trying to bounce a project which has a Sibelius file rewired to it. I have successfully done this before, and it seems to be doing a bounce as usual, but I cannot find the file - either in the audio bin or iTunes or the folder to which I have a
-
When I open a new tab, an error message appears.
When I open a new tab, an error message appears. I click "OK" on the error message, and the tab opens. == This happened == Every time Firefox opened == I open a new tab
-
Result Processing - Additional results work only when any of the "Output Name" Enabled
Only if i ENABLE any result type only then the SequenceFilePostResultListEntry is called the thing is I have aditional results & I save them in TDM format hence I dont need the options from the Result processing is this functional behavi
-
This solution is for Oracle Report. I create a letter where one part of the paragraph (v_meas)needs to be in bold only if the variable v_meas is not null. Below is my code for this paragraph. Please, some body can tell me what I need to use. Product