How to add default values when adding custom component to design view?
I have a set of custom components (usually) extending Spark components. But when adding our custom component onto design view, how can I define defult values (in AS3).
For example, s:Button has default label = 'Button' when added to application, or mx:DataGrid has 3 columns predefined, but when using custom components there are no predefined values like this.
I can put this values in constructor, but they are not visible in design time, only runtime.
Any ideas? Thanks
Esmin
yes, I am. By the way I've found the solution. Someone might find this usefull.
In design.xml having
<component name="ExtendedTextInput" namespace="mynamespace" category="beta" displayName="ExtendedTextInput"/>
use this
<component name="ExtendedTextInput" namespace="mynamespace" category="beta" displayName="ExtendedTextInput">
<defaultAttribute name="text" value="ExtendedTextInput"/>
</component>
so when adding this component to design view, it will have text setted to value ('ExtendedTextInput' in this case).
Similar Messages
-
How to add default value to the Exclude single value in selection screen..
Hi Experts,
i have searched in sdn, but not able to get proper results,
in my report i have a selection screen, in that there is a Select-option like status, for this status i need to exclude '02'
for this i need to add the default value under exclude singale values option, not in lower and upper limit.
can anyone help me...
Regards,
Sudha.
Moderator message: please search for available information/documentation before asking, don't just claim you did.
Edited by: Thomas Zloch on Oct 27, 2010 2:50 PMHi,
you can use the function module SELECT_OPTIONS_RESTRICT .
This function module simplifies the handling of SELECT-OPTIONS on the selection screen by restricting possible selection options and signs.
By calling this function module, you can restrict the number of selectio options available for the chosen selection field. You can also disable the function allowing users to enter values to be excluded from the selection (SIGN = 'E').
Regards,
S.Velsankar -
How to add jar files to my custom component
Hi,
I have created a custom component through component wizard. I have to add jars, so the component will execute. Where to add those jar files? I tried adding it in classes folder, but its not working. Where to add it? and where else i have to make any changes?
Please provide inputs.
Thanks in advancein the Component manifest.hda file, mention the jar files to be installed...see example below
@ResultSet Manifest
2
entryType
location
component
MyCustomComponent/MyCustomComponent.hda
componentClasses
MyCustomComponent/classes/
componentExtra
MyCustomComponent/readme.htm
componentClasses
MyCustomComponent/classes/
componentClasses
MyCustomComponent/apachepoi/poi-3.8-20120326.jar
componentClasses
MyCustomComponent/apachepoi/poi-ooxml-3.8-20120326.jar
componentClasses
MyCustomComponent/apachepoi/poi-ooxml-schemas-3.8-20120326.jar
componentClasses
MyCustomComponent/apachepoi/stax-api-1.0.1.jar
componentClasses
MyCustomComponent/apachepoi/xmlbeans-2.3.0.jar
componentClasses
MyCustomComponent/apachepoi/ooxml-schemas-1.1.jar
componentExtra
MyCustomComponent/java/
@endnext step is to add classpath in MyCustomComponent.hda file in LocalData...see example below
@Properties LocalData
blFieldTypes=
preventAdditionalComponentDowngrade=0
hasPreferenceData=0
blDateFormat=M/d{/yy}{ h:mm[:ss]{ a}}!mAM,PM!tAmerica/Chicago
classpath=$COMPONENT_DIR/classes:$COMPONENT_DIR/apachepoi/poi-3.8-20120326.jar:$COMPONENT_DIR/apachepoi/poi-ooxml-3.8-20120326.jar
classpathorder=50
ComponentName=MyCustomComponent -
How to add actions only when the stage playhead passes a label/certain time?
I have an animation that is 2 seconds long. On the 1 sec mark there is sym.stop(); and a label called 'in'. At the 2 sec mark there is another sym.stop();
So what I want to happen is for the animation to play up until 'in', then on mouseenter for the stage have sym.play();, and on mouseleave sym.playReverse();. This will make it so that only the second half of the animation will get played on mouseenter/leave.
My problem is that the mouseenter/leave also gets applied to the first half of the animation, not allowing the second half to animate if the user mouses over during the first half. I know this requires an if statement but I don't know how to write it. So it would be something like this: if the playhead reaches 'in', apply mouseenter/leave actions.yes, I am. By the way I've found the solution. Someone might find this usefull.
In design.xml having
<component name="ExtendedTextInput" namespace="mynamespace" category="beta" displayName="ExtendedTextInput"/>
use this
<component name="ExtendedTextInput" namespace="mynamespace" category="beta" displayName="ExtendedTextInput">
<defaultAttribute name="text" value="ExtendedTextInput"/>
</component>
so when adding this component to design view, it will have text setted to value ('ExtendedTextInput' in this case). -
How to populate default values for BP (FPP1 is tcode in ECC 6.0)
Hello ,
I am creating BP in ECC 6.0 using Fpp1 tcode. How to populate default values when i hit create BP person. any badi triggers when we are creating BP in ECC.
guide me.Hi Premanand,
To default fields, you need to do the following steps :
1. Create a Z module e.g. : Z_DEFAULT_FIELDS_DIALOG.
2. Enter suppose you want to default fiels Name, title, country, write code as follows :
DATA : ls_busdefault LIKE busdefault.
ls_busdefault-title = '0002'.
ls_busdefault-mc_name1 = 'TEST'.
ls_busdefault-mc_name2 = 'Default'.
ls_busdefault-country = 'IN'.
CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
EXPORTING
i_busdefault = ls_busdefalut.
3. Now got to transaction BUS7, select event ISDAT, click on Event--> function modules.
4. Register your Z module Z_DEFAULT_FIELDS_DIALOG in this list, Save.
This should solve your problem. Please note : You can only default those fields contained in structure BUSDEFAULT.
Cheers,
Rishu. -
How to make the LV front panel controls the current value through the programis set as the default value when the next time you open?
1110340051Try this: Re: How to make a VI remember the latest control value?
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice -
Default value of BeX customer Exit variable not Displayed in WeBI??
Hello Experts,
We are stuck with a problem where WeBI report is created on top of BeX query and we are not able to see the default value of Bex Customer exit variable in WeBI run. Here is the complete scenario:
1. One restricted KF is created in BeX, restricted with Customer exit variable on net Due date. And this variable is mandatory, ready for input, and Default value in calculated is user exit as current Week's Monday.
2. So, by default KF data should be restricted to Monday of current week, if user does not change this value.
3. Now, WeBI report is created on top of this Bex query, and all is working fine, i.e. we are getting variable as Prompt in WeBI, but Default value is not shown while Running the Webi Report.
So, need your inputs on the same, if default values from BeX in WeBI is supported or not? If yes, why this is happening, and how to resolve it?
Please notice, the restrcition is in KF only, it is not a separate restrcition on Net Due date in Filter area or in Defualt area of BeX
and we are on SAP BW 7.1 and BOXI 3.1 SP4.
Regards,
Vipul
Edited by: VIPUL GOYAL on Nov 23, 2011 9:44 PMHi,
See 1285993 - Support of Customer Exit Variables from BEx query into WebIntelligence via OLAP universe
WebI will prompt when executed, but the default values calculated by the user exit - do not appear.
Note: If the BEx variable has property 'ready for input' set / enabled, then its WebI prompt shows ok, but no default value appears.
Cause
This behaviour expected 'by design' (in the context of the product's current limitations) as explained in the online guide below:
Please refer to Chapter 7, page 44, document link here: http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_sap_olap_universes_en.pdf
Characteristic variable > processing type > Customer Exit is "Supported, without user entry"
--> This should be understood as meaning "User will not be shown a prompt"
regards,
H -
How to add F4 help for the custom field of a custom table
Hi All,
How to add F4 help to the custom table field? in the table maintainance when user clicks on F4 i want to provide possible values for this field I am trying to write the code in the screen of table maintainace like the following
PROCESS ON VALUE-REQUEST.
FIELD ZTEST_MAH_F4-KUNNR MODULE zVALUE_kunnr .
But when i am double clicking on module it's giving options to create include program but after that it's giving user is currently editing the table i am not getting this can some body clarify my doubt it's gr8 if some body give some examp code
Thanks&Regards
maheshHi,
Create a subroutine under the event and call the following FM
1. Select all the related data into an itab, for ex i_kunnr
2. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'KUNNR'
PVALKEY = ' '
dynpprog = sy-repid
dynpnr = '1000'
dynprofield = <selection screen field>
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = <b>i_kunnr</b>
FIELD_TAB =
return_tab = < return table >
DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3 -
How to add field value to the standard table
Hi,
How to add field value to the standard table?
for example:
when we go to TCODE SE16-> VBAK table -> on the selection screen if we press F4 against VBTYP we get all the available values for that field. How to add a new document Category value to this field so that it shows up in F4 help for that field.Hi Asif,
I don't think it is possible and feasible for adding new field value to the field VBTYP because it is not possible through SPRO.
If u see the domain of this field VBTYP we have fixed values provided by SAP. There is no value table for this. If u have value table then it will be updated through SPRO. But still if u really want to add some value u can do that by getting access key and add the value in the fixed values of the domain. But of no use other than simply displaying in F4. Because for what ever value u created here there will be no documents in VBAK or any table using this domain.
Hope this is clear for u.
Thanks,
Vinod. -
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 get default values while using the transaction "BP"
Hi Group,
I have a query on how to get default values while using the transaction <b>BP</b>?
The thing is:
when I enter into the transaction "BP", I need to see some default values to some of the input fields in the screen.
how can I achieve this?
So please kindly let me know the procedure to achieve this.
Thanks & Regards,
Vishnu.Hi,
The events of BDT can be used to default some fields on creating a partner.
For this create a function module for ISDAT. attach that event in BUS7.
In the ISDAT funtion modulethe following code should be used.
For example to set the nationality:
I_BUSDEFAULT-NATIO = 'DE.
CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
EXPORTING
i_busdefault = I_BUSDEFAULT
Regards, Smita. -
How to add multiple table when creating add on using b1de
Hi all,
Plz help me
How to add multiple table when creating add on using b1de.
ThanksHi dns_sap,
Can you explain a little better what you are trying to accomplish? Is it to create UserTables and UserFields in the database, when the addon runs the first time?
If so, you can use the following code
Add User Table
Try
Dim lRetCode As Long
Dim oUDT As SAPbobsCOM.UserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
oUDT.TableName = TableName
oUDT.TableDescription = TableDescription
oUDT.TableType = TableType
lRetCode = oUDT.Add
'// Check for error when adding the Table: if lRetCode = 0 the table was created; if lRetCode = -2035 the table already exisits
If lRetCode <> 0 Then
oApplication.MessageBox("Error: " & lRetCode.ToString & ", " & oCompany.GetLastErrorDescription)
End If
Catch ex As Exception
oApplication.MessageBox(oCompany.GetLastErrorDescription)
Finally
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUDT)
oUDT = Nothing
lRetCode = Nothing
GC.Collect()
End Try
Add User Field
Try
Dim lRetCode As Long
Dim oUDF As SAPbobsCOM.UserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
oUDF.TableName = TableName
oUDF.Name = FieldName
oUDF.Description = FieldDescription
oUDF.Type = FieldType
lRetCode = oUDF.Add
'// Check for error when adding the field: if lRetCode = 0 the field was created; if lRetCode = -2035, the field already exists
If lRetCode <> 0 Then
oApplication.MessageBox("Error: " & oCompany.GetLastErrorCode & ", " & oCompany.GetLastErrorDescription)
End If
Catch ex As Exception
oApplication.MessageBox(oCompany.GetLastErrorDescription)
Finally
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUDF)
oUDF = Nothing
lRetCode = Nothing
GC.Collect()
End Try
Regards,
Vítor Vieira -
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 make default values in selection field?
hi,
i have selection field date , using data element 'QENTST' using following code in view INIT Method. i get the input selection field when i test application.
DATA: LT_RANGE_TABLE TYPE REF TO DATA.
CALL METHOD WD_THIS->M_HANDLER->CREATE_RANGE_TABLE
EXPORTING
I_TYPENAME = 'QENTST'
RECEIVING
RT_RANGE_TABLE = LT_RANGE_TABLE.
CALL METHOD WD_THIS->M_HANDLER->ADD_SELECTION_FIELD
EXPORTING
I_ID = 'QENTST'
IT_RESULT = LT_RANGE_TABLE
I_OBLIGATORY = ABAP_TRUE.
What i need now , to make default value in this selection field( low = sy-datum and high = sy-datum + 10 ) . I have checked , i found one method called... SET_RANGE_TABLE_OF_SEL_FIELD. Bt i m not able to understand how to assign values to input table parameter in this method?
Thanks In Advance.
Saurin ShahHi,
Refer this Article by Thomas on how to make default values in Select Options:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60474842-91ca-2b10-3390-d2fd30f335fd
I hope it would solve your problem. -
How to set default values to these fields
Hello,
I'm new with UCM 11g, and i need to add default values to fields, for example to these fields:
Type -> Document should be the default and not editable value
Title -> Should be the name of the file i'm checking in
Security Group -> it's default and not editable value should be Secure
How do i set these default values ??
Regards
CarlosSecurity Group and Document Type can be defined in your profile (as default values using dprDefaultValue - see e.g. Re: simple profiles and defaulting ). You can also define those fields as 'hidden' or 'info only'
Title with the name of file is a bit trickier - you cannot define it up-front as you don't know what file will be chosen, do you? You can, however, use a global rule where you can fill in dDocTitle with the value in dOriginalName (or somehow process it, if you will).
Maybe you are looking for
-
I just picked up a new Mac and have been trying to transfer files backed up to an external hard drive from a PC. I was able to transfer some of the files without issue, but most of the files show that they are locked. Now that they are on the Mac I c
-
my itunes wont load on my new laptop
-
Anti-virus on UCCX/Call Manager
Hello I have been asked a questiona bout adding Anti-Virus to our Phone System Environment. We have Call Manager 7 and UCCX 7. What are the best practices for doing so?
-
Can't upgrade 2012 standard to 2012 R2
I have 2 production 2012 standard servers I need to upgrade to Server 2012 R2. When I try to complete an in-place upgrade I get an error that tells me an unexpected error occurred please restart the application. error 0x0. I've installed all updates
-
ILife 08 files getting corrupt under 10.5
I've had Leopard installed since release and not long after noticed that many of the podcasts I was downloading were becoming corrupt and not playing properly. Usually they'd play for a bit then just end. I thought it was just a bug as a few people I